diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 6b28bdb2..f371d275 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.105.0"
+ ".": "0.106.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 163759d1..2092285e 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 168
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-1d44bb7fad99487af1161eb24dfd5369440eda7e80ed237cbc1acc6802a7d212.yml
openapi_spec_hash: 1b6b6215b60094b76b91c56b925a251a
-config_hash: ac676e77c8ca051c7aad978c26e96345
+config_hash: e68a052fd109c0885732114753abc739
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69bd9855..80d15415 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.106.0 (2025-09-10)
+
+Full Changelog: [v0.105.0...v0.106.0](https://github.com/lithic-com/lithic-python/compare/v0.105.0...v0.106.0)
+
+### Features
+
+* **api:** rename endpoint ([ee65354](https://github.com/lithic-com/lithic-python/commit/ee6535445d9d8d0cc0b54fc6e18e1a7d24157e4d))
+
## 0.105.0 (2025-09-09)
Full Changelog: [v0.104.0...v0.105.0](https://github.com/lithic-com/lithic-python/compare/v0.104.0...v0.105.0)
diff --git a/api.md b/api.md
index 952f9be2..01ee9fcc 100644
--- a/api.md
+++ b/api.md
@@ -426,6 +426,7 @@ from lithic.types import (
TransactionSimulateAuthorizationAdviceResponse,
TransactionSimulateClearingResponse,
TransactionSimulateCreditAuthorizationResponse,
+ TransactionSimulateCreditAuthorizationAdviceResponse,
TransactionSimulateReturnResponse,
TransactionSimulateReturnReversalResponse,
TransactionSimulateVoidResponse,
@@ -441,6 +442,7 @@ Methods:
- client.transactions.simulate_authorization_advice(\*\*params) -> TransactionSimulateAuthorizationAdviceResponse
- client.transactions.simulate_clearing(\*\*params) -> TransactionSimulateClearingResponse
- client.transactions.simulate_credit_authorization(\*\*params) -> TransactionSimulateCreditAuthorizationResponse
+- client.transactions.simulate_credit_authorization_advice(\*\*params) -> TransactionSimulateCreditAuthorizationAdviceResponse
- client.transactions.simulate_return(\*\*params) -> TransactionSimulateReturnResponse
- client.transactions.simulate_return_reversal(\*\*params) -> TransactionSimulateReturnReversalResponse
- client.transactions.simulate_void(\*\*params) -> TransactionSimulateVoidResponse
diff --git a/pyproject.toml b/pyproject.toml
index 99e0b4fc..45f5eb31 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "lithic"
-version = "0.105.0"
+version = "0.106.0"
description = "The official Python library for the lithic API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/lithic/_version.py b/src/lithic/_version.py
index 15af33c7..030af9e3 100644
--- a/src/lithic/_version.py
+++ b/src/lithic/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "lithic"
-__version__ = "0.105.0" # x-release-please-version
+__version__ = "0.106.0" # x-release-please-version
diff --git a/src/lithic/resources/transactions/transactions.py b/src/lithic/resources/transactions/transactions.py
index f7d5d1a5..bc5cee88 100644
--- a/src/lithic/resources/transactions/transactions.py
+++ b/src/lithic/resources/transactions/transactions.py
@@ -2,6 +2,7 @@
from __future__ import annotations
+import typing_extensions
from typing import Union
from datetime import datetime
from typing_extensions import Literal
@@ -18,6 +19,7 @@
transaction_simulate_return_reversal_params,
transaction_simulate_authorization_advice_params,
transaction_simulate_credit_authorization_params,
+ transaction_simulate_credit_authorization_advice_params,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NoneType, NotGiven
from ..._utils import maybe_transform, async_maybe_transform
@@ -50,6 +52,9 @@
from ...types.transaction_simulate_return_reversal_response import TransactionSimulateReturnReversalResponse
from ...types.transaction_simulate_authorization_advice_response import TransactionSimulateAuthorizationAdviceResponse
from ...types.transaction_simulate_credit_authorization_response import TransactionSimulateCreditAuthorizationResponse
+from ...types.transaction_simulate_credit_authorization_advice_response import (
+ TransactionSimulateCreditAuthorizationAdviceResponse,
+)
__all__ = ["Transactions", "AsyncTransactions"]
@@ -449,6 +454,7 @@ def simulate_clearing(
cast_to=TransactionSimulateClearingResponse,
)
+ @typing_extensions.deprecated("use `simulate_credit_authorization_advice` instead")
def simulate_credit_authorization(
self,
*,
@@ -510,6 +516,67 @@ def simulate_credit_authorization(
cast_to=TransactionSimulateCreditAuthorizationResponse,
)
+ def simulate_credit_authorization_advice(
+ self,
+ *,
+ amount: int,
+ descriptor: str,
+ pan: str,
+ mcc: str | NotGiven = NOT_GIVEN,
+ merchant_acceptor_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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> TransactionSimulateCreditAuthorizationAdviceResponse:
+ """Simulates a credit authorization advice from the card network.
+
+ This message
+ indicates that the network approved a credit authorization on your behalf.
+
+ Args:
+ amount: Amount (in cents). Any value entered will be converted into a negative amount in
+ the simulated transaction. For example, entering 100 in this field will appear
+ as a -100 amount in the transaction.
+
+ descriptor: Merchant descriptor.
+
+ pan: Sixteen digit card number.
+
+ mcc: Merchant category code for the transaction to be simulated. A four-digit number
+ listed in ISO 18245. Supported merchant category codes can be found
+ [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
+
+ merchant_acceptor_id: Unique identifier to identify the payment card acceptor.
+
+ 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._post(
+ "/v1/simulate/credit_authorization_advice",
+ body=maybe_transform(
+ {
+ "amount": amount,
+ "descriptor": descriptor,
+ "pan": pan,
+ "mcc": mcc,
+ "merchant_acceptor_id": merchant_acceptor_id,
+ },
+ transaction_simulate_credit_authorization_advice_params.TransactionSimulateCreditAuthorizationAdviceParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=TransactionSimulateCreditAuthorizationAdviceResponse,
+ )
+
def simulate_return(
self,
*,
@@ -1051,6 +1118,7 @@ async def simulate_clearing(
cast_to=TransactionSimulateClearingResponse,
)
+ @typing_extensions.deprecated("use `simulate_credit_authorization_advice` instead")
async def simulate_credit_authorization(
self,
*,
@@ -1112,6 +1180,67 @@ async def simulate_credit_authorization(
cast_to=TransactionSimulateCreditAuthorizationResponse,
)
+ async def simulate_credit_authorization_advice(
+ self,
+ *,
+ amount: int,
+ descriptor: str,
+ pan: str,
+ mcc: str | NotGiven = NOT_GIVEN,
+ merchant_acceptor_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,
+ extra_query: Query | None = None,
+ extra_body: Body | None = None,
+ timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
+ ) -> TransactionSimulateCreditAuthorizationAdviceResponse:
+ """Simulates a credit authorization advice from the card network.
+
+ This message
+ indicates that the network approved a credit authorization on your behalf.
+
+ Args:
+ amount: Amount (in cents). Any value entered will be converted into a negative amount in
+ the simulated transaction. For example, entering 100 in this field will appear
+ as a -100 amount in the transaction.
+
+ descriptor: Merchant descriptor.
+
+ pan: Sixteen digit card number.
+
+ mcc: Merchant category code for the transaction to be simulated. A four-digit number
+ listed in ISO 18245. Supported merchant category codes can be found
+ [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
+
+ merchant_acceptor_id: Unique identifier to identify the payment card acceptor.
+
+ 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 await self._post(
+ "/v1/simulate/credit_authorization_advice",
+ body=await async_maybe_transform(
+ {
+ "amount": amount,
+ "descriptor": descriptor,
+ "pan": pan,
+ "mcc": mcc,
+ "merchant_acceptor_id": merchant_acceptor_id,
+ },
+ transaction_simulate_credit_authorization_advice_params.TransactionSimulateCreditAuthorizationAdviceParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=TransactionSimulateCreditAuthorizationAdviceResponse,
+ )
+
async def simulate_return(
self,
*,
@@ -1280,8 +1409,13 @@ def __init__(self, transactions: Transactions) -> None:
self.simulate_clearing = _legacy_response.to_raw_response_wrapper(
transactions.simulate_clearing,
)
- self.simulate_credit_authorization = _legacy_response.to_raw_response_wrapper(
- transactions.simulate_credit_authorization,
+ self.simulate_credit_authorization = ( # pyright: ignore[reportDeprecated]
+ _legacy_response.to_raw_response_wrapper(
+ transactions.simulate_credit_authorization, # pyright: ignore[reportDeprecated],
+ )
+ )
+ self.simulate_credit_authorization_advice = _legacy_response.to_raw_response_wrapper(
+ transactions.simulate_credit_authorization_advice,
)
self.simulate_return = _legacy_response.to_raw_response_wrapper(
transactions.simulate_return,
@@ -1324,8 +1458,13 @@ def __init__(self, transactions: AsyncTransactions) -> None:
self.simulate_clearing = _legacy_response.async_to_raw_response_wrapper(
transactions.simulate_clearing,
)
- self.simulate_credit_authorization = _legacy_response.async_to_raw_response_wrapper(
- transactions.simulate_credit_authorization,
+ self.simulate_credit_authorization = ( # pyright: ignore[reportDeprecated]
+ _legacy_response.async_to_raw_response_wrapper(
+ transactions.simulate_credit_authorization, # pyright: ignore[reportDeprecated],
+ )
+ )
+ self.simulate_credit_authorization_advice = _legacy_response.async_to_raw_response_wrapper(
+ transactions.simulate_credit_authorization_advice,
)
self.simulate_return = _legacy_response.async_to_raw_response_wrapper(
transactions.simulate_return,
@@ -1368,8 +1507,13 @@ def __init__(self, transactions: Transactions) -> None:
self.simulate_clearing = to_streamed_response_wrapper(
transactions.simulate_clearing,
)
- self.simulate_credit_authorization = to_streamed_response_wrapper(
- transactions.simulate_credit_authorization,
+ self.simulate_credit_authorization = ( # pyright: ignore[reportDeprecated]
+ to_streamed_response_wrapper(
+ transactions.simulate_credit_authorization, # pyright: ignore[reportDeprecated],
+ )
+ )
+ self.simulate_credit_authorization_advice = to_streamed_response_wrapper(
+ transactions.simulate_credit_authorization_advice,
)
self.simulate_return = to_streamed_response_wrapper(
transactions.simulate_return,
@@ -1412,8 +1556,13 @@ def __init__(self, transactions: AsyncTransactions) -> None:
self.simulate_clearing = async_to_streamed_response_wrapper(
transactions.simulate_clearing,
)
- self.simulate_credit_authorization = async_to_streamed_response_wrapper(
- transactions.simulate_credit_authorization,
+ self.simulate_credit_authorization = ( # pyright: ignore[reportDeprecated]
+ async_to_streamed_response_wrapper(
+ transactions.simulate_credit_authorization, # pyright: ignore[reportDeprecated],
+ )
+ )
+ self.simulate_credit_authorization_advice = async_to_streamed_response_wrapper(
+ transactions.simulate_credit_authorization_advice,
)
self.simulate_return = async_to_streamed_response_wrapper(
transactions.simulate_return,
diff --git a/src/lithic/types/__init__.py b/src/lithic/types/__init__.py
index 0cff09a2..228ca5b7 100644
--- a/src/lithic/types/__init__.py
+++ b/src/lithic/types/__init__.py
@@ -228,6 +228,12 @@
from .external_bank_account_retry_micro_deposits_response import (
ExternalBankAccountRetryMicroDepositsResponse as ExternalBankAccountRetryMicroDepositsResponse,
)
+from .transaction_simulate_credit_authorization_advice_params import (
+ TransactionSimulateCreditAuthorizationAdviceParams as TransactionSimulateCreditAuthorizationAdviceParams,
+)
from .account_holder_simulate_enrollment_document_review_params import (
AccountHolderSimulateEnrollmentDocumentReviewParams as AccountHolderSimulateEnrollmentDocumentReviewParams,
)
+from .transaction_simulate_credit_authorization_advice_response import (
+ TransactionSimulateCreditAuthorizationAdviceResponse as TransactionSimulateCreditAuthorizationAdviceResponse,
+)
diff --git a/src/lithic/types/transaction_simulate_credit_authorization_advice_params.py b/src/lithic/types/transaction_simulate_credit_authorization_advice_params.py
new file mode 100644
index 00000000..329a09ba
--- /dev/null
+++ b/src/lithic/types/transaction_simulate_credit_authorization_advice_params.py
@@ -0,0 +1,34 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["TransactionSimulateCreditAuthorizationAdviceParams"]
+
+
+class TransactionSimulateCreditAuthorizationAdviceParams(TypedDict, total=False):
+ amount: Required[int]
+ """Amount (in cents).
+
+ Any value entered will be converted into a negative amount in the simulated
+ transaction. For example, entering 100 in this field will appear as a -100
+ amount in the transaction.
+ """
+
+ descriptor: Required[str]
+ """Merchant descriptor."""
+
+ pan: Required[str]
+ """Sixteen digit card number."""
+
+ mcc: str
+ """Merchant category code for the transaction to be simulated.
+
+ A four-digit number listed in ISO 18245. Supported merchant category codes can
+ be found
+ [here](https://docs.lithic.com/docs/transactions#merchant-category-codes-mccs).
+ """
+
+ merchant_acceptor_id: str
+ """Unique identifier to identify the payment card acceptor."""
diff --git a/src/lithic/types/transaction_simulate_credit_authorization_advice_response.py b/src/lithic/types/transaction_simulate_credit_authorization_advice_response.py
new file mode 100644
index 00000000..f87a1cf9
--- /dev/null
+++ b/src/lithic/types/transaction_simulate_credit_authorization_advice_response.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+
+from .._models import BaseModel
+
+__all__ = ["TransactionSimulateCreditAuthorizationAdviceResponse"]
+
+
+class TransactionSimulateCreditAuthorizationAdviceResponse(BaseModel):
+ token: Optional[str] = None
+ """A unique token to reference this transaction."""
+
+ debugging_request_id: Optional[str] = None
+ """Debugging request ID to share with Lithic Support team."""
diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py
index df884ff3..cf1c0ea1 100644
--- a/tests/api_resources/test_transactions.py
+++ b/tests/api_resources/test_transactions.py
@@ -18,10 +18,13 @@
TransactionSimulateReturnReversalResponse,
TransactionSimulateAuthorizationAdviceResponse,
TransactionSimulateCreditAuthorizationResponse,
+ TransactionSimulateCreditAuthorizationAdviceResponse,
)
from lithic._utils import parse_datetime
from lithic.pagination import SyncCursorPage, AsyncCursorPage
+# pyright: reportDeprecated=false
+
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -272,27 +275,81 @@ def test_streaming_response_simulate_clearing(self, client: Lithic) -> None:
@parametrize
def test_method_simulate_credit_authorization(self, client: Lithic) -> None:
- transaction = client.transactions.simulate_credit_authorization(
+ with pytest.warns(DeprecationWarning):
+ transaction = client.transactions.simulate_credit_authorization(
+ amount=3831,
+ descriptor="COFFEE SHOP",
+ pan="4111111289144142",
+ )
+
+ assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+
+ @parametrize
+ def test_method_simulate_credit_authorization_with_all_params(self, client: Lithic) -> None:
+ with pytest.warns(DeprecationWarning):
+ transaction = client.transactions.simulate_credit_authorization(
+ amount=3831,
+ descriptor="COFFEE SHOP",
+ pan="4111111289144142",
+ mcc="5812",
+ merchant_acceptor_id="XRKGDPOWEWQRRWU",
+ )
+
+ assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+
+ @parametrize
+ def test_raw_response_simulate_credit_authorization(self, client: Lithic) -> None:
+ with pytest.warns(DeprecationWarning):
+ response = client.transactions.with_raw_response.simulate_credit_authorization(
+ amount=3831,
+ descriptor="COFFEE SHOP",
+ pan="4111111289144142",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ transaction = response.parse()
+ assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+
+ @parametrize
+ def test_streaming_response_simulate_credit_authorization(self, client: Lithic) -> None:
+ with pytest.warns(DeprecationWarning):
+ with client.transactions.with_streaming_response.simulate_credit_authorization(
+ amount=3831,
+ descriptor="COFFEE SHOP",
+ pan="4111111289144142",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ transaction = response.parse()
+ assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_simulate_credit_authorization_advice(self, client: Lithic) -> None:
+ transaction = client.transactions.simulate_credit_authorization_advice(
amount=3831,
descriptor="COFFEE SHOP",
pan="4111111289144142",
)
- assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+ assert_matches_type(TransactionSimulateCreditAuthorizationAdviceResponse, transaction, path=["response"])
@parametrize
- def test_method_simulate_credit_authorization_with_all_params(self, client: Lithic) -> None:
- transaction = client.transactions.simulate_credit_authorization(
+ def test_method_simulate_credit_authorization_advice_with_all_params(self, client: Lithic) -> None:
+ transaction = client.transactions.simulate_credit_authorization_advice(
amount=3831,
descriptor="COFFEE SHOP",
pan="4111111289144142",
mcc="5812",
merchant_acceptor_id="XRKGDPOWEWQRRWU",
)
- assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+ assert_matches_type(TransactionSimulateCreditAuthorizationAdviceResponse, transaction, path=["response"])
@parametrize
- def test_raw_response_simulate_credit_authorization(self, client: Lithic) -> None:
- response = client.transactions.with_raw_response.simulate_credit_authorization(
+ def test_raw_response_simulate_credit_authorization_advice(self, client: Lithic) -> None:
+ response = client.transactions.with_raw_response.simulate_credit_authorization_advice(
amount=3831,
descriptor="COFFEE SHOP",
pan="4111111289144142",
@@ -301,11 +358,11 @@ def test_raw_response_simulate_credit_authorization(self, client: Lithic) -> Non
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
transaction = response.parse()
- assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+ assert_matches_type(TransactionSimulateCreditAuthorizationAdviceResponse, transaction, path=["response"])
@parametrize
- def test_streaming_response_simulate_credit_authorization(self, client: Lithic) -> None:
- with client.transactions.with_streaming_response.simulate_credit_authorization(
+ def test_streaming_response_simulate_credit_authorization_advice(self, client: Lithic) -> None:
+ with client.transactions.with_streaming_response.simulate_credit_authorization_advice(
amount=3831,
descriptor="COFFEE SHOP",
pan="4111111289144142",
@@ -314,7 +371,7 @@ def test_streaming_response_simulate_credit_authorization(self, client: Lithic)
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
transaction = response.parse()
- assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+ assert_matches_type(TransactionSimulateCreditAuthorizationAdviceResponse, transaction, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -676,27 +733,81 @@ async def test_streaming_response_simulate_clearing(self, async_client: AsyncLit
@parametrize
async def test_method_simulate_credit_authorization(self, async_client: AsyncLithic) -> None:
- transaction = await async_client.transactions.simulate_credit_authorization(
+ with pytest.warns(DeprecationWarning):
+ transaction = await async_client.transactions.simulate_credit_authorization(
+ amount=3831,
+ descriptor="COFFEE SHOP",
+ pan="4111111289144142",
+ )
+
+ assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+
+ @parametrize
+ async def test_method_simulate_credit_authorization_with_all_params(self, async_client: AsyncLithic) -> None:
+ with pytest.warns(DeprecationWarning):
+ transaction = await async_client.transactions.simulate_credit_authorization(
+ amount=3831,
+ descriptor="COFFEE SHOP",
+ pan="4111111289144142",
+ mcc="5812",
+ merchant_acceptor_id="XRKGDPOWEWQRRWU",
+ )
+
+ assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+
+ @parametrize
+ async def test_raw_response_simulate_credit_authorization(self, async_client: AsyncLithic) -> None:
+ with pytest.warns(DeprecationWarning):
+ response = await async_client.transactions.with_raw_response.simulate_credit_authorization(
+ amount=3831,
+ descriptor="COFFEE SHOP",
+ pan="4111111289144142",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ transaction = response.parse()
+ assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_simulate_credit_authorization(self, async_client: AsyncLithic) -> None:
+ with pytest.warns(DeprecationWarning):
+ async with async_client.transactions.with_streaming_response.simulate_credit_authorization(
+ amount=3831,
+ descriptor="COFFEE SHOP",
+ pan="4111111289144142",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ transaction = await response.parse()
+ assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_simulate_credit_authorization_advice(self, async_client: AsyncLithic) -> None:
+ transaction = await async_client.transactions.simulate_credit_authorization_advice(
amount=3831,
descriptor="COFFEE SHOP",
pan="4111111289144142",
)
- assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+ assert_matches_type(TransactionSimulateCreditAuthorizationAdviceResponse, transaction, path=["response"])
@parametrize
- async def test_method_simulate_credit_authorization_with_all_params(self, async_client: AsyncLithic) -> None:
- transaction = await async_client.transactions.simulate_credit_authorization(
+ async def test_method_simulate_credit_authorization_advice_with_all_params(self, async_client: AsyncLithic) -> None:
+ transaction = await async_client.transactions.simulate_credit_authorization_advice(
amount=3831,
descriptor="COFFEE SHOP",
pan="4111111289144142",
mcc="5812",
merchant_acceptor_id="XRKGDPOWEWQRRWU",
)
- assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+ assert_matches_type(TransactionSimulateCreditAuthorizationAdviceResponse, transaction, path=["response"])
@parametrize
- async def test_raw_response_simulate_credit_authorization(self, async_client: AsyncLithic) -> None:
- response = await async_client.transactions.with_raw_response.simulate_credit_authorization(
+ async def test_raw_response_simulate_credit_authorization_advice(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transactions.with_raw_response.simulate_credit_authorization_advice(
amount=3831,
descriptor="COFFEE SHOP",
pan="4111111289144142",
@@ -705,11 +816,11 @@ async def test_raw_response_simulate_credit_authorization(self, async_client: As
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
transaction = response.parse()
- assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+ assert_matches_type(TransactionSimulateCreditAuthorizationAdviceResponse, transaction, path=["response"])
@parametrize
- async def test_streaming_response_simulate_credit_authorization(self, async_client: AsyncLithic) -> None:
- async with async_client.transactions.with_streaming_response.simulate_credit_authorization(
+ async def test_streaming_response_simulate_credit_authorization_advice(self, async_client: AsyncLithic) -> None:
+ async with async_client.transactions.with_streaming_response.simulate_credit_authorization_advice(
amount=3831,
descriptor="COFFEE SHOP",
pan="4111111289144142",
@@ -718,7 +829,7 @@ async def test_streaming_response_simulate_credit_authorization(self, async_clie
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
transaction = await response.parse()
- assert_matches_type(TransactionSimulateCreditAuthorizationResponse, transaction, path=["response"])
+ assert_matches_type(TransactionSimulateCreditAuthorizationAdviceResponse, transaction, path=["response"])
assert cast(Any, response.is_closed) is True