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.150.0"
".": "0.151.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 199
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-586f9c0ac14d8018b5664ba7f2a10c3838087238ca1880fe074e9234e37ceea6.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7bb6e334b298eabe597d7b87ffa9ace8fe16b38501ec6bcbfc3c6ea3a34c3435.yml
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.151.0 (2024-11-08)

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

### Features

* **api:** api update ([#798](https://github.com/Increase/increase-python/issues/798)) ([a79225b](https://github.com/Increase/increase-python/commit/a79225b0650339a5ba4549523051f600769e43aa))


### Chores

* rebuild project due to codegen change ([#795](https://github.com/Increase/increase-python/issues/795)) ([4638890](https://github.com/Increase/increase-python/commit/4638890429ad2615ccc1d55de2819cf20c4b0444))
* rebuild project due to codegen change ([#797](https://github.com/Increase/increase-python/issues/797)) ([81d3a25](https://github.com/Increase/increase-python/commit/81d3a2569114e85a2ffef79d7f09484c483cb9ce))

## 0.150.0 (2024-11-05)

Full Changelog: [v0.149.0...v0.150.0](https://github.com/Increase/increase-python/compare/v0.149.0...v0.150.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.150.0"
version = "0.151.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.150.0" # x-release-please-version
__version__ = "0.151.0" # x-release-please-version
10 changes: 10 additions & 0 deletions src/increase/resources/simulations/card_authorizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ def create(
merchant_country: str | NotGiven = NOT_GIVEN,
merchant_descriptor: str | NotGiven = NOT_GIVEN,
physical_card_id: str | NotGiven = NOT_GIVEN,
terminal_id: 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,
Expand Down Expand Up @@ -160,6 +161,9 @@ def create(

physical_card_id: The identifier of the Physical Card to be authorized.

terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -187,6 +191,7 @@ def create(
"merchant_country": merchant_country,
"merchant_descriptor": merchant_descriptor,
"physical_card_id": physical_card_id,
"terminal_id": terminal_id,
},
card_authorization_create_params.CardAuthorizationCreateParams,
),
Expand Down Expand Up @@ -254,6 +259,7 @@ async def create(
merchant_country: str | NotGiven = NOT_GIVEN,
merchant_descriptor: str | NotGiven = NOT_GIVEN,
physical_card_id: str | NotGiven = NOT_GIVEN,
terminal_id: 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,
Expand Down Expand Up @@ -335,6 +341,9 @@ async def create(

physical_card_id: The identifier of the Physical Card to be authorized.

terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand Down Expand Up @@ -362,6 +371,7 @@ async def create(
"merchant_country": merchant_country,
"merchant_descriptor": merchant_descriptor,
"physical_card_id": physical_card_id,
"terminal_id": terminal_id,
},
card_authorization_create_params.CardAuthorizationCreateParams,
),
Expand Down
8 changes: 6 additions & 2 deletions src/increase/resources/simulations/card_disputes.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def action(
self,
card_dispute_id: str,
*,
status: Literal["accepted", "rejected", "lost", "won"],
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.
Expand All @@ -71,6 +71,8 @@ def 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.
Expand Down Expand Up @@ -137,7 +139,7 @@ async def action(
self,
card_dispute_id: str,
*,
status: Literal["accepted", "rejected", "lost", "won"],
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.
Expand All @@ -158,6 +160,8 @@ async def 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.
Expand Down
4 changes: 3 additions & 1 deletion src/increase/types/card_dispute.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ class CardDispute(BaseModel):
unsuccessful dispute.
"""

status: Literal["pending_reviewing", "accepted", "rejected", "lost", "won"]
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.
Expand Down
2 changes: 1 addition & 1 deletion src/increase/types/card_dispute_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class CreatedAt(TypedDict, total=False):
_StatusReservedKeywords = TypedDict(
"_StatusReservedKeywords",
{
"in": List[Literal["pending_reviewing", "accepted", "rejected", "lost", "won"]],
"in": List[Literal["pending_reviewing", "pending_user_information", "accepted", "rejected", "lost", "won"]],
},
total=False,
)
Expand Down
24 changes: 24 additions & 0 deletions src/increase/types/card_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,12 @@ class ElementCardAuthorization(BaseModel):
transaction.
"""

terminal_id: Optional[str] = None
"""
The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.
"""

type: Literal["card_authorization"]
"""A constant representing the object's type.

Expand Down Expand Up @@ -865,6 +871,12 @@ class ElementCardDecline(BaseModel):
reach out to support@increase.com for more information.
"""

terminal_id: Optional[str] = None
"""
The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.
"""

verification: ElementCardDeclineVerification
"""Fields related to verification of cardholder-provided values."""

Expand Down Expand Up @@ -1667,6 +1679,12 @@ class ElementCardReversal(BaseModel):
- `partial_reversal` - The Card Reversal was a partial reversal, for any reason.
"""

terminal_id: Optional[str] = None
"""
The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.
"""

type: Literal["card_reversal"]
"""A constant representing the object's type.

Expand Down Expand Up @@ -2518,6 +2536,12 @@ class ElementCardValidation(BaseModel):
transaction.
"""

terminal_id: Optional[str] = None
"""
The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.
"""

type: Literal["card_validation"]
"""A constant representing the object's type.

Expand Down
6 changes: 6 additions & 0 deletions src/increase/types/declined_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,12 @@ class SourceCardDecline(BaseModel):
reach out to support@increase.com for more information.
"""

terminal_id: Optional[str] = None
"""
The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.
"""

verification: SourceCardDeclineVerification
"""Fields related to verification of cardholder-provided values."""

Expand Down
6 changes: 6 additions & 0 deletions src/increase/types/pending_transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,12 @@ class SourceCardAuthorization(BaseModel):
transaction.
"""

terminal_id: Optional[str] = None
"""
The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.
"""

type: Literal["card_authorization"]
"""A constant representing the object's type.

Expand Down
6 changes: 6 additions & 0 deletions src/increase/types/real_time_decision.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,12 @@ class CardAuthorization(BaseModel):
transaction will be settled in.
"""

terminal_id: Optional[str] = None
"""
The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.
"""

upcoming_card_payment_id: str
"""The identifier of the Card Payment this authorization will belong to.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,9 @@ class CardAuthorizationCreateParams(TypedDict, total=False):

physical_card_id: str
"""The identifier of the Physical Card to be authorized."""

terminal_id: str
"""
The terminal identifier (commonly abbreviated as TID) of the terminal the card
is transacting with.
"""
4 changes: 3 additions & 1 deletion src/increase/types/simulations/card_dispute_action_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@


class CardDisputeActionParams(TypedDict, total=False):
status: Required[Literal["accepted", "rejected", "lost", "won"]]
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.
Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/simulations/test_card_authorizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None:
merchant_country="US",
merchant_descriptor="AMAZON.COM",
physical_card_id="physical_card_id",
terminal_id="x",
)
assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"])

Expand Down Expand Up @@ -94,6 +95,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease)
merchant_country="US",
merchant_descriptor="AMAZON.COM",
physical_card_id="physical_card_id",
terminal_id="x",
)
assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"])

Expand Down
20 changes: 10 additions & 10 deletions tests/api_resources/simulations/test_card_disputes.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ class TestCardDisputes:
def test_method_action(self, client: Increase) -> None:
card_dispute = client.simulations.card_disputes.action(
card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men",
status="accepted",
status="pending_user_information",
)
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="accepted",
status="pending_user_information",
explanation="This was a valid recurring transaction",
)
assert_matches_type(CardDispute, card_dispute, path=["response"])
Expand All @@ -38,7 +38,7 @@ def test_method_action_with_all_params(self, client: Increase) -> None:
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="accepted",
status="pending_user_information",
)

assert response.is_closed is True
Expand All @@ -50,7 +50,7 @@ def test_raw_response_action(self, client: Increase) -> None:
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="accepted",
status="pending_user_information",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -65,7 +65,7 @@ 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="accepted",
status="pending_user_information",
)


Expand All @@ -76,15 +76,15 @@ class TestAsyncCardDisputes:
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="accepted",
status="pending_user_information",
)
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="accepted",
status="pending_user_information",
explanation="This was a valid recurring transaction",
)
assert_matches_type(CardDispute, card_dispute, path=["response"])
Expand All @@ -93,7 +93,7 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease)
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="accepted",
status="pending_user_information",
)

assert response.is_closed is True
Expand All @@ -105,7 +105,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None:
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="accepted",
status="pending_user_information",
) as response:
assert not response.is_closed
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
Expand All @@ -120,5 +120,5 @@ 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="accepted",
status="pending_user_information",
)
4 changes: 2 additions & 2 deletions tests/api_resources/test_card_disputes.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None:
cursor="cursor",
idempotency_key="x",
limit=1,
status={"in": ["pending_reviewing", "accepted", "rejected"]},
status={"in": ["pending_reviewing", "pending_user_information", "accepted"]},
)
assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"])

Expand Down Expand Up @@ -243,7 +243,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) ->
cursor="cursor",
idempotency_key="x",
limit=1,
status={"in": ["pending_reviewing", "accepted", "rejected"]},
status={"in": ["pending_reviewing", "pending_user_information", "accepted"]},
)
assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"])

Expand Down
Loading