diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index f3343e21..f38100a4 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.125.0"
+ ".": "0.126.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index fd5aad70..a5380737 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 194
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-efe780032e44b3cf0f6914407e43bce6aa7176fa50aa6ec018f93c1f28af8490.yml
-openapi_spec_hash: fcb4ca53ca59978f23f21d7c74fcc0b0
-config_hash: a0a579b0564a5c18568a78f5ba2b6653
+configured_endpoints: 212
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-65a6644277529a38afcac424d99d87cbfa4d8294423ad618dbbd875634ec1d3c.yml
+openapi_spec_hash: 6f3c1bb6a70830afb8af1dacd6352a97
+config_hash: 126e04f676f61e5871a82889336dbf9d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9b482a40..17b9bfb3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,22 @@
# Changelog
+## 0.126.0 (2026-06-10)
+
+Full Changelog: [v0.125.0...v0.126.0](https://github.com/lithic-com/lithic-python/compare/v0.125.0...v0.126.0)
+
+### Features
+
+* **api:** Add created field and make completed_at nullable in latest_challenge ([126641d](https://github.com/lithic-com/lithic-python/commit/126641d827512c68dfef741d7a6a053cbfe94f12))
+* **api:** add day_of_period field to financial_accounts loan_tape ([612ce5f](https://github.com/lithic-com/lithic-python/commit/612ce5f2b44d73a6bad3ca57613061c5d8ed705c))
+* **api:** add hold_adjustment action type to auth rules ([dc58d95](https://github.com/lithic-com/lithic-python/commit/dc58d95543aa7723246f81b6d836512f19bc02a0))
+* **api:** add name_validation field to card_authorization ([5bde4bc](https://github.com/lithic-com/lithic-python/commit/5bde4bcae161d20561ed1be62e636462018365e7))
+* **api:** add transaction_monitoring cases/comments/files/queues endpoints ([67701a6](https://github.com/lithic-com/lithic-python/commit/67701a6bbcf684c7abf436f3d9760b7b3814013c))
+
+
+### Documentation
+
+* **api:** update support contact URL in cards/account/card documentation ([71b5283](https://github.com/lithic-com/lithic-python/commit/71b5283efe22257a9a706ebc41ba51c523775d5c))
+
## 0.125.0 (2026-05-26)
Full Changelog: [v0.124.0...v0.125.0](https://github.com/lithic-com/lithic-python/compare/v0.124.0...v0.125.0)
diff --git a/api.md b/api.md
index 75bf2ec4..f370f8df 100644
--- a/api.md
+++ b/api.md
@@ -159,6 +159,77 @@ Methods:
- client.auth_rules.v2.backtests.create(auth_rule_token, \*\*params) -> BacktestCreateResponse
- client.auth_rules.v2.backtests.retrieve(auth_rule_backtest_token, \*, auth_rule_token) -> BacktestResults
+# TransactionMonitoring
+
+## Cases
+
+Types:
+
+```python
+from lithic.types.transaction_monitoring import (
+ CaseActivityEntry,
+ CaseActivityType,
+ CaseCard,
+ CaseEntity,
+ CasePriority,
+ CaseSortOrder,
+ CaseStatus,
+ CaseTransaction,
+ EntityType,
+ MonitoringCase,
+ ResolutionOutcome,
+ CaseRetrieveCardsResponse,
+)
+```
+
+Methods:
+
+- client.transaction_monitoring.cases.retrieve(case_token) -> MonitoringCase
+- client.transaction_monitoring.cases.update(case_token, \*\*params) -> MonitoringCase
+- client.transaction_monitoring.cases.list(\*\*params) -> SyncCursorPage[MonitoringCase]
+- client.transaction_monitoring.cases.list_activity(case_token, \*\*params) -> SyncCursorPage[CaseActivityEntry]
+- client.transaction_monitoring.cases.list_transactions(case_token, \*\*params) -> SyncCursorPage[CaseTransaction]
+- client.transaction_monitoring.cases.retrieve_cards(case_token) -> CaseRetrieveCardsResponse
+
+### Comments
+
+Methods:
+
+- client.transaction_monitoring.cases.comments.create(case_token, \*\*params) -> CaseActivityEntry
+- client.transaction_monitoring.cases.comments.update(comment_token, \*, case_token, \*\*params) -> CaseActivityEntry
+- client.transaction_monitoring.cases.comments.delete(comment_token, \*, case_token) -> None
+
+### Files
+
+Types:
+
+```python
+from lithic.types.transaction_monitoring.cases import CaseFile, FileStatus, UploadConstraints
+```
+
+Methods:
+
+- client.transaction_monitoring.cases.files.create(case_token, \*\*params) -> CaseFile
+- client.transaction_monitoring.cases.files.retrieve(file_token, \*, case_token) -> CaseFile
+- client.transaction_monitoring.cases.files.list(case_token, \*\*params) -> SyncCursorPage[CaseFile]
+- client.transaction_monitoring.cases.files.delete(file_token, \*, case_token) -> None
+
+## Queues
+
+Types:
+
+```python
+from lithic.types.transaction_monitoring import Queue
+```
+
+Methods:
+
+- client.transaction_monitoring.queues.create(\*\*params) -> Queue
+- client.transaction_monitoring.queues.retrieve(queue_token) -> Queue
+- client.transaction_monitoring.queues.update(queue_token, \*\*params) -> Queue
+- client.transaction_monitoring.queues.list(\*\*params) -> SyncCursorPage[Queue]
+- client.transaction_monitoring.queues.delete(queue_token) -> None
+
# AuthStreamEnrollment
Types:
diff --git a/pyproject.toml b/pyproject.toml
index 2bf23915..bb2dbd26 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "lithic"
-version = "0.125.0"
+version = "0.126.0"
description = "The official Python library for the lithic API"
dynamic = ["readme"]
license = "Apache-2.0"
diff --git a/src/lithic/_client.py b/src/lithic/_client.py
index f93c988c..15034895 100644
--- a/src/lithic/_client.py
+++ b/src/lithic/_client.py
@@ -73,6 +73,7 @@
management_operations,
auth_stream_enrollment,
external_bank_accounts,
+ transaction_monitoring,
tokenization_decisioning,
)
from .resources.holds import Holds, AsyncHolds
@@ -108,6 +109,10 @@
from .resources.credit_products.credit_products import CreditProducts, AsyncCreditProducts
from .resources.financial_accounts.financial_accounts import FinancialAccounts, AsyncFinancialAccounts
from .resources.external_bank_accounts.external_bank_accounts import ExternalBankAccounts, AsyncExternalBankAccounts
+ from .resources.transaction_monitoring.transaction_monitoring import (
+ TransactionMonitoring,
+ AsyncTransactionMonitoring,
+ )
__all__ = [
"ENVIRONMENTS",
@@ -241,6 +246,12 @@ def auth_rules(self) -> AuthRules:
return AuthRules(self)
+ @cached_property
+ def transaction_monitoring(self) -> TransactionMonitoring:
+ from .resources.transaction_monitoring import TransactionMonitoring
+
+ return TransactionMonitoring(self)
+
@cached_property
def auth_stream_enrollment(self) -> AuthStreamEnrollment:
from .resources.auth_stream_enrollment import AuthStreamEnrollment
@@ -671,6 +682,12 @@ def auth_rules(self) -> AsyncAuthRules:
return AsyncAuthRules(self)
+ @cached_property
+ def transaction_monitoring(self) -> AsyncTransactionMonitoring:
+ from .resources.transaction_monitoring import AsyncTransactionMonitoring
+
+ return AsyncTransactionMonitoring(self)
+
@cached_property
def auth_stream_enrollment(self) -> AsyncAuthStreamEnrollment:
from .resources.auth_stream_enrollment import AsyncAuthStreamEnrollment
@@ -1015,6 +1032,12 @@ def auth_rules(self) -> auth_rules.AuthRulesWithRawResponse:
return AuthRulesWithRawResponse(self._client.auth_rules)
+ @cached_property
+ def transaction_monitoring(self) -> transaction_monitoring.TransactionMonitoringWithRawResponse:
+ from .resources.transaction_monitoring import TransactionMonitoringWithRawResponse
+
+ return TransactionMonitoringWithRawResponse(self._client.transaction_monitoring)
+
@cached_property
def auth_stream_enrollment(self) -> auth_stream_enrollment.AuthStreamEnrollmentWithRawResponse:
from .resources.auth_stream_enrollment import AuthStreamEnrollmentWithRawResponse
@@ -1218,6 +1241,12 @@ def auth_rules(self) -> auth_rules.AsyncAuthRulesWithRawResponse:
return AsyncAuthRulesWithRawResponse(self._client.auth_rules)
+ @cached_property
+ def transaction_monitoring(self) -> transaction_monitoring.AsyncTransactionMonitoringWithRawResponse:
+ from .resources.transaction_monitoring import AsyncTransactionMonitoringWithRawResponse
+
+ return AsyncTransactionMonitoringWithRawResponse(self._client.transaction_monitoring)
+
@cached_property
def auth_stream_enrollment(self) -> auth_stream_enrollment.AsyncAuthStreamEnrollmentWithRawResponse:
from .resources.auth_stream_enrollment import AsyncAuthStreamEnrollmentWithRawResponse
@@ -1421,6 +1450,12 @@ def auth_rules(self) -> auth_rules.AuthRulesWithStreamingResponse:
return AuthRulesWithStreamingResponse(self._client.auth_rules)
+ @cached_property
+ def transaction_monitoring(self) -> transaction_monitoring.TransactionMonitoringWithStreamingResponse:
+ from .resources.transaction_monitoring import TransactionMonitoringWithStreamingResponse
+
+ return TransactionMonitoringWithStreamingResponse(self._client.transaction_monitoring)
+
@cached_property
def auth_stream_enrollment(self) -> auth_stream_enrollment.AuthStreamEnrollmentWithStreamingResponse:
from .resources.auth_stream_enrollment import AuthStreamEnrollmentWithStreamingResponse
@@ -1624,6 +1659,12 @@ def auth_rules(self) -> auth_rules.AsyncAuthRulesWithStreamingResponse:
return AsyncAuthRulesWithStreamingResponse(self._client.auth_rules)
+ @cached_property
+ def transaction_monitoring(self) -> transaction_monitoring.AsyncTransactionMonitoringWithStreamingResponse:
+ from .resources.transaction_monitoring import AsyncTransactionMonitoringWithStreamingResponse
+
+ return AsyncTransactionMonitoringWithStreamingResponse(self._client.transaction_monitoring)
+
@cached_property
def auth_stream_enrollment(self) -> auth_stream_enrollment.AsyncAuthStreamEnrollmentWithStreamingResponse:
from .resources.auth_stream_enrollment import AsyncAuthStreamEnrollmentWithStreamingResponse
diff --git a/src/lithic/_version.py b/src/lithic/_version.py
index dd6fbb88..9c42a542 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.125.0" # x-release-please-version
+__version__ = "0.126.0" # x-release-please-version
diff --git a/src/lithic/resources/__init__.py b/src/lithic/resources/__init__.py
index d37806d3..e0be6a24 100644
--- a/src/lithic/resources/__init__.py
+++ b/src/lithic/resources/__init__.py
@@ -249,6 +249,14 @@
ExternalBankAccountsWithStreamingResponse,
AsyncExternalBankAccountsWithStreamingResponse,
)
+from .transaction_monitoring import (
+ TransactionMonitoring,
+ AsyncTransactionMonitoring,
+ TransactionMonitoringWithRawResponse,
+ AsyncTransactionMonitoringWithRawResponse,
+ TransactionMonitoringWithStreamingResponse,
+ AsyncTransactionMonitoringWithStreamingResponse,
+)
from .tokenization_decisioning import (
TokenizationDecisioning,
AsyncTokenizationDecisioning,
@@ -277,6 +285,12 @@
"AsyncAuthRulesWithRawResponse",
"AuthRulesWithStreamingResponse",
"AsyncAuthRulesWithStreamingResponse",
+ "TransactionMonitoring",
+ "AsyncTransactionMonitoring",
+ "TransactionMonitoringWithRawResponse",
+ "AsyncTransactionMonitoringWithRawResponse",
+ "TransactionMonitoringWithStreamingResponse",
+ "AsyncTransactionMonitoringWithStreamingResponse",
"AuthStreamEnrollment",
"AsyncAuthStreamEnrollment",
"AuthStreamEnrollmentWithRawResponse",
diff --git a/src/lithic/resources/account_holders/entities.py b/src/lithic/resources/account_holders/entities.py
index 209780a4..d55ac0ea 100644
--- a/src/lithic/resources/account_holders/entities.py
+++ b/src/lithic/resources/account_holders/entities.py
@@ -2,8 +2,6 @@
from __future__ import annotations
-from typing_extensions import Literal
-
import httpx
from ... import _legacy_response
@@ -14,6 +12,8 @@
from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
from ..._base_client import make_request_options
from ...types.account_holders import entity_create_params
+from ...types.transaction_monitoring import EntityType
+from ...types.transaction_monitoring.entity_type import EntityType
from ...types.account_holders.account_holder_entity import AccountHolderEntity
from ...types.account_holders.entity_create_response import EntityCreateResponse
@@ -51,7 +51,7 @@ def create(
government_id: str,
last_name: str,
phone_number: str,
- type: Literal["BENEFICIAL_OWNER_INDIVIDUAL", "CONTROL_PERSON"],
+ type: EntityType,
# 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,
@@ -199,7 +199,7 @@ async def create(
government_id: str,
last_name: str,
phone_number: str,
- type: Literal["BENEFICIAL_OWNER_INDIVIDUAL", "CONTROL_PERSON"],
+ type: EntityType,
# 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,
diff --git a/src/lithic/resources/cards/cards.py b/src/lithic/resources/cards/cards.py
index 0ab13db6..41d0e592 100644
--- a/src/lithic/resources/cards/cards.py
+++ b/src/lithic/resources/cards/cards.py
@@ -1200,8 +1200,8 @@ def search_by_pan(
Customers must be PCI
compliant to use this endpoint. Please contact
- [support@lithic.com](mailto:support@lithic.com) for questions. _Note: this is a
- `POST` endpoint because it is more secure to send sensitive data in a request
+ [support.lithic.com](https://support.lithic.com/) for questions. _Note: this is
+ a `POST` endpoint because it is more secure to send sensitive data in a request
body than in a URL._
Args:
@@ -2428,8 +2428,8 @@ async def search_by_pan(
Customers must be PCI
compliant to use this endpoint. Please contact
- [support@lithic.com](mailto:support@lithic.com) for questions. _Note: this is a
- `POST` endpoint because it is more secure to send sensitive data in a request
+ [support.lithic.com](https://support.lithic.com/) for questions. _Note: this is
+ a `POST` endpoint because it is more secure to send sensitive data in a request
body than in a URL._
Args:
diff --git a/src/lithic/resources/transaction_monitoring/__init__.py b/src/lithic/resources/transaction_monitoring/__init__.py
new file mode 100644
index 00000000..c761a326
--- /dev/null
+++ b/src/lithic/resources/transaction_monitoring/__init__.py
@@ -0,0 +1,47 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .cases import (
+ Cases,
+ AsyncCases,
+ CasesWithRawResponse,
+ AsyncCasesWithRawResponse,
+ CasesWithStreamingResponse,
+ AsyncCasesWithStreamingResponse,
+)
+from .queues import (
+ Queues,
+ AsyncQueues,
+ QueuesWithRawResponse,
+ AsyncQueuesWithRawResponse,
+ QueuesWithStreamingResponse,
+ AsyncQueuesWithStreamingResponse,
+)
+from .transaction_monitoring import (
+ TransactionMonitoring,
+ AsyncTransactionMonitoring,
+ TransactionMonitoringWithRawResponse,
+ AsyncTransactionMonitoringWithRawResponse,
+ TransactionMonitoringWithStreamingResponse,
+ AsyncTransactionMonitoringWithStreamingResponse,
+)
+
+__all__ = [
+ "Cases",
+ "AsyncCases",
+ "CasesWithRawResponse",
+ "AsyncCasesWithRawResponse",
+ "CasesWithStreamingResponse",
+ "AsyncCasesWithStreamingResponse",
+ "Queues",
+ "AsyncQueues",
+ "QueuesWithRawResponse",
+ "AsyncQueuesWithRawResponse",
+ "QueuesWithStreamingResponse",
+ "AsyncQueuesWithStreamingResponse",
+ "TransactionMonitoring",
+ "AsyncTransactionMonitoring",
+ "TransactionMonitoringWithRawResponse",
+ "AsyncTransactionMonitoringWithRawResponse",
+ "TransactionMonitoringWithStreamingResponse",
+ "AsyncTransactionMonitoringWithStreamingResponse",
+]
diff --git a/src/lithic/resources/transaction_monitoring/cases/__init__.py b/src/lithic/resources/transaction_monitoring/cases/__init__.py
new file mode 100644
index 00000000..9d7608be
--- /dev/null
+++ b/src/lithic/resources/transaction_monitoring/cases/__init__.py
@@ -0,0 +1,47 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from .cases import (
+ Cases,
+ AsyncCases,
+ CasesWithRawResponse,
+ AsyncCasesWithRawResponse,
+ CasesWithStreamingResponse,
+ AsyncCasesWithStreamingResponse,
+)
+from .files import (
+ Files,
+ AsyncFiles,
+ FilesWithRawResponse,
+ AsyncFilesWithRawResponse,
+ FilesWithStreamingResponse,
+ AsyncFilesWithStreamingResponse,
+)
+from .comments import (
+ Comments,
+ AsyncComments,
+ CommentsWithRawResponse,
+ AsyncCommentsWithRawResponse,
+ CommentsWithStreamingResponse,
+ AsyncCommentsWithStreamingResponse,
+)
+
+__all__ = [
+ "Comments",
+ "AsyncComments",
+ "CommentsWithRawResponse",
+ "AsyncCommentsWithRawResponse",
+ "CommentsWithStreamingResponse",
+ "AsyncCommentsWithStreamingResponse",
+ "Files",
+ "AsyncFiles",
+ "FilesWithRawResponse",
+ "AsyncFilesWithRawResponse",
+ "FilesWithStreamingResponse",
+ "AsyncFilesWithStreamingResponse",
+ "Cases",
+ "AsyncCases",
+ "CasesWithRawResponse",
+ "AsyncCasesWithRawResponse",
+ "CasesWithStreamingResponse",
+ "AsyncCasesWithStreamingResponse",
+]
diff --git a/src/lithic/resources/transaction_monitoring/cases/cases.py b/src/lithic/resources/transaction_monitoring/cases/cases.py
new file mode 100644
index 00000000..3152b2e1
--- /dev/null
+++ b/src/lithic/resources/transaction_monitoring/cases/cases.py
@@ -0,0 +1,983 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from datetime import datetime
+
+import httpx
+
+from .... import _legacy_response
+from .files import (
+ Files,
+ AsyncFiles,
+ FilesWithRawResponse,
+ AsyncFilesWithRawResponse,
+ FilesWithStreamingResponse,
+ AsyncFilesWithStreamingResponse,
+)
+from .comments import (
+ Comments,
+ AsyncComments,
+ CommentsWithRawResponse,
+ AsyncCommentsWithRawResponse,
+ CommentsWithStreamingResponse,
+ AsyncCommentsWithStreamingResponse,
+)
+from ...._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
+from ...._utils import path_template, maybe_transform, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
+from ....pagination import SyncCursorPage, AsyncCursorPage
+from ...._base_client import AsyncPaginator, make_request_options
+from ....types.transaction_monitoring import (
+ CaseStatus,
+ CasePriority,
+ CaseSortOrder,
+ ResolutionOutcome,
+ case_list_params,
+ case_update_params,
+ case_list_activity_params,
+ case_list_transactions_params,
+)
+from ....types.transaction_monitoring.case_status import CaseStatus
+from ....types.transaction_monitoring.case_priority import CasePriority
+from ....types.transaction_monitoring.case_sort_order import CaseSortOrder
+from ....types.transaction_monitoring.monitoring_case import MonitoringCase
+from ....types.transaction_monitoring.case_transaction import CaseTransaction
+from ....types.transaction_monitoring.resolution_outcome import ResolutionOutcome
+from ....types.transaction_monitoring.case_activity_entry import CaseActivityEntry
+from ....types.transaction_monitoring.case_retrieve_cards_response import CaseRetrieveCardsResponse
+
+__all__ = ["Cases", "AsyncCases"]
+
+
+class Cases(SyncAPIResource):
+ @cached_property
+ def comments(self) -> Comments:
+ return Comments(self._client)
+
+ @cached_property
+ def files(self) -> Files:
+ return Files(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> CasesWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return CasesWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> CasesWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return CasesWithStreamingResponse(self)
+
+ def retrieve(
+ self,
+ case_token: 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,
+ ) -> MonitoringCase:
+ """
+ Retrieves a single transaction monitoring case.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._get(
+ path_template("/v1/transaction_monitoring/cases/{case_token}", case_token=case_token),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=MonitoringCase,
+ )
+
+ def update(
+ self,
+ case_token: str,
+ *,
+ actor_token: str | Omit = omit,
+ assignee: Optional[str] | Omit = omit,
+ priority: CasePriority | Omit = omit,
+ resolution: ResolutionOutcome | Omit = omit,
+ resolution_notes: str | Omit = omit,
+ sla_deadline: Union[str, datetime, None] | Omit = omit,
+ status: CaseStatus | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
+ title: Optional[str] | Omit = omit,
+ # 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,
+ ) -> MonitoringCase:
+ """
+ Updates a transaction monitoring case.
+
+ Args:
+ actor_token: Optional client-provided identifier for the actor performing this action,
+ recorded on the resulting activity entry. This value is supplied by the client
+ (for example, your own internal user ID) and is not authenticated by Lithic
+
+ assignee: New assignee for the case, or `null` to unassign
+
+ priority: Priority level of a case, controlling queue ordering and SLA urgency
+
+ resolution:
+ Outcome recorded when a case is resolved:
+
+ - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent
+ - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud
+ - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false
+ positive
+ - `NO_ACTION_REQUIRED` - No further action is required
+ - `ESCALATED_EXTERNAL` - The case was escalated to an external party
+
+ resolution_notes: Notes describing the resolution
+
+ sla_deadline: New SLA deadline for the case, or `null` to clear it
+
+ status:
+ Status of a case as it progresses through the review workflow:
+
+ - `OPEN` - The case has been created and is still collecting matching
+ transactions
+ - `ASSIGNED` - An analyst has been assigned and transaction collection has
+ stopped
+ - `IN_REVIEW` - The case is actively being investigated
+ - `ESCALATED` - The case has been reviewed and requires additional oversight
+ - `RESOLVED` - A determination has been made and a resolution recorded
+ - `CLOSED` - The case is finalized
+
+ tags: Arbitrary key-value metadata to set on the case
+
+ title: New title for the case, or `null` to clear it
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._patch(
+ path_template("/v1/transaction_monitoring/cases/{case_token}", case_token=case_token),
+ body=maybe_transform(
+ {
+ "actor_token": actor_token,
+ "assignee": assignee,
+ "priority": priority,
+ "resolution": resolution,
+ "resolution_notes": resolution_notes,
+ "sla_deadline": sla_deadline,
+ "status": status,
+ "tags": tags,
+ "title": title,
+ },
+ case_update_params.CaseUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=MonitoringCase,
+ )
+
+ def list(
+ self,
+ *,
+ account_token: str | Omit = omit,
+ assignee: str | Omit = omit,
+ begin: Union[str, datetime] | Omit = omit,
+ card_token: str | Omit = omit,
+ end: Union[str, datetime] | Omit = omit,
+ ending_before: str | Omit = omit,
+ entity_token: str | Omit = omit,
+ page_size: int | Omit = omit,
+ queue_token: str | Omit = omit,
+ rule_token: str | Omit = omit,
+ sort_by: CaseSortOrder | Omit = omit,
+ starting_after: str | Omit = omit,
+ status: CaseStatus | Omit = omit,
+ transaction_token: str | Omit = omit,
+ # 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,
+ ) -> SyncCursorPage[MonitoringCase]:
+ """
+ Lists transaction monitoring cases, optionally filtered.
+
+ Args:
+ account_token: Only return cases that include transactions on the provided account.
+
+ assignee: Only return cases assigned to the provided value. Pass an empty string to return
+ only unassigned cases.
+
+ begin: Date string in RFC 3339 format. Only entries created after the specified time
+ will be included. UTC time zone.
+
+ card_token: Only return cases that include transactions on the provided card.
+
+ end: Date string in RFC 3339 format. Only entries created before the specified time
+ will be included. UTC time zone.
+
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ entity_token: Only return cases associated with the provided entity.
+
+ page_size: Page size (for pagination).
+
+ queue_token: Only return cases belonging to the provided queue.
+
+ rule_token: Only return cases triggered by the provided transaction monitoring rule.
+
+ sort_by: Sort order for the returned cases.
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ status: Only return cases with the provided status.
+
+ transaction_token: Only return cases that include the provided 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
+ """
+ return self._get_api_list(
+ "/v1/transaction_monitoring/cases",
+ page=SyncCursorPage[MonitoringCase],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "account_token": account_token,
+ "assignee": assignee,
+ "begin": begin,
+ "card_token": card_token,
+ "end": end,
+ "ending_before": ending_before,
+ "entity_token": entity_token,
+ "page_size": page_size,
+ "queue_token": queue_token,
+ "rule_token": rule_token,
+ "sort_by": sort_by,
+ "starting_after": starting_after,
+ "status": status,
+ "transaction_token": transaction_token,
+ },
+ case_list_params.CaseListParams,
+ ),
+ ),
+ model=MonitoringCase,
+ )
+
+ def list_activity(
+ self,
+ case_token: str,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ # 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,
+ ) -> SyncCursorPage[CaseActivityEntry]:
+ """
+ Lists the activity feed for a case.
+
+ Args:
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._get_api_list(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/activity", case_token=case_token),
+ page=SyncCursorPage[CaseActivityEntry],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ },
+ case_list_activity_params.CaseListActivityParams,
+ ),
+ ),
+ model=CaseActivityEntry,
+ )
+
+ def list_transactions(
+ self,
+ case_token: str,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ # 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,
+ ) -> SyncCursorPage[CaseTransaction]:
+ """
+ Lists the transactions associated with a case.
+
+ Args:
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._get_api_list(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/transactions", case_token=case_token),
+ page=SyncCursorPage[CaseTransaction],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ },
+ case_list_transactions_params.CaseListTransactionsParams,
+ ),
+ ),
+ model=CaseTransaction,
+ )
+
+ def retrieve_cards(
+ self,
+ case_token: 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,
+ ) -> CaseRetrieveCardsResponse:
+ """
+ Lists the cards involved in a case, with per-card transaction counts.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._get(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/cards", case_token=case_token),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseRetrieveCardsResponse,
+ )
+
+
+class AsyncCases(AsyncAPIResource):
+ @cached_property
+ def comments(self) -> AsyncComments:
+ return AsyncComments(self._client)
+
+ @cached_property
+ def files(self) -> AsyncFiles:
+ return AsyncFiles(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncCasesWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncCasesWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncCasesWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return AsyncCasesWithStreamingResponse(self)
+
+ async def retrieve(
+ self,
+ case_token: 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,
+ ) -> MonitoringCase:
+ """
+ Retrieves a single transaction monitoring case.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return await self._get(
+ path_template("/v1/transaction_monitoring/cases/{case_token}", case_token=case_token),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=MonitoringCase,
+ )
+
+ async def update(
+ self,
+ case_token: str,
+ *,
+ actor_token: str | Omit = omit,
+ assignee: Optional[str] | Omit = omit,
+ priority: CasePriority | Omit = omit,
+ resolution: ResolutionOutcome | Omit = omit,
+ resolution_notes: str | Omit = omit,
+ sla_deadline: Union[str, datetime, None] | Omit = omit,
+ status: CaseStatus | Omit = omit,
+ tags: Dict[str, str] | Omit = omit,
+ title: Optional[str] | Omit = omit,
+ # 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,
+ ) -> MonitoringCase:
+ """
+ Updates a transaction monitoring case.
+
+ Args:
+ actor_token: Optional client-provided identifier for the actor performing this action,
+ recorded on the resulting activity entry. This value is supplied by the client
+ (for example, your own internal user ID) and is not authenticated by Lithic
+
+ assignee: New assignee for the case, or `null` to unassign
+
+ priority: Priority level of a case, controlling queue ordering and SLA urgency
+
+ resolution:
+ Outcome recorded when a case is resolved:
+
+ - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent
+ - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud
+ - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false
+ positive
+ - `NO_ACTION_REQUIRED` - No further action is required
+ - `ESCALATED_EXTERNAL` - The case was escalated to an external party
+
+ resolution_notes: Notes describing the resolution
+
+ sla_deadline: New SLA deadline for the case, or `null` to clear it
+
+ status:
+ Status of a case as it progresses through the review workflow:
+
+ - `OPEN` - The case has been created and is still collecting matching
+ transactions
+ - `ASSIGNED` - An analyst has been assigned and transaction collection has
+ stopped
+ - `IN_REVIEW` - The case is actively being investigated
+ - `ESCALATED` - The case has been reviewed and requires additional oversight
+ - `RESOLVED` - A determination has been made and a resolution recorded
+ - `CLOSED` - The case is finalized
+
+ tags: Arbitrary key-value metadata to set on the case
+
+ title: New title for the case, or `null` to clear it
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return await self._patch(
+ path_template("/v1/transaction_monitoring/cases/{case_token}", case_token=case_token),
+ body=await async_maybe_transform(
+ {
+ "actor_token": actor_token,
+ "assignee": assignee,
+ "priority": priority,
+ "resolution": resolution,
+ "resolution_notes": resolution_notes,
+ "sla_deadline": sla_deadline,
+ "status": status,
+ "tags": tags,
+ "title": title,
+ },
+ case_update_params.CaseUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=MonitoringCase,
+ )
+
+ def list(
+ self,
+ *,
+ account_token: str | Omit = omit,
+ assignee: str | Omit = omit,
+ begin: Union[str, datetime] | Omit = omit,
+ card_token: str | Omit = omit,
+ end: Union[str, datetime] | Omit = omit,
+ ending_before: str | Omit = omit,
+ entity_token: str | Omit = omit,
+ page_size: int | Omit = omit,
+ queue_token: str | Omit = omit,
+ rule_token: str | Omit = omit,
+ sort_by: CaseSortOrder | Omit = omit,
+ starting_after: str | Omit = omit,
+ status: CaseStatus | Omit = omit,
+ transaction_token: str | Omit = omit,
+ # 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[MonitoringCase, AsyncCursorPage[MonitoringCase]]:
+ """
+ Lists transaction monitoring cases, optionally filtered.
+
+ Args:
+ account_token: Only return cases that include transactions on the provided account.
+
+ assignee: Only return cases assigned to the provided value. Pass an empty string to return
+ only unassigned cases.
+
+ begin: Date string in RFC 3339 format. Only entries created after the specified time
+ will be included. UTC time zone.
+
+ card_token: Only return cases that include transactions on the provided card.
+
+ end: Date string in RFC 3339 format. Only entries created before the specified time
+ will be included. UTC time zone.
+
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ entity_token: Only return cases associated with the provided entity.
+
+ page_size: Page size (for pagination).
+
+ queue_token: Only return cases belonging to the provided queue.
+
+ rule_token: Only return cases triggered by the provided transaction monitoring rule.
+
+ sort_by: Sort order for the returned cases.
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ status: Only return cases with the provided status.
+
+ transaction_token: Only return cases that include the provided 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
+ """
+ return self._get_api_list(
+ "/v1/transaction_monitoring/cases",
+ page=AsyncCursorPage[MonitoringCase],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "account_token": account_token,
+ "assignee": assignee,
+ "begin": begin,
+ "card_token": card_token,
+ "end": end,
+ "ending_before": ending_before,
+ "entity_token": entity_token,
+ "page_size": page_size,
+ "queue_token": queue_token,
+ "rule_token": rule_token,
+ "sort_by": sort_by,
+ "starting_after": starting_after,
+ "status": status,
+ "transaction_token": transaction_token,
+ },
+ case_list_params.CaseListParams,
+ ),
+ ),
+ model=MonitoringCase,
+ )
+
+ def list_activity(
+ self,
+ case_token: str,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ # 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[CaseActivityEntry, AsyncCursorPage[CaseActivityEntry]]:
+ """
+ Lists the activity feed for a case.
+
+ Args:
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._get_api_list(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/activity", case_token=case_token),
+ page=AsyncCursorPage[CaseActivityEntry],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ },
+ case_list_activity_params.CaseListActivityParams,
+ ),
+ ),
+ model=CaseActivityEntry,
+ )
+
+ def list_transactions(
+ self,
+ case_token: str,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ # 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[CaseTransaction, AsyncCursorPage[CaseTransaction]]:
+ """
+ Lists the transactions associated with a case.
+
+ Args:
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._get_api_list(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/transactions", case_token=case_token),
+ page=AsyncCursorPage[CaseTransaction],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ },
+ case_list_transactions_params.CaseListTransactionsParams,
+ ),
+ ),
+ model=CaseTransaction,
+ )
+
+ async def retrieve_cards(
+ self,
+ case_token: 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,
+ ) -> CaseRetrieveCardsResponse:
+ """
+ Lists the cards involved in a case, with per-card transaction counts.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return await self._get(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/cards", case_token=case_token),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseRetrieveCardsResponse,
+ )
+
+
+class CasesWithRawResponse:
+ def __init__(self, cases: Cases) -> None:
+ self._cases = cases
+
+ self.retrieve = _legacy_response.to_raw_response_wrapper(
+ cases.retrieve,
+ )
+ self.update = _legacy_response.to_raw_response_wrapper(
+ cases.update,
+ )
+ self.list = _legacy_response.to_raw_response_wrapper(
+ cases.list,
+ )
+ self.list_activity = _legacy_response.to_raw_response_wrapper(
+ cases.list_activity,
+ )
+ self.list_transactions = _legacy_response.to_raw_response_wrapper(
+ cases.list_transactions,
+ )
+ self.retrieve_cards = _legacy_response.to_raw_response_wrapper(
+ cases.retrieve_cards,
+ )
+
+ @cached_property
+ def comments(self) -> CommentsWithRawResponse:
+ return CommentsWithRawResponse(self._cases.comments)
+
+ @cached_property
+ def files(self) -> FilesWithRawResponse:
+ return FilesWithRawResponse(self._cases.files)
+
+
+class AsyncCasesWithRawResponse:
+ def __init__(self, cases: AsyncCases) -> None:
+ self._cases = cases
+
+ self.retrieve = _legacy_response.async_to_raw_response_wrapper(
+ cases.retrieve,
+ )
+ self.update = _legacy_response.async_to_raw_response_wrapper(
+ cases.update,
+ )
+ self.list = _legacy_response.async_to_raw_response_wrapper(
+ cases.list,
+ )
+ self.list_activity = _legacy_response.async_to_raw_response_wrapper(
+ cases.list_activity,
+ )
+ self.list_transactions = _legacy_response.async_to_raw_response_wrapper(
+ cases.list_transactions,
+ )
+ self.retrieve_cards = _legacy_response.async_to_raw_response_wrapper(
+ cases.retrieve_cards,
+ )
+
+ @cached_property
+ def comments(self) -> AsyncCommentsWithRawResponse:
+ return AsyncCommentsWithRawResponse(self._cases.comments)
+
+ @cached_property
+ def files(self) -> AsyncFilesWithRawResponse:
+ return AsyncFilesWithRawResponse(self._cases.files)
+
+
+class CasesWithStreamingResponse:
+ def __init__(self, cases: Cases) -> None:
+ self._cases = cases
+
+ self.retrieve = to_streamed_response_wrapper(
+ cases.retrieve,
+ )
+ self.update = to_streamed_response_wrapper(
+ cases.update,
+ )
+ self.list = to_streamed_response_wrapper(
+ cases.list,
+ )
+ self.list_activity = to_streamed_response_wrapper(
+ cases.list_activity,
+ )
+ self.list_transactions = to_streamed_response_wrapper(
+ cases.list_transactions,
+ )
+ self.retrieve_cards = to_streamed_response_wrapper(
+ cases.retrieve_cards,
+ )
+
+ @cached_property
+ def comments(self) -> CommentsWithStreamingResponse:
+ return CommentsWithStreamingResponse(self._cases.comments)
+
+ @cached_property
+ def files(self) -> FilesWithStreamingResponse:
+ return FilesWithStreamingResponse(self._cases.files)
+
+
+class AsyncCasesWithStreamingResponse:
+ def __init__(self, cases: AsyncCases) -> None:
+ self._cases = cases
+
+ self.retrieve = async_to_streamed_response_wrapper(
+ cases.retrieve,
+ )
+ self.update = async_to_streamed_response_wrapper(
+ cases.update,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ cases.list,
+ )
+ self.list_activity = async_to_streamed_response_wrapper(
+ cases.list_activity,
+ )
+ self.list_transactions = async_to_streamed_response_wrapper(
+ cases.list_transactions,
+ )
+ self.retrieve_cards = async_to_streamed_response_wrapper(
+ cases.retrieve_cards,
+ )
+
+ @cached_property
+ def comments(self) -> AsyncCommentsWithStreamingResponse:
+ return AsyncCommentsWithStreamingResponse(self._cases.comments)
+
+ @cached_property
+ def files(self) -> AsyncFilesWithStreamingResponse:
+ return AsyncFilesWithStreamingResponse(self._cases.files)
diff --git a/src/lithic/resources/transaction_monitoring/cases/comments.py b/src/lithic/resources/transaction_monitoring/cases/comments.py
new file mode 100644
index 00000000..1bb046e1
--- /dev/null
+++ b/src/lithic/resources/transaction_monitoring/cases/comments.py
@@ -0,0 +1,405 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from .... import _legacy_response
+from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
+from ...._utils import path_template, maybe_transform, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
+from ...._base_client import make_request_options
+from ....types.transaction_monitoring.cases import comment_create_params, comment_update_params
+from ....types.transaction_monitoring.case_activity_entry import CaseActivityEntry
+
+__all__ = ["Comments", "AsyncComments"]
+
+
+class Comments(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> CommentsWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return CommentsWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> CommentsWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return CommentsWithStreamingResponse(self)
+
+ def create(
+ self,
+ case_token: str,
+ *,
+ comment: str,
+ actor_token: str | Omit = omit,
+ # 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,
+ ) -> CaseActivityEntry:
+ """
+ Adds a comment to a case.
+
+ Args:
+ comment: Text of the comment
+
+ actor_token: Optional client-provided identifier for the actor performing this action,
+ recorded on the resulting activity entry. This value is supplied by the client
+ (for example, your own internal user ID) and is not authenticated by Lithic
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._post(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/comments", case_token=case_token),
+ body=maybe_transform(
+ {
+ "comment": comment,
+ "actor_token": actor_token,
+ },
+ comment_create_params.CommentCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseActivityEntry,
+ )
+
+ def update(
+ self,
+ comment_token: str,
+ *,
+ case_token: str,
+ comment: str,
+ actor_token: str | Omit = omit,
+ # 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,
+ ) -> CaseActivityEntry:
+ """
+ Edits an existing comment on a case.
+
+ Args:
+ comment: New text of the comment
+
+ actor_token: Optional client-provided identifier for the actor performing this action,
+ recorded on the resulting activity entry. This value is supplied by the client
+ (for example, your own internal user ID) and is not authenticated by Lithic
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ if not comment_token:
+ raise ValueError(f"Expected a non-empty value for `comment_token` but received {comment_token!r}")
+ return self._patch(
+ path_template(
+ "/v1/transaction_monitoring/cases/{case_token}/comments/{comment_token}",
+ case_token=case_token,
+ comment_token=comment_token,
+ ),
+ body=maybe_transform(
+ {
+ "comment": comment,
+ "actor_token": actor_token,
+ },
+ comment_update_params.CommentUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseActivityEntry,
+ )
+
+ def delete(
+ self,
+ comment_token: str,
+ *,
+ case_token: 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,
+ ) -> None:
+ """
+ Deletes a comment from a case.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ if not comment_token:
+ raise ValueError(f"Expected a non-empty value for `comment_token` but received {comment_token!r}")
+ return self._delete(
+ path_template(
+ "/v1/transaction_monitoring/cases/{case_token}/comments/{comment_token}",
+ case_token=case_token,
+ comment_token=comment_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class AsyncComments(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncCommentsWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncCommentsWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncCommentsWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return AsyncCommentsWithStreamingResponse(self)
+
+ async def create(
+ self,
+ case_token: str,
+ *,
+ comment: str,
+ actor_token: str | Omit = omit,
+ # 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,
+ ) -> CaseActivityEntry:
+ """
+ Adds a comment to a case.
+
+ Args:
+ comment: Text of the comment
+
+ actor_token: Optional client-provided identifier for the actor performing this action,
+ recorded on the resulting activity entry. This value is supplied by the client
+ (for example, your own internal user ID) and is not authenticated by Lithic
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return await self._post(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/comments", case_token=case_token),
+ body=await async_maybe_transform(
+ {
+ "comment": comment,
+ "actor_token": actor_token,
+ },
+ comment_create_params.CommentCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseActivityEntry,
+ )
+
+ async def update(
+ self,
+ comment_token: str,
+ *,
+ case_token: str,
+ comment: str,
+ actor_token: str | Omit = omit,
+ # 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,
+ ) -> CaseActivityEntry:
+ """
+ Edits an existing comment on a case.
+
+ Args:
+ comment: New text of the comment
+
+ actor_token: Optional client-provided identifier for the actor performing this action,
+ recorded on the resulting activity entry. This value is supplied by the client
+ (for example, your own internal user ID) and is not authenticated by Lithic
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ if not comment_token:
+ raise ValueError(f"Expected a non-empty value for `comment_token` but received {comment_token!r}")
+ return await self._patch(
+ path_template(
+ "/v1/transaction_monitoring/cases/{case_token}/comments/{comment_token}",
+ case_token=case_token,
+ comment_token=comment_token,
+ ),
+ body=await async_maybe_transform(
+ {
+ "comment": comment,
+ "actor_token": actor_token,
+ },
+ comment_update_params.CommentUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseActivityEntry,
+ )
+
+ async def delete(
+ self,
+ comment_token: str,
+ *,
+ case_token: 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,
+ ) -> None:
+ """
+ Deletes a comment from a case.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ if not comment_token:
+ raise ValueError(f"Expected a non-empty value for `comment_token` but received {comment_token!r}")
+ return await self._delete(
+ path_template(
+ "/v1/transaction_monitoring/cases/{case_token}/comments/{comment_token}",
+ case_token=case_token,
+ comment_token=comment_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class CommentsWithRawResponse:
+ def __init__(self, comments: Comments) -> None:
+ self._comments = comments
+
+ self.create = _legacy_response.to_raw_response_wrapper(
+ comments.create,
+ )
+ self.update = _legacy_response.to_raw_response_wrapper(
+ comments.update,
+ )
+ self.delete = _legacy_response.to_raw_response_wrapper(
+ comments.delete,
+ )
+
+
+class AsyncCommentsWithRawResponse:
+ def __init__(self, comments: AsyncComments) -> None:
+ self._comments = comments
+
+ self.create = _legacy_response.async_to_raw_response_wrapper(
+ comments.create,
+ )
+ self.update = _legacy_response.async_to_raw_response_wrapper(
+ comments.update,
+ )
+ self.delete = _legacy_response.async_to_raw_response_wrapper(
+ comments.delete,
+ )
+
+
+class CommentsWithStreamingResponse:
+ def __init__(self, comments: Comments) -> None:
+ self._comments = comments
+
+ self.create = to_streamed_response_wrapper(
+ comments.create,
+ )
+ self.update = to_streamed_response_wrapper(
+ comments.update,
+ )
+ self.delete = to_streamed_response_wrapper(
+ comments.delete,
+ )
+
+
+class AsyncCommentsWithStreamingResponse:
+ def __init__(self, comments: AsyncComments) -> None:
+ self._comments = comments
+
+ self.create = async_to_streamed_response_wrapper(
+ comments.create,
+ )
+ self.update = async_to_streamed_response_wrapper(
+ comments.update,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ comments.delete,
+ )
diff --git a/src/lithic/resources/transaction_monitoring/cases/files.py b/src/lithic/resources/transaction_monitoring/cases/files.py
new file mode 100644
index 00000000..8846b4ad
--- /dev/null
+++ b/src/lithic/resources/transaction_monitoring/cases/files.py
@@ -0,0 +1,482 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+import httpx
+
+from .... import _legacy_response
+from ...._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
+from ...._utils import path_template, maybe_transform, async_maybe_transform
+from ...._compat import cached_property
+from ...._resource import SyncAPIResource, AsyncAPIResource
+from ...._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
+from ....pagination import SyncCursorPage, AsyncCursorPage
+from ...._base_client import AsyncPaginator, make_request_options
+from ....types.transaction_monitoring.cases import file_list_params, file_create_params
+from ....types.transaction_monitoring.cases.case_file import CaseFile
+
+__all__ = ["Files", "AsyncFiles"]
+
+
+class Files(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> FilesWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return FilesWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> FilesWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return FilesWithStreamingResponse(self)
+
+ def create(
+ self,
+ case_token: str,
+ *,
+ name: 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,
+ ) -> CaseFile:
+ """
+ Creates a file record and returns a presigned URL for uploading the file to the
+ case.
+
+ Args:
+ name: Name of the file to upload
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._post(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/files", case_token=case_token),
+ body=maybe_transform({"name": name}, file_create_params.FileCreateParams),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseFile,
+ )
+
+ def retrieve(
+ self,
+ file_token: str,
+ *,
+ case_token: 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,
+ ) -> CaseFile:
+ """
+ Retrieves a single file attached to a case, including a presigned download URL
+ when the file is ready.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ if not file_token:
+ raise ValueError(f"Expected a non-empty value for `file_token` but received {file_token!r}")
+ return self._get(
+ path_template(
+ "/v1/transaction_monitoring/cases/{case_token}/files/{file_token}",
+ case_token=case_token,
+ file_token=file_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseFile,
+ )
+
+ def list(
+ self,
+ case_token: str,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ # 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,
+ ) -> SyncCursorPage[CaseFile]:
+ """
+ Lists the files attached to a case.
+
+ Args:
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._get_api_list(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/files", case_token=case_token),
+ page=SyncCursorPage[CaseFile],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ },
+ file_list_params.FileListParams,
+ ),
+ ),
+ model=CaseFile,
+ )
+
+ def delete(
+ self,
+ file_token: str,
+ *,
+ case_token: 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,
+ ) -> None:
+ """
+ Deletes a file from a case.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ if not file_token:
+ raise ValueError(f"Expected a non-empty value for `file_token` but received {file_token!r}")
+ return self._delete(
+ path_template(
+ "/v1/transaction_monitoring/cases/{case_token}/files/{file_token}",
+ case_token=case_token,
+ file_token=file_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class AsyncFiles(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncFilesWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncFilesWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncFilesWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return AsyncFilesWithStreamingResponse(self)
+
+ async def create(
+ self,
+ case_token: str,
+ *,
+ name: 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,
+ ) -> CaseFile:
+ """
+ Creates a file record and returns a presigned URL for uploading the file to the
+ case.
+
+ Args:
+ name: Name of the file to upload
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return await self._post(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/files", case_token=case_token),
+ body=await async_maybe_transform({"name": name}, file_create_params.FileCreateParams),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseFile,
+ )
+
+ async def retrieve(
+ self,
+ file_token: str,
+ *,
+ case_token: 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,
+ ) -> CaseFile:
+ """
+ Retrieves a single file attached to a case, including a presigned download URL
+ when the file is ready.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ if not file_token:
+ raise ValueError(f"Expected a non-empty value for `file_token` but received {file_token!r}")
+ return await self._get(
+ path_template(
+ "/v1/transaction_monitoring/cases/{case_token}/files/{file_token}",
+ case_token=case_token,
+ file_token=file_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=CaseFile,
+ )
+
+ def list(
+ self,
+ case_token: str,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ # 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[CaseFile, AsyncCursorPage[CaseFile]]:
+ """
+ Lists the files attached to a case.
+
+ Args:
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ return self._get_api_list(
+ path_template("/v1/transaction_monitoring/cases/{case_token}/files", case_token=case_token),
+ page=AsyncCursorPage[CaseFile],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ },
+ file_list_params.FileListParams,
+ ),
+ ),
+ model=CaseFile,
+ )
+
+ async def delete(
+ self,
+ file_token: str,
+ *,
+ case_token: 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,
+ ) -> None:
+ """
+ Deletes a file from a case.
+
+ Args:
+ 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 case_token:
+ raise ValueError(f"Expected a non-empty value for `case_token` but received {case_token!r}")
+ if not file_token:
+ raise ValueError(f"Expected a non-empty value for `file_token` but received {file_token!r}")
+ return await self._delete(
+ path_template(
+ "/v1/transaction_monitoring/cases/{case_token}/files/{file_token}",
+ case_token=case_token,
+ file_token=file_token,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class FilesWithRawResponse:
+ def __init__(self, files: Files) -> None:
+ self._files = files
+
+ self.create = _legacy_response.to_raw_response_wrapper(
+ files.create,
+ )
+ self.retrieve = _legacy_response.to_raw_response_wrapper(
+ files.retrieve,
+ )
+ self.list = _legacy_response.to_raw_response_wrapper(
+ files.list,
+ )
+ self.delete = _legacy_response.to_raw_response_wrapper(
+ files.delete,
+ )
+
+
+class AsyncFilesWithRawResponse:
+ def __init__(self, files: AsyncFiles) -> None:
+ self._files = files
+
+ self.create = _legacy_response.async_to_raw_response_wrapper(
+ files.create,
+ )
+ self.retrieve = _legacy_response.async_to_raw_response_wrapper(
+ files.retrieve,
+ )
+ self.list = _legacy_response.async_to_raw_response_wrapper(
+ files.list,
+ )
+ self.delete = _legacy_response.async_to_raw_response_wrapper(
+ files.delete,
+ )
+
+
+class FilesWithStreamingResponse:
+ def __init__(self, files: Files) -> None:
+ self._files = files
+
+ self.create = to_streamed_response_wrapper(
+ files.create,
+ )
+ self.retrieve = to_streamed_response_wrapper(
+ files.retrieve,
+ )
+ self.list = to_streamed_response_wrapper(
+ files.list,
+ )
+ self.delete = to_streamed_response_wrapper(
+ files.delete,
+ )
+
+
+class AsyncFilesWithStreamingResponse:
+ def __init__(self, files: AsyncFiles) -> None:
+ self._files = files
+
+ self.create = async_to_streamed_response_wrapper(
+ files.create,
+ )
+ self.retrieve = async_to_streamed_response_wrapper(
+ files.retrieve,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ files.list,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ files.delete,
+ )
diff --git a/src/lithic/resources/transaction_monitoring/queues.py b/src/lithic/resources/transaction_monitoring/queues.py
new file mode 100644
index 00000000..34eee609
--- /dev/null
+++ b/src/lithic/resources/transaction_monitoring/queues.py
@@ -0,0 +1,562 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+
+import httpx
+
+from ... import _legacy_response
+from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, omit, not_given
+from ..._utils import path_template, maybe_transform, async_maybe_transform
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper
+from ...pagination import SyncCursorPage, AsyncCursorPage
+from ..._base_client import AsyncPaginator, make_request_options
+from ...types.transaction_monitoring import queue_list_params, queue_create_params, queue_update_params
+from ...types.transaction_monitoring.queue import Queue
+
+__all__ = ["Queues", "AsyncQueues"]
+
+
+class Queues(SyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> QueuesWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return QueuesWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> QueuesWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return QueuesWithStreamingResponse(self)
+
+ def create(
+ self,
+ *,
+ name: str,
+ description: Optional[str] | Omit = omit,
+ # 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,
+ ) -> Queue:
+ """
+ Creates a new queue for grouping transaction monitoring cases.
+
+ Args:
+ name: Human-readable name of the queue
+
+ description: Optional description of the queue
+
+ 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/transaction_monitoring/queues",
+ body=maybe_transform(
+ {
+ "name": name,
+ "description": description,
+ },
+ queue_create_params.QueueCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=Queue,
+ )
+
+ def retrieve(
+ self,
+ queue_token: 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,
+ ) -> Queue:
+ """
+ Retrieves a single transaction monitoring queue.
+
+ Args:
+ 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 queue_token:
+ raise ValueError(f"Expected a non-empty value for `queue_token` but received {queue_token!r}")
+ return self._get(
+ path_template("/v1/transaction_monitoring/queues/{queue_token}", queue_token=queue_token),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=Queue,
+ )
+
+ def update(
+ self,
+ queue_token: str,
+ *,
+ description: Optional[str] | Omit = omit,
+ name: str | Omit = omit,
+ # 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,
+ ) -> Queue:
+ """
+ Updates a transaction monitoring queue.
+
+ Args:
+ description: New description for the queue, or `null` to clear it
+
+ name: New name for the queue
+
+ 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 queue_token:
+ raise ValueError(f"Expected a non-empty value for `queue_token` but received {queue_token!r}")
+ return self._patch(
+ path_template("/v1/transaction_monitoring/queues/{queue_token}", queue_token=queue_token),
+ body=maybe_transform(
+ {
+ "description": description,
+ "name": name,
+ },
+ queue_update_params.QueueUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=Queue,
+ )
+
+ def list(
+ self,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ # 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,
+ ) -> SyncCursorPage[Queue]:
+ """
+ Lists transaction monitoring queues.
+
+ Args:
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ 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(
+ "/v1/transaction_monitoring/queues",
+ page=SyncCursorPage[Queue],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ },
+ queue_list_params.QueueListParams,
+ ),
+ ),
+ model=Queue,
+ )
+
+ def delete(
+ self,
+ queue_token: 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,
+ ) -> None:
+ """
+ Deletes a transaction monitoring queue.
+
+ Args:
+ 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 queue_token:
+ raise ValueError(f"Expected a non-empty value for `queue_token` but received {queue_token!r}")
+ return self._delete(
+ path_template("/v1/transaction_monitoring/queues/{queue_token}", queue_token=queue_token),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class AsyncQueues(AsyncAPIResource):
+ @cached_property
+ def with_raw_response(self) -> AsyncQueuesWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncQueuesWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncQueuesWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return AsyncQueuesWithStreamingResponse(self)
+
+ async def create(
+ self,
+ *,
+ name: str,
+ description: Optional[str] | Omit = omit,
+ # 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,
+ ) -> Queue:
+ """
+ Creates a new queue for grouping transaction monitoring cases.
+
+ Args:
+ name: Human-readable name of the queue
+
+ description: Optional description of the queue
+
+ 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/transaction_monitoring/queues",
+ body=await async_maybe_transform(
+ {
+ "name": name,
+ "description": description,
+ },
+ queue_create_params.QueueCreateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=Queue,
+ )
+
+ async def retrieve(
+ self,
+ queue_token: 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,
+ ) -> Queue:
+ """
+ Retrieves a single transaction monitoring queue.
+
+ Args:
+ 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 queue_token:
+ raise ValueError(f"Expected a non-empty value for `queue_token` but received {queue_token!r}")
+ return await self._get(
+ path_template("/v1/transaction_monitoring/queues/{queue_token}", queue_token=queue_token),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=Queue,
+ )
+
+ async def update(
+ self,
+ queue_token: str,
+ *,
+ description: Optional[str] | Omit = omit,
+ name: str | Omit = omit,
+ # 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,
+ ) -> Queue:
+ """
+ Updates a transaction monitoring queue.
+
+ Args:
+ description: New description for the queue, or `null` to clear it
+
+ name: New name for the queue
+
+ 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 queue_token:
+ raise ValueError(f"Expected a non-empty value for `queue_token` but received {queue_token!r}")
+ return await self._patch(
+ path_template("/v1/transaction_monitoring/queues/{queue_token}", queue_token=queue_token),
+ body=await async_maybe_transform(
+ {
+ "description": description,
+ "name": name,
+ },
+ queue_update_params.QueueUpdateParams,
+ ),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=Queue,
+ )
+
+ def list(
+ self,
+ *,
+ ending_before: str | Omit = omit,
+ page_size: int | Omit = omit,
+ starting_after: str | Omit = omit,
+ # 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[Queue, AsyncCursorPage[Queue]]:
+ """
+ Lists transaction monitoring queues.
+
+ Args:
+ ending_before: A cursor representing an item's token before which a page of results should end.
+ Used to retrieve the previous page of results before this item.
+
+ page_size: Page size (for pagination).
+
+ starting_after: A cursor representing an item's token after which a page of results should
+ begin. Used to retrieve the next page of results after this item.
+
+ 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(
+ "/v1/transaction_monitoring/queues",
+ page=AsyncCursorPage[Queue],
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "ending_before": ending_before,
+ "page_size": page_size,
+ "starting_after": starting_after,
+ },
+ queue_list_params.QueueListParams,
+ ),
+ ),
+ model=Queue,
+ )
+
+ async def delete(
+ self,
+ queue_token: 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,
+ ) -> None:
+ """
+ Deletes a transaction monitoring queue.
+
+ Args:
+ 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 queue_token:
+ raise ValueError(f"Expected a non-empty value for `queue_token` but received {queue_token!r}")
+ return await self._delete(
+ path_template("/v1/transaction_monitoring/queues/{queue_token}", queue_token=queue_token),
+ options=make_request_options(
+ extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
+ ),
+ cast_to=NoneType,
+ )
+
+
+class QueuesWithRawResponse:
+ def __init__(self, queues: Queues) -> None:
+ self._queues = queues
+
+ self.create = _legacy_response.to_raw_response_wrapper(
+ queues.create,
+ )
+ self.retrieve = _legacy_response.to_raw_response_wrapper(
+ queues.retrieve,
+ )
+ self.update = _legacy_response.to_raw_response_wrapper(
+ queues.update,
+ )
+ self.list = _legacy_response.to_raw_response_wrapper(
+ queues.list,
+ )
+ self.delete = _legacy_response.to_raw_response_wrapper(
+ queues.delete,
+ )
+
+
+class AsyncQueuesWithRawResponse:
+ def __init__(self, queues: AsyncQueues) -> None:
+ self._queues = queues
+
+ self.create = _legacy_response.async_to_raw_response_wrapper(
+ queues.create,
+ )
+ self.retrieve = _legacy_response.async_to_raw_response_wrapper(
+ queues.retrieve,
+ )
+ self.update = _legacy_response.async_to_raw_response_wrapper(
+ queues.update,
+ )
+ self.list = _legacy_response.async_to_raw_response_wrapper(
+ queues.list,
+ )
+ self.delete = _legacy_response.async_to_raw_response_wrapper(
+ queues.delete,
+ )
+
+
+class QueuesWithStreamingResponse:
+ def __init__(self, queues: Queues) -> None:
+ self._queues = queues
+
+ self.create = to_streamed_response_wrapper(
+ queues.create,
+ )
+ self.retrieve = to_streamed_response_wrapper(
+ queues.retrieve,
+ )
+ self.update = to_streamed_response_wrapper(
+ queues.update,
+ )
+ self.list = to_streamed_response_wrapper(
+ queues.list,
+ )
+ self.delete = to_streamed_response_wrapper(
+ queues.delete,
+ )
+
+
+class AsyncQueuesWithStreamingResponse:
+ def __init__(self, queues: AsyncQueues) -> None:
+ self._queues = queues
+
+ self.create = async_to_streamed_response_wrapper(
+ queues.create,
+ )
+ self.retrieve = async_to_streamed_response_wrapper(
+ queues.retrieve,
+ )
+ self.update = async_to_streamed_response_wrapper(
+ queues.update,
+ )
+ self.list = async_to_streamed_response_wrapper(
+ queues.list,
+ )
+ self.delete = async_to_streamed_response_wrapper(
+ queues.delete,
+ )
diff --git a/src/lithic/resources/transaction_monitoring/transaction_monitoring.py b/src/lithic/resources/transaction_monitoring/transaction_monitoring.py
new file mode 100644
index 00000000..893d5066
--- /dev/null
+++ b/src/lithic/resources/transaction_monitoring/transaction_monitoring.py
@@ -0,0 +1,134 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .queues import (
+ Queues,
+ AsyncQueues,
+ QueuesWithRawResponse,
+ AsyncQueuesWithRawResponse,
+ QueuesWithStreamingResponse,
+ AsyncQueuesWithStreamingResponse,
+)
+from ..._compat import cached_property
+from ..._resource import SyncAPIResource, AsyncAPIResource
+from .cases.cases import (
+ Cases,
+ AsyncCases,
+ CasesWithRawResponse,
+ AsyncCasesWithRawResponse,
+ CasesWithStreamingResponse,
+ AsyncCasesWithStreamingResponse,
+)
+
+__all__ = ["TransactionMonitoring", "AsyncTransactionMonitoring"]
+
+
+class TransactionMonitoring(SyncAPIResource):
+ @cached_property
+ def cases(self) -> Cases:
+ return Cases(self._client)
+
+ @cached_property
+ def queues(self) -> Queues:
+ return Queues(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> TransactionMonitoringWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return TransactionMonitoringWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> TransactionMonitoringWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return TransactionMonitoringWithStreamingResponse(self)
+
+
+class AsyncTransactionMonitoring(AsyncAPIResource):
+ @cached_property
+ def cases(self) -> AsyncCases:
+ return AsyncCases(self._client)
+
+ @cached_property
+ def queues(self) -> AsyncQueues:
+ return AsyncQueues(self._client)
+
+ @cached_property
+ def with_raw_response(self) -> AsyncTransactionMonitoringWithRawResponse:
+ """
+ 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/lithic-com/lithic-python#accessing-raw-response-data-eg-headers
+ """
+ return AsyncTransactionMonitoringWithRawResponse(self)
+
+ @cached_property
+ def with_streaming_response(self) -> AsyncTransactionMonitoringWithStreamingResponse:
+ """
+ An alternative to `.with_raw_response` that doesn't eagerly read the response body.
+
+ For more information, see https://www.github.com/lithic-com/lithic-python#with_streaming_response
+ """
+ return AsyncTransactionMonitoringWithStreamingResponse(self)
+
+
+class TransactionMonitoringWithRawResponse:
+ def __init__(self, transaction_monitoring: TransactionMonitoring) -> None:
+ self._transaction_monitoring = transaction_monitoring
+
+ @cached_property
+ def cases(self) -> CasesWithRawResponse:
+ return CasesWithRawResponse(self._transaction_monitoring.cases)
+
+ @cached_property
+ def queues(self) -> QueuesWithRawResponse:
+ return QueuesWithRawResponse(self._transaction_monitoring.queues)
+
+
+class AsyncTransactionMonitoringWithRawResponse:
+ def __init__(self, transaction_monitoring: AsyncTransactionMonitoring) -> None:
+ self._transaction_monitoring = transaction_monitoring
+
+ @cached_property
+ def cases(self) -> AsyncCasesWithRawResponse:
+ return AsyncCasesWithRawResponse(self._transaction_monitoring.cases)
+
+ @cached_property
+ def queues(self) -> AsyncQueuesWithRawResponse:
+ return AsyncQueuesWithRawResponse(self._transaction_monitoring.queues)
+
+
+class TransactionMonitoringWithStreamingResponse:
+ def __init__(self, transaction_monitoring: TransactionMonitoring) -> None:
+ self._transaction_monitoring = transaction_monitoring
+
+ @cached_property
+ def cases(self) -> CasesWithStreamingResponse:
+ return CasesWithStreamingResponse(self._transaction_monitoring.cases)
+
+ @cached_property
+ def queues(self) -> QueuesWithStreamingResponse:
+ return QueuesWithStreamingResponse(self._transaction_monitoring.queues)
+
+
+class AsyncTransactionMonitoringWithStreamingResponse:
+ def __init__(self, transaction_monitoring: AsyncTransactionMonitoring) -> None:
+ self._transaction_monitoring = transaction_monitoring
+
+ @cached_property
+ def cases(self) -> AsyncCasesWithStreamingResponse:
+ return AsyncCasesWithStreamingResponse(self._transaction_monitoring.cases)
+
+ @cached_property
+ def queues(self) -> AsyncQueuesWithStreamingResponse:
+ return AsyncQueuesWithStreamingResponse(self._transaction_monitoring.queues)
diff --git a/src/lithic/types/account.py b/src/lithic/types/account.py
index 7cc0f683..94a944b3 100644
--- a/src/lithic/types/account.py
+++ b/src/lithic/types/account.py
@@ -101,7 +101,7 @@ class Account(BaseModel):
accounts are unable to be transitioned to `ACTIVE` or `PAUSED` states.
Accounts can be manually set to `CLOSED`, or this can be done by Lithic due to
failure to pass KYB/KYC or for risk/compliance reasons. Please contact
- [support@lithic.com](mailto:support@lithic.com) if you believe this was done
+ [support.lithic.com](https://support.lithic.com/) if you believe this was done
by mistake.
"""
diff --git a/src/lithic/types/account_holders/account_holder_entity.py b/src/lithic/types/account_holders/account_holder_entity.py
index 16512cc1..66e7e279 100644
--- a/src/lithic/types/account_holders/account_holder_entity.py
+++ b/src/lithic/types/account_holders/account_holder_entity.py
@@ -4,6 +4,7 @@
from typing_extensions import Literal
from ..._models import BaseModel
+from ..transaction_monitoring.entity_type import EntityType
__all__ = ["AccountHolderEntity", "Address"]
@@ -72,5 +73,5 @@ class AccountHolderEntity(BaseModel):
status: Literal["ACCEPTED", "INACTIVE", "PENDING_REVIEW", "REJECTED"]
"""The status of the entity"""
- type: Literal["BENEFICIAL_OWNER_INDIVIDUAL", "CONTROL_PERSON"]
+ type: EntityType
"""The type of entity"""
diff --git a/src/lithic/types/account_holders/entity_create_params.py b/src/lithic/types/account_holders/entity_create_params.py
index a97fc419..7ad8d2d7 100644
--- a/src/lithic/types/account_holders/entity_create_params.py
+++ b/src/lithic/types/account_holders/entity_create_params.py
@@ -2,7 +2,9 @@
from __future__ import annotations
-from typing_extensions import Literal, Required, TypedDict
+from typing_extensions import Required, TypedDict
+
+from ..transaction_monitoring.entity_type import EntityType
__all__ = ["EntityCreateParams", "Address"]
@@ -41,7 +43,7 @@ class EntityCreateParams(TypedDict, total=False):
phone_number: Required[str]
"""Individual's phone number, entered in E.164 format."""
- type: Required[Literal["BENEFICIAL_OWNER_INDIVIDUAL", "CONTROL_PERSON"]]
+ type: Required[EntityType]
"""The type of entity to create on the account holder"""
diff --git a/src/lithic/types/auth_rules/conditional_authorization_adjustment_parameters.py b/src/lithic/types/auth_rules/conditional_authorization_adjustment_parameters.py
index 74c7d1d8..4cf486b8 100644
--- a/src/lithic/types/auth_rules/conditional_authorization_adjustment_parameters.py
+++ b/src/lithic/types/auth_rules/conditional_authorization_adjustment_parameters.py
@@ -7,11 +7,11 @@
from .conditional_value import ConditionalValue
from .conditional_operation import ConditionalOperation
-__all__ = ["ConditionalAuthorizationAdjustmentParameters", "Adjustment", "Condition", "ConditionParameters"]
+__all__ = ["ConditionalAuthorizationAdjustmentParameters", "Action", "Condition", "ConditionParameters"]
-class Adjustment(BaseModel):
- """The hold adjustment to apply if the conditions are met"""
+class Action(BaseModel):
+ """The hold adjustment to apply if the conditions are met."""
mode: Literal["REPLACE_WITH_AMOUNT", "ADD_PERCENTAGE", "ADD_AMOUNT"]
"""The mode of the hold adjustment, determining how the value is interpreted:
@@ -244,7 +244,7 @@ class Condition(BaseModel):
class ConditionalAuthorizationAdjustmentParameters(BaseModel):
- adjustment: Adjustment
- """The hold adjustment to apply if the conditions are met"""
+ action: Action
+ """The hold adjustment to apply if the conditions are met."""
conditions: List[Condition]
diff --git a/src/lithic/types/auth_rules/conditional_authorization_adjustment_parameters_param.py b/src/lithic/types/auth_rules/conditional_authorization_adjustment_parameters_param.py
index efd835fc..2a745175 100644
--- a/src/lithic/types/auth_rules/conditional_authorization_adjustment_parameters_param.py
+++ b/src/lithic/types/auth_rules/conditional_authorization_adjustment_parameters_param.py
@@ -9,11 +9,11 @@
from .conditional_operation import ConditionalOperation
from .conditional_value_param import ConditionalValueParam
-__all__ = ["ConditionalAuthorizationAdjustmentParametersParam", "Adjustment", "Condition", "ConditionParameters"]
+__all__ = ["ConditionalAuthorizationAdjustmentParametersParam", "Action", "Condition", "ConditionParameters"]
-class Adjustment(TypedDict, total=False):
- """The hold adjustment to apply if the conditions are met"""
+class Action(TypedDict, total=False):
+ """The hold adjustment to apply if the conditions are met."""
mode: Required[Literal["REPLACE_WITH_AMOUNT", "ADD_PERCENTAGE", "ADD_AMOUNT"]]
"""The mode of the hold adjustment, determining how the value is interpreted:
@@ -248,7 +248,7 @@ class Condition(TypedDict, total=False):
class ConditionalAuthorizationAdjustmentParametersParam(TypedDict, total=False):
- adjustment: Required[Adjustment]
- """The hold adjustment to apply if the conditions are met"""
+ action: Required[Action]
+ """The hold adjustment to apply if the conditions are met."""
conditions: Required[Iterable[Condition]]
diff --git a/src/lithic/types/card.py b/src/lithic/types/card.py
index 99b56ba7..3bb986c2 100644
--- a/src/lithic/types/card.py
+++ b/src/lithic/types/card.py
@@ -19,5 +19,5 @@ class Card(NonPCICard):
"""Primary Account Number (PAN) (i.e.
the card number). Customers must be PCI compliant to have PAN returned as a
- field in production. Please contact support@lithic.com for questions.
+ field in production. Please contact https://support.lithic.com/ for questions.
"""
diff --git a/src/lithic/types/card_authorization.py b/src/lithic/types/card_authorization.py
index b477c63f..4b11c293 100644
--- a/src/lithic/types/card_authorization.py
+++ b/src/lithic/types/card_authorization.py
@@ -20,6 +20,9 @@
"Avs",
"Card",
"Merchant",
+ "NameValidation",
+ "NameValidationName",
+ "NameValidationNameOnFileMatch",
"ServiceLocation",
"FleetInfo",
"LatestChallenge",
@@ -149,6 +152,43 @@ class Merchant(merchant.Merchant):
"""Street address of card acceptor."""
+class NameValidationName(BaseModel):
+ """Cardholder name as provided by the card network."""
+
+ first: str
+ """First name"""
+
+ last: str
+ """Last name"""
+
+ middle: Optional[str] = None
+ """Middle name"""
+
+
+class NameValidationNameOnFileMatch(BaseModel):
+ """
+ Lithic's computed match result comparing the network-provided name to the name on file.
+ """
+
+ full_name: Literal["MATCH", "PARTIAL_MATCH", "NO_MATCH", "UNVERIFIED"]
+ """Overall name match result."""
+
+
+class NameValidation(BaseModel):
+ """
+ Network name validation data, present when the card network requested name validation for this transaction. Contains the cardholder name provided by the network and Lithic's computed match result against KYC data on file.
+ """
+
+ name: NameValidationName
+ """Cardholder name as provided by the card network."""
+
+ name_on_file_match: NameValidationNameOnFileMatch
+ """
+ Lithic's computed match result comparing the network-provided name to the name
+ on file.
+ """
+
+
class ServiceLocation(BaseModel):
"""
Where the cardholder received the service, when different from the card acceptor location. This is populated from network data elements such as Mastercard DE-122 SE1 SF9-14 and Visa F34 DS02.
@@ -201,6 +241,15 @@ class LatestChallenge(BaseModel):
The latest Authorization Challenge that was issued to the cardholder for this merchant.
"""
+ completed_at: Optional[datetime] = None
+ """The date and time when the Authorization Challenge was completed in UTC.
+
+ Filled only if the challenge has been completed.
+ """
+
+ created: datetime
+ """The date and time when the Authorization Challenge was created in UTC"""
+
method: Literal["SMS", "OUT_OF_BAND"]
"""The method used to deliver the challenge to the cardholder
@@ -224,12 +273,6 @@ class LatestChallenge(BaseModel):
- `ERROR` - There was an error processing the challenge
"""
- completed_at: Optional[datetime] = None
- """The date and time when the Authorization Challenge was completed in UTC.
-
- Present only if the status is `COMPLETED`.
- """
-
class NetworkSpecificDataMastercardOnBehalfServiceResult(BaseModel):
result_1: str
@@ -467,6 +510,13 @@ class CardAuthorization(BaseModel):
merchant_currency: str
"""3-character alphabetic ISO 4217 code for the local currency of the transaction."""
+ name_validation: Optional[NameValidation] = None
+ """
+ Network name validation data, present when the card network requested name
+ validation for this transaction. Contains the cardholder name provided by the
+ network and Lithic's computed match result against KYC data on file.
+ """
+
service_location: Optional[ServiceLocation] = None
"""
Where the cardholder received the service, when different from the card acceptor
diff --git a/src/lithic/types/financial_accounts/loan_tape.py b/src/lithic/types/financial_accounts/loan_tape.py
index 583f98cd..fd2a3d88 100644
--- a/src/lithic/types/financial_accounts/loan_tape.py
+++ b/src/lithic/types/financial_accounts/loan_tape.py
@@ -196,5 +196,8 @@ class LoanTape(BaseModel):
ytd_totals: StatementTotals
+ day_of_period: Optional[int] = None
+ """Day of the billing period that this loan tape covers, starting at 1"""
+
tier: Optional[str] = None
"""Interest tier to which this account belongs to"""
diff --git a/src/lithic/types/transaction_monitoring/__init__.py b/src/lithic/types/transaction_monitoring/__init__.py
new file mode 100644
index 00000000..0e1ff410
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/__init__.py
@@ -0,0 +1,24 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .queue import Queue as Queue
+from .case_card import CaseCard as CaseCard
+from .case_entity import CaseEntity as CaseEntity
+from .case_status import CaseStatus as CaseStatus
+from .entity_type import EntityType as EntityType
+from .case_priority import CasePriority as CasePriority
+from .case_sort_order import CaseSortOrder as CaseSortOrder
+from .monitoring_case import MonitoringCase as MonitoringCase
+from .case_list_params import CaseListParams as CaseListParams
+from .case_transaction import CaseTransaction as CaseTransaction
+from .queue_list_params import QueueListParams as QueueListParams
+from .case_activity_type import CaseActivityType as CaseActivityType
+from .case_update_params import CaseUpdateParams as CaseUpdateParams
+from .resolution_outcome import ResolutionOutcome as ResolutionOutcome
+from .case_activity_entry import CaseActivityEntry as CaseActivityEntry
+from .queue_create_params import QueueCreateParams as QueueCreateParams
+from .queue_update_params import QueueUpdateParams as QueueUpdateParams
+from .case_list_activity_params import CaseListActivityParams as CaseListActivityParams
+from .case_retrieve_cards_response import CaseRetrieveCardsResponse as CaseRetrieveCardsResponse
+from .case_list_transactions_params import CaseListTransactionsParams as CaseListTransactionsParams
diff --git a/src/lithic/types/transaction_monitoring/case_activity_entry.py b/src/lithic/types/transaction_monitoring/case_activity_entry.py
new file mode 100644
index 00000000..b287f94f
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_activity_entry.py
@@ -0,0 +1,42 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+from .case_activity_type import CaseActivityType
+
+__all__ = ["CaseActivityEntry"]
+
+
+class CaseActivityEntry(BaseModel):
+ """A single entry in a case's activity feed"""
+
+ token: str
+ """Globally unique identifier for the activity entry"""
+
+ actor_token: Optional[str] = None
+ """Identifier of the actor that produced the activity entry"""
+
+ created: datetime
+ """Date and time at which the activity entry was created"""
+
+ entry_type: CaseActivityType
+ """The case field that changed, or the action that was taken, in an activity entry:
+
+ - `STATUS` - The case status changed
+ - `TITLE` - The case title changed
+ - `ASSIGNED_TO` - The case assignee changed
+ - `RESOLUTION_OUTCOME` - The resolution outcome was set or changed
+ - `RESOLUTION_NOTES` - The resolution notes were set or changed
+ - `TAGS` - The case tags changed
+ - `PRIORITY` - The case priority changed
+ - `COMMENT` - A comment was added or edited
+ - `FILE` - A file was attached to the case
+ """
+
+ new_value: Optional[str] = None
+ """New value of the changed field, when applicable"""
+
+ previous_value: Optional[str] = None
+ """Previous value of the changed field, when applicable"""
diff --git a/src/lithic/types/transaction_monitoring/case_activity_type.py b/src/lithic/types/transaction_monitoring/case_activity_type.py
new file mode 100644
index 00000000..231ec880
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_activity_type.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["CaseActivityType"]
+
+CaseActivityType: TypeAlias = Literal[
+ "STATUS", "TITLE", "ASSIGNED_TO", "RESOLUTION_OUTCOME", "RESOLUTION_NOTES", "TAGS", "PRIORITY", "COMMENT", "FILE"
+]
diff --git a/src/lithic/types/transaction_monitoring/case_card.py b/src/lithic/types/transaction_monitoring/case_card.py
new file mode 100644
index 00000000..3bc74dbb
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_card.py
@@ -0,0 +1,20 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from ..._models import BaseModel
+
+__all__ = ["CaseCard"]
+
+
+class CaseCard(BaseModel):
+ """
+ Summary of a card's involvement in a case, aggregated across the case's transactions
+ """
+
+ account_token: str
+ """Token of the account the card belongs to"""
+
+ card_token: str
+ """Token of the card"""
+
+ transaction_count: int
+ """Number of the card's transactions associated with the case"""
diff --git a/src/lithic/types/transaction_monitoring/case_entity.py b/src/lithic/types/transaction_monitoring/case_entity.py
new file mode 100644
index 00000000..a85b9e3f
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_entity.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal
+
+from ..._models import BaseModel
+
+__all__ = ["CaseEntity"]
+
+
+class CaseEntity(BaseModel):
+ """The entity a case is associated with"""
+
+ entity_token: str
+ """Globally unique identifier for the associated entity"""
+
+ entity_type: Literal["CARD", "ACCOUNT"]
+ """The type of entity a case is associated with:
+
+ - `CARD` - The case is associated with a card
+ - `ACCOUNT` - The case is associated with an account
+ """
diff --git a/src/lithic/types/transaction_monitoring/case_list_activity_params.py b/src/lithic/types/transaction_monitoring/case_list_activity_params.py
new file mode 100644
index 00000000..fa02d9b4
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_list_activity_params.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["CaseListActivityParams"]
+
+
+class CaseListActivityParams(TypedDict, total=False):
+ ending_before: str
+ """A cursor representing an item's token before which a page of results should end.
+
+ Used to retrieve the previous page of results before this item.
+ """
+
+ page_size: int
+ """Page size (for pagination)."""
+
+ starting_after: str
+ """A cursor representing an item's token after which a page of results should
+ begin.
+
+ Used to retrieve the next page of results after this item.
+ """
diff --git a/src/lithic/types/transaction_monitoring/case_list_params.py b/src/lithic/types/transaction_monitoring/case_list_params.py
new file mode 100644
index 00000000..7265c87b
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_list_params.py
@@ -0,0 +1,73 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Union
+from datetime import datetime
+from typing_extensions import Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+from .case_status import CaseStatus
+from .case_sort_order import CaseSortOrder
+
+__all__ = ["CaseListParams"]
+
+
+class CaseListParams(TypedDict, total=False):
+ account_token: str
+ """Only return cases that include transactions on the provided account."""
+
+ assignee: str
+ """Only return cases assigned to the provided value.
+
+ Pass an empty string to return only unassigned cases.
+ """
+
+ begin: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
+ """Date string in RFC 3339 format.
+
+ Only entries created after the specified time will be included. UTC time zone.
+ """
+
+ card_token: str
+ """Only return cases that include transactions on the provided card."""
+
+ end: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
+ """Date string in RFC 3339 format.
+
+ Only entries created before the specified time will be included. UTC time zone.
+ """
+
+ ending_before: str
+ """A cursor representing an item's token before which a page of results should end.
+
+ Used to retrieve the previous page of results before this item.
+ """
+
+ entity_token: str
+ """Only return cases associated with the provided entity."""
+
+ page_size: int
+ """Page size (for pagination)."""
+
+ queue_token: str
+ """Only return cases belonging to the provided queue."""
+
+ rule_token: str
+ """Only return cases triggered by the provided transaction monitoring rule."""
+
+ sort_by: CaseSortOrder
+ """Sort order for the returned cases."""
+
+ starting_after: str
+ """A cursor representing an item's token after which a page of results should
+ begin.
+
+ Used to retrieve the next page of results after this item.
+ """
+
+ status: CaseStatus
+ """Only return cases with the provided status."""
+
+ transaction_token: str
+ """Only return cases that include the provided transaction."""
diff --git a/src/lithic/types/transaction_monitoring/case_list_transactions_params.py b/src/lithic/types/transaction_monitoring/case_list_transactions_params.py
new file mode 100644
index 00000000..050b5a5d
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_list_transactions_params.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["CaseListTransactionsParams"]
+
+
+class CaseListTransactionsParams(TypedDict, total=False):
+ ending_before: str
+ """A cursor representing an item's token before which a page of results should end.
+
+ Used to retrieve the previous page of results before this item.
+ """
+
+ page_size: int
+ """Page size (for pagination)."""
+
+ starting_after: str
+ """A cursor representing an item's token after which a page of results should
+ begin.
+
+ Used to retrieve the next page of results after this item.
+ """
diff --git a/src/lithic/types/transaction_monitoring/case_priority.py b/src/lithic/types/transaction_monitoring/case_priority.py
new file mode 100644
index 00000000..4782b7fc
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_priority.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["CasePriority"]
+
+CasePriority: TypeAlias = Literal["LOW", "MEDIUM", "HIGH", "CRITICAL"]
diff --git a/src/lithic/types/transaction_monitoring/case_retrieve_cards_response.py b/src/lithic/types/transaction_monitoring/case_retrieve_cards_response.py
new file mode 100644
index 00000000..8d4c1791
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_retrieve_cards_response.py
@@ -0,0 +1,10 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+from typing_extensions import TypeAlias
+
+from .case_card import CaseCard
+
+__all__ = ["CaseRetrieveCardsResponse"]
+
+CaseRetrieveCardsResponse: TypeAlias = List[CaseCard]
diff --git a/src/lithic/types/transaction_monitoring/case_sort_order.py b/src/lithic/types/transaction_monitoring/case_sort_order.py
new file mode 100644
index 00000000..d4f7aeed
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_sort_order.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["CaseSortOrder"]
+
+CaseSortOrder: TypeAlias = Literal[
+ "CREATED_ASC", "CREATED_DESC", "PRIORITY_DESC", "PRIORITY_ASC", "STATUS_DESC", "STATUS_ASC"
+]
diff --git a/src/lithic/types/transaction_monitoring/case_status.py b/src/lithic/types/transaction_monitoring/case_status.py
new file mode 100644
index 00000000..dafed250
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_status.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["CaseStatus"]
+
+CaseStatus: TypeAlias = Literal["OPEN", "ASSIGNED", "IN_REVIEW", "ESCALATED", "RESOLVED", "CLOSED"]
diff --git a/src/lithic/types/transaction_monitoring/case_transaction.py b/src/lithic/types/transaction_monitoring/case_transaction.py
new file mode 100644
index 00000000..66f74aed
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_transaction.py
@@ -0,0 +1,26 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from datetime import datetime
+
+from ..._models import BaseModel
+
+__all__ = ["CaseTransaction"]
+
+
+class CaseTransaction(BaseModel):
+ """A single transaction associated with a case"""
+
+ token: str
+ """Globally unique identifier for the transaction"""
+
+ account_token: str
+ """Token of the account the transaction belongs to"""
+
+ added_at: datetime
+ """Date and time at which the transaction was added to the case"""
+
+ card_token: str
+ """Token of the card the transaction was made on"""
+
+ transaction_created_at: datetime
+ """Date and time at which the transaction was created"""
diff --git a/src/lithic/types/transaction_monitoring/case_update_params.py b/src/lithic/types/transaction_monitoring/case_update_params.py
new file mode 100644
index 00000000..8270d35d
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/case_update_params.py
@@ -0,0 +1,65 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Dict, Union, Optional
+from datetime import datetime
+from typing_extensions import Annotated, TypedDict
+
+from ..._utils import PropertyInfo
+from .case_status import CaseStatus
+from .case_priority import CasePriority
+from .resolution_outcome import ResolutionOutcome
+
+__all__ = ["CaseUpdateParams"]
+
+
+class CaseUpdateParams(TypedDict, total=False):
+ actor_token: str
+ """
+ Optional client-provided identifier for the actor performing this action,
+ recorded on the resulting activity entry. This value is supplied by the client
+ (for example, your own internal user ID) and is not authenticated by Lithic
+ """
+
+ assignee: Optional[str]
+ """New assignee for the case, or `null` to unassign"""
+
+ priority: CasePriority
+ """Priority level of a case, controlling queue ordering and SLA urgency"""
+
+ resolution: ResolutionOutcome
+ """Outcome recorded when a case is resolved:
+
+ - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent
+ - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud
+ - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false
+ positive
+ - `NO_ACTION_REQUIRED` - No further action is required
+ - `ESCALATED_EXTERNAL` - The case was escalated to an external party
+ """
+
+ resolution_notes: str
+ """Notes describing the resolution"""
+
+ sla_deadline: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
+ """New SLA deadline for the case, or `null` to clear it"""
+
+ status: CaseStatus
+ """Status of a case as it progresses through the review workflow:
+
+ - `OPEN` - The case has been created and is still collecting matching
+ transactions
+ - `ASSIGNED` - An analyst has been assigned and transaction collection has
+ stopped
+ - `IN_REVIEW` - The case is actively being investigated
+ - `ESCALATED` - The case has been reviewed and requires additional oversight
+ - `RESOLVED` - A determination has been made and a resolution recorded
+ - `CLOSED` - The case is finalized
+ """
+
+ tags: Dict[str, str]
+ """Arbitrary key-value metadata to set on the case"""
+
+ title: Optional[str]
+ """New title for the case, or `null` to clear it"""
diff --git a/src/lithic/types/transaction_monitoring/cases/__init__.py b/src/lithic/types/transaction_monitoring/cases/__init__.py
new file mode 100644
index 00000000..90f33277
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/cases/__init__.py
@@ -0,0 +1,11 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from .case_file import CaseFile as CaseFile
+from .file_status import FileStatus as FileStatus
+from .file_list_params import FileListParams as FileListParams
+from .file_create_params import FileCreateParams as FileCreateParams
+from .upload_constraints import UploadConstraints as UploadConstraints
+from .comment_create_params import CommentCreateParams as CommentCreateParams
+from .comment_update_params import CommentUpdateParams as CommentUpdateParams
diff --git a/src/lithic/types/transaction_monitoring/cases/case_file.py b/src/lithic/types/transaction_monitoring/cases/case_file.py
new file mode 100644
index 00000000..f0c2481d
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/cases/case_file.py
@@ -0,0 +1,68 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from ...._models import BaseModel
+from .file_status import FileStatus
+from .upload_constraints import UploadConstraints
+
+__all__ = ["CaseFile"]
+
+
+class CaseFile(BaseModel):
+ """A file attached to a case.
+
+ Status-dependent fields are always present but may be `null`:
+ - `upload_url`, `upload_url_expires`, and `upload_constraints` are populated when `status` is `PENDING` or `REJECTED`
+ - `download_url` and `download_url_expires` are populated when `status` is `READY`
+ - `failure_reason` is populated when `status` is `REJECTED`
+ """
+
+ token: str
+ """Globally unique identifier for the file"""
+
+ created: datetime
+ """Date and time at which the file record was created"""
+
+ download_url: Optional[str] = None
+ """Presigned URL the client uses to download the file"""
+
+ download_url_expires: Optional[datetime] = None
+ """Date and time at which the download URL expires"""
+
+ failure_reason: Optional[str] = None
+ """Reason the file was rejected, when applicable"""
+
+ mime_type: Optional[str] = None
+ """MIME type of the file, available once the file is ready"""
+
+ name: str
+ """Name of the file"""
+
+ size_bytes: Optional[int] = None
+ """Size of the file in bytes, available once the file is ready"""
+
+ status: FileStatus
+ """Lifecycle status of a case file:
+
+ - `PENDING` - An upload URL has been issued and the file is awaiting upload
+ - `READY` - The file has been uploaded and validated; a download URL is
+ available
+ - `REJECTED` - File validation failed; see `failure_reason` for details
+ """
+
+ updated: datetime
+ """Date and time at which the file record was last updated"""
+
+ upload_constraints: Optional[UploadConstraints] = None
+ """
+ Constraints applied to a file upload, returned alongside the upload URL so
+ clients can validate before uploading
+ """
+
+ upload_url: Optional[str] = None
+ """Presigned URL the client uses to upload the file"""
+
+ upload_url_expires: Optional[datetime] = None
+ """Date and time at which the upload URL expires"""
diff --git a/src/lithic/types/transaction_monitoring/cases/comment_create_params.py b/src/lithic/types/transaction_monitoring/cases/comment_create_params.py
new file mode 100644
index 00000000..d0bf1d31
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/cases/comment_create_params.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["CommentCreateParams"]
+
+
+class CommentCreateParams(TypedDict, total=False):
+ comment: Required[str]
+ """Text of the comment"""
+
+ actor_token: str
+ """
+ Optional client-provided identifier for the actor performing this action,
+ recorded on the resulting activity entry. This value is supplied by the client
+ (for example, your own internal user ID) and is not authenticated by Lithic
+ """
diff --git a/src/lithic/types/transaction_monitoring/cases/comment_update_params.py b/src/lithic/types/transaction_monitoring/cases/comment_update_params.py
new file mode 100644
index 00000000..9063d2ba
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/cases/comment_update_params.py
@@ -0,0 +1,21 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["CommentUpdateParams"]
+
+
+class CommentUpdateParams(TypedDict, total=False):
+ case_token: Required[str]
+
+ comment: Required[str]
+ """New text of the comment"""
+
+ actor_token: str
+ """
+ Optional client-provided identifier for the actor performing this action,
+ recorded on the resulting activity entry. This value is supplied by the client
+ (for example, your own internal user ID) and is not authenticated by Lithic
+ """
diff --git a/src/lithic/types/transaction_monitoring/cases/file_create_params.py b/src/lithic/types/transaction_monitoring/cases/file_create_params.py
new file mode 100644
index 00000000..590f50ac
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/cases/file_create_params.py
@@ -0,0 +1,12 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import Required, TypedDict
+
+__all__ = ["FileCreateParams"]
+
+
+class FileCreateParams(TypedDict, total=False):
+ name: Required[str]
+ """Name of the file to upload"""
diff --git a/src/lithic/types/transaction_monitoring/cases/file_list_params.py b/src/lithic/types/transaction_monitoring/cases/file_list_params.py
new file mode 100644
index 00000000..06096f03
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/cases/file_list_params.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["FileListParams"]
+
+
+class FileListParams(TypedDict, total=False):
+ ending_before: str
+ """A cursor representing an item's token before which a page of results should end.
+
+ Used to retrieve the previous page of results before this item.
+ """
+
+ page_size: int
+ """Page size (for pagination)."""
+
+ starting_after: str
+ """A cursor representing an item's token after which a page of results should
+ begin.
+
+ Used to retrieve the next page of results after this item.
+ """
diff --git a/src/lithic/types/transaction_monitoring/cases/file_status.py b/src/lithic/types/transaction_monitoring/cases/file_status.py
new file mode 100644
index 00000000..20afa8e6
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/cases/file_status.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["FileStatus"]
+
+FileStatus: TypeAlias = Literal["PENDING", "READY", "REJECTED"]
diff --git a/src/lithic/types/transaction_monitoring/cases/upload_constraints.py b/src/lithic/types/transaction_monitoring/cases/upload_constraints.py
new file mode 100644
index 00000000..b22be188
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/cases/upload_constraints.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from ...._models import BaseModel
+
+__all__ = ["UploadConstraints"]
+
+
+class UploadConstraints(BaseModel):
+ """
+ Constraints applied to a file upload, returned alongside the upload URL so clients can validate before uploading
+ """
+
+ accepted_mime_types: List[str]
+ """MIME types accepted for the upload"""
+
+ max_size_bytes: int
+ """Maximum accepted file size, in bytes"""
diff --git a/src/lithic/types/transaction_monitoring/entity_type.py b/src/lithic/types/transaction_monitoring/entity_type.py
new file mode 100644
index 00000000..1addb583
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/entity_type.py
@@ -0,0 +1,7 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["EntityType"]
+
+EntityType: TypeAlias = Literal["BENEFICIAL_OWNER_INDIVIDUAL", "CONTROL_PERSON"]
diff --git a/src/lithic/types/transaction_monitoring/monitoring_case.py b/src/lithic/types/transaction_monitoring/monitoring_case.py
new file mode 100644
index 00000000..f44fdc23
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/monitoring_case.py
@@ -0,0 +1,85 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Dict, Optional
+from datetime import datetime
+
+from ..._models import BaseModel
+from .case_entity import CaseEntity
+from .case_status import CaseStatus
+from .case_priority import CasePriority
+from .resolution_outcome import ResolutionOutcome
+
+__all__ = ["MonitoringCase"]
+
+
+class MonitoringCase(BaseModel):
+ """A transaction monitoring case"""
+
+ token: str
+ """Globally unique identifier for the case"""
+
+ assignee: Optional[str] = None
+ """Identifier of the user the case is currently assigned to"""
+
+ collection_stopped: Optional[datetime] = None
+ """Date and time at which transaction collection stopped for the case"""
+
+ created: datetime
+ """Date and time at which the case was created"""
+
+ entity: Optional[CaseEntity] = None
+ """The entity a case is associated with"""
+
+ pending_transactions: bool
+ """Whether the case still has transaction scopes pending resolution"""
+
+ priority: CasePriority
+ """Priority level of a case, controlling queue ordering and SLA urgency"""
+
+ queue_token: str
+ """Token of the queue the case belongs to"""
+
+ resolution: Optional[ResolutionOutcome] = None
+ """Outcome recorded when a case is resolved:
+
+ - `CONFIRMED_FRAUD` - The reviewed activity was confirmed to be fraudulent
+ - `SUSPICIOUS_ACTIVITY` - The activity is suspicious but not confirmed fraud
+ - `FALSE_POSITIVE` - The activity was legitimate and the alert was a false
+ positive
+ - `NO_ACTION_REQUIRED` - No further action is required
+ - `ESCALATED_EXTERNAL` - The case was escalated to an external party
+ """
+
+ resolution_notes: Optional[str] = None
+ """Free-form notes describing the resolution"""
+
+ resolved: Optional[datetime] = None
+ """Date and time at which the case was resolved"""
+
+ rule_token: Optional[str] = None
+ """Token of the transaction monitoring rule that triggered the case"""
+
+ sla_deadline: Optional[datetime] = None
+ """Deadline by which the case is expected to be resolved"""
+
+ status: CaseStatus
+ """Status of a case as it progresses through the review workflow:
+
+ - `OPEN` - The case has been created and is still collecting matching
+ transactions
+ - `ASSIGNED` - An analyst has been assigned and transaction collection has
+ stopped
+ - `IN_REVIEW` - The case is actively being investigated
+ - `ESCALATED` - The case has been reviewed and requires additional oversight
+ - `RESOLVED` - A determination has been made and a resolution recorded
+ - `CLOSED` - The case is finalized
+ """
+
+ tags: Dict[str, str]
+ """Arbitrary key-value metadata associated with the case"""
+
+ title: Optional[str] = None
+ """Short, human-readable summary of the case"""
+
+ updated: datetime
+ """Date and time at which the case was last updated"""
diff --git a/src/lithic/types/transaction_monitoring/queue.py b/src/lithic/types/transaction_monitoring/queue.py
new file mode 100644
index 00000000..5bab04ba
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/queue.py
@@ -0,0 +1,61 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import Optional
+from datetime import datetime
+
+from pydantic import Field as FieldInfo
+
+from ..._models import BaseModel
+
+__all__ = ["Queue", "CaseCounts"]
+
+
+class CaseCounts(BaseModel):
+ """Number of cases in the queue, broken down by status.
+
+ A status is omitted
+ when the queue has no cases in that status
+ """
+
+ assigned: Optional[int] = FieldInfo(alias="ASSIGNED", default=None)
+ """Number of cases in the queue with status `ASSIGNED`"""
+
+ closed: Optional[int] = FieldInfo(alias="CLOSED", default=None)
+ """Number of cases in the queue with status `CLOSED`"""
+
+ escalated: Optional[int] = FieldInfo(alias="ESCALATED", default=None)
+ """Number of cases in the queue with status `ESCALATED`"""
+
+ in_review: Optional[int] = FieldInfo(alias="IN_REVIEW", default=None)
+ """Number of cases in the queue with status `IN_REVIEW`"""
+
+ open: Optional[int] = FieldInfo(alias="OPEN", default=None)
+ """Number of cases in the queue with status `OPEN`"""
+
+ resolved: Optional[int] = FieldInfo(alias="RESOLVED", default=None)
+ """Number of cases in the queue with status `RESOLVED`"""
+
+
+class Queue(BaseModel):
+ """A queue that groups transaction monitoring cases for review"""
+
+ token: str
+ """Globally unique identifier for the queue"""
+
+ case_counts: CaseCounts
+ """Number of cases in the queue, broken down by status.
+
+ A status is omitted when the queue has no cases in that status
+ """
+
+ created: datetime
+ """Date and time at which the queue was created"""
+
+ description: Optional[str] = None
+ """Optional description of the queue"""
+
+ name: str
+ """Human-readable name of the queue"""
+
+ updated: datetime
+ """Date and time at which the queue was last updated"""
diff --git a/src/lithic/types/transaction_monitoring/queue_create_params.py b/src/lithic/types/transaction_monitoring/queue_create_params.py
new file mode 100644
index 00000000..1cd25057
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/queue_create_params.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import Required, TypedDict
+
+__all__ = ["QueueCreateParams"]
+
+
+class QueueCreateParams(TypedDict, total=False):
+ name: Required[str]
+ """Human-readable name of the queue"""
+
+ description: Optional[str]
+ """Optional description of the queue"""
diff --git a/src/lithic/types/transaction_monitoring/queue_list_params.py b/src/lithic/types/transaction_monitoring/queue_list_params.py
new file mode 100644
index 00000000..137ca383
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/queue_list_params.py
@@ -0,0 +1,25 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["QueueListParams"]
+
+
+class QueueListParams(TypedDict, total=False):
+ ending_before: str
+ """A cursor representing an item's token before which a page of results should end.
+
+ Used to retrieve the previous page of results before this item.
+ """
+
+ page_size: int
+ """Page size (for pagination)."""
+
+ starting_after: str
+ """A cursor representing an item's token after which a page of results should
+ begin.
+
+ Used to retrieve the next page of results after this item.
+ """
diff --git a/src/lithic/types/transaction_monitoring/queue_update_params.py b/src/lithic/types/transaction_monitoring/queue_update_params.py
new file mode 100644
index 00000000..fbeb7042
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/queue_update_params.py
@@ -0,0 +1,16 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing import Optional
+from typing_extensions import TypedDict
+
+__all__ = ["QueueUpdateParams"]
+
+
+class QueueUpdateParams(TypedDict, total=False):
+ description: Optional[str]
+ """New description for the queue, or `null` to clear it"""
+
+ name: str
+ """New name for the queue"""
diff --git a/src/lithic/types/transaction_monitoring/resolution_outcome.py b/src/lithic/types/transaction_monitoring/resolution_outcome.py
new file mode 100644
index 00000000..ec2c8833
--- /dev/null
+++ b/src/lithic/types/transaction_monitoring/resolution_outcome.py
@@ -0,0 +1,9 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing_extensions import Literal, TypeAlias
+
+__all__ = ["ResolutionOutcome"]
+
+ResolutionOutcome: TypeAlias = Literal[
+ "CONFIRMED_FRAUD", "SUSPICIOUS_ACTIVITY", "FALSE_POSITIVE", "NO_ACTION_REQUIRED", "ESCALATED_EXTERNAL"
+]
diff --git a/tests/api_resources/transaction_monitoring/__init__.py b/tests/api_resources/transaction_monitoring/__init__.py
new file mode 100644
index 00000000..fd8019a9
--- /dev/null
+++ b/tests/api_resources/transaction_monitoring/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/transaction_monitoring/cases/__init__.py b/tests/api_resources/transaction_monitoring/cases/__init__.py
new file mode 100644
index 00000000..fd8019a9
--- /dev/null
+++ b/tests/api_resources/transaction_monitoring/cases/__init__.py
@@ -0,0 +1 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
diff --git a/tests/api_resources/transaction_monitoring/cases/test_comments.py b/tests/api_resources/transaction_monitoring/cases/test_comments.py
new file mode 100644
index 00000000..c882c116
--- /dev/null
+++ b/tests/api_resources/transaction_monitoring/cases/test_comments.py
@@ -0,0 +1,348 @@
+# 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 lithic import Lithic, AsyncLithic
+from tests.utils import assert_matches_type
+from lithic.types.transaction_monitoring import CaseActivityEntry
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestComments:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: Lithic) -> None:
+ comment = client.transaction_monitoring.cases.comments.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ def test_method_create_with_all_params(self, client: Lithic) -> None:
+ comment = client.transaction_monitoring.cases.comments.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ actor_token="actor_token",
+ )
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.comments.with_raw_response.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ comment = response.parse()
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.comments.with_streaming_response.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ comment = response.parse()
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_create(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.comments.with_raw_response.create(
+ case_token="",
+ comment="comment",
+ )
+
+ @parametrize
+ def test_method_update(self, client: Lithic) -> None:
+ comment = client.transaction_monitoring.cases.comments.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ def test_method_update_with_all_params(self, client: Lithic) -> None:
+ comment = client.transaction_monitoring.cases.comments.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ actor_token="actor_token",
+ )
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ def test_raw_response_update(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.comments.with_raw_response.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ comment = response.parse()
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ def test_streaming_response_update(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.comments.with_streaming_response.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ comment = response.parse()
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_update(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.comments.with_raw_response.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="",
+ comment="comment",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `comment_token` but received ''"):
+ client.transaction_monitoring.cases.comments.with_raw_response.update(
+ comment_token="",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+
+ @parametrize
+ def test_method_delete(self, client: Lithic) -> None:
+ comment = client.transaction_monitoring.cases.comments.delete(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert comment is None
+
+ @parametrize
+ def test_raw_response_delete(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.comments.with_raw_response.delete(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ comment = response.parse()
+ assert comment is None
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.comments.with_streaming_response.delete(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ comment = response.parse()
+ assert comment is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.comments.with_raw_response.delete(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `comment_token` but received ''"):
+ client.transaction_monitoring.cases.comments.with_raw_response.delete(
+ comment_token="",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+
+class TestAsyncComments:
+ 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: AsyncLithic) -> None:
+ comment = await async_client.transaction_monitoring.cases.comments.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncLithic) -> None:
+ comment = await async_client.transaction_monitoring.cases.comments.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ actor_token="actor_token",
+ )
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.comments.with_raw_response.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ comment = response.parse()
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.comments.with_streaming_response.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ comment = await response.parse()
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.comments.with_raw_response.create(
+ case_token="",
+ comment="comment",
+ )
+
+ @parametrize
+ async def test_method_update(self, async_client: AsyncLithic) -> None:
+ comment = await async_client.transaction_monitoring.cases.comments.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ async def test_method_update_with_all_params(self, async_client: AsyncLithic) -> None:
+ comment = await async_client.transaction_monitoring.cases.comments.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ actor_token="actor_token",
+ )
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ async def test_raw_response_update(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.comments.with_raw_response.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ comment = response.parse()
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_update(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.comments.with_streaming_response.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ comment = await response.parse()
+ assert_matches_type(CaseActivityEntry, comment, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_update(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.comments.with_raw_response.update(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="",
+ comment="comment",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `comment_token` but received ''"):
+ await async_client.transaction_monitoring.cases.comments.with_raw_response.update(
+ comment_token="",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ comment="comment",
+ )
+
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncLithic) -> None:
+ comment = await async_client.transaction_monitoring.cases.comments.delete(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert comment is None
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.comments.with_raw_response.delete(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ comment = response.parse()
+ assert comment is None
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.comments.with_streaming_response.delete(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ comment = await response.parse()
+ assert comment is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.comments.with_raw_response.delete(
+ comment_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `comment_token` but received ''"):
+ await async_client.transaction_monitoring.cases.comments.with_raw_response.delete(
+ comment_token="",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
diff --git a/tests/api_resources/transaction_monitoring/cases/test_files.py b/tests/api_resources/transaction_monitoring/cases/test_files.py
new file mode 100644
index 00000000..daea1d17
--- /dev/null
+++ b/tests/api_resources/transaction_monitoring/cases/test_files.py
@@ -0,0 +1,397 @@
+# 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 lithic import Lithic, AsyncLithic
+from tests.utils import assert_matches_type
+from lithic.pagination import SyncCursorPage, AsyncCursorPage
+from lithic.types.transaction_monitoring.cases import CaseFile
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestFiles:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: Lithic) -> None:
+ file = client.transaction_monitoring.cases.files.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ name="name",
+ )
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.files.with_raw_response.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ name="name",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ file = response.parse()
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.files.with_streaming_response.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ name="name",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ file = response.parse()
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_create(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.files.with_raw_response.create(
+ case_token="",
+ name="name",
+ )
+
+ @parametrize
+ def test_method_retrieve(self, client: Lithic) -> None:
+ file = client.transaction_monitoring.cases.files.retrieve(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ @parametrize
+ def test_raw_response_retrieve(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.files.with_raw_response.retrieve(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ file = response.parse()
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.files.with_streaming_response.retrieve(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ file = response.parse()
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_retrieve(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.files.with_raw_response.retrieve(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_token` but received ''"):
+ client.transaction_monitoring.cases.files.with_raw_response.retrieve(
+ file_token="",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @parametrize
+ def test_method_list(self, client: Lithic) -> None:
+ file = client.transaction_monitoring.cases.files.list(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SyncCursorPage[CaseFile], file, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Lithic) -> None:
+ file = client.transaction_monitoring.cases.files.list(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SyncCursorPage[CaseFile], file, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.files.with_raw_response.list(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ file = response.parse()
+ assert_matches_type(SyncCursorPage[CaseFile], file, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.files.with_streaming_response.list(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ file = response.parse()
+ assert_matches_type(SyncCursorPage[CaseFile], file, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_list(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.files.with_raw_response.list(
+ case_token="",
+ )
+
+ @parametrize
+ def test_method_delete(self, client: Lithic) -> None:
+ file = client.transaction_monitoring.cases.files.delete(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert file is None
+
+ @parametrize
+ def test_raw_response_delete(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.files.with_raw_response.delete(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ file = response.parse()
+ assert file is None
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.files.with_streaming_response.delete(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ file = response.parse()
+ assert file is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.files.with_raw_response.delete(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_token` but received ''"):
+ client.transaction_monitoring.cases.files.with_raw_response.delete(
+ file_token="",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+
+class TestAsyncFiles:
+ 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: AsyncLithic) -> None:
+ file = await async_client.transaction_monitoring.cases.files.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ name="name",
+ )
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.files.with_raw_response.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ name="name",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ file = response.parse()
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.files.with_streaming_response.create(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ name="name",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ file = await response.parse()
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_create(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.files.with_raw_response.create(
+ case_token="",
+ name="name",
+ )
+
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncLithic) -> None:
+ file = await async_client.transaction_monitoring.cases.files.retrieve(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.files.with_raw_response.retrieve(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ file = response.parse()
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.files.with_streaming_response.retrieve(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ file = await response.parse()
+ assert_matches_type(CaseFile, file, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_retrieve(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.files.with_raw_response.retrieve(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_token` but received ''"):
+ await async_client.transaction_monitoring.cases.files.with_raw_response.retrieve(
+ file_token="",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ @parametrize
+ async def test_method_list(self, async_client: AsyncLithic) -> None:
+ file = await async_client.transaction_monitoring.cases.files.list(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AsyncCursorPage[CaseFile], file, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncLithic) -> None:
+ file = await async_client.transaction_monitoring.cases.files.list(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AsyncCursorPage[CaseFile], file, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.files.with_raw_response.list(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ file = response.parse()
+ assert_matches_type(AsyncCursorPage[CaseFile], file, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.files.with_streaming_response.list(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ file = await response.parse()
+ assert_matches_type(AsyncCursorPage[CaseFile], file, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_list(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.files.with_raw_response.list(
+ case_token="",
+ )
+
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncLithic) -> None:
+ file = await async_client.transaction_monitoring.cases.files.delete(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert file is None
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.files.with_raw_response.delete(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ file = response.parse()
+ assert file is None
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.files.with_streaming_response.delete(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ file = await response.parse()
+ assert file is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.files.with_raw_response.delete(
+ file_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ case_token="",
+ )
+
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_token` but received ''"):
+ await async_client.transaction_monitoring.cases.files.with_raw_response.delete(
+ file_token="",
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
diff --git a/tests/api_resources/transaction_monitoring/test_cases.py b/tests/api_resources/transaction_monitoring/test_cases.py
new file mode 100644
index 00000000..4d14db57
--- /dev/null
+++ b/tests/api_resources/transaction_monitoring/test_cases.py
@@ -0,0 +1,573 @@
+# 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 lithic import Lithic, AsyncLithic
+from tests.utils import assert_matches_type
+from lithic._utils import parse_datetime
+from lithic.pagination import SyncCursorPage, AsyncCursorPage
+from lithic.types.transaction_monitoring import (
+ MonitoringCase,
+ CaseTransaction,
+ CaseActivityEntry,
+ CaseRetrieveCardsResponse,
+)
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestCases:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_retrieve(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ def test_raw_response_retrieve(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.with_raw_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.with_streaming_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = response.parse()
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_retrieve(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.with_raw_response.retrieve(
+ "",
+ )
+
+ @parametrize
+ def test_method_update(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.update(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ def test_method_update_with_all_params(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.update(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ actor_token="actor_token",
+ assignee="assignee",
+ priority="LOW",
+ resolution="CONFIRMED_FRAUD",
+ resolution_notes="resolution_notes",
+ sla_deadline=parse_datetime("2019-12-27T18:11:19.117Z"),
+ status="OPEN",
+ tags={"foo": "string"},
+ title="title",
+ )
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ def test_raw_response_update(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.with_raw_response.update(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ def test_streaming_response_update(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.with_streaming_response.update(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = response.parse()
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_update(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.with_raw_response.update(
+ case_token="",
+ )
+
+ @parametrize
+ def test_method_list(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.list()
+ assert_matches_type(SyncCursorPage[MonitoringCase], case, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.list(
+ account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ assignee="assignee",
+ begin=parse_datetime("2019-12-27T18:11:19.117Z"),
+ card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ entity_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ sort_by="CREATED_ASC",
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ status="OPEN",
+ transaction_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SyncCursorPage[MonitoringCase], case, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(SyncCursorPage[MonitoringCase], case, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = response.parse()
+ assert_matches_type(SyncCursorPage[MonitoringCase], case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_list_activity(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.list_activity(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SyncCursorPage[CaseActivityEntry], case, path=["response"])
+
+ @parametrize
+ def test_method_list_activity_with_all_params(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.list_activity(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SyncCursorPage[CaseActivityEntry], case, path=["response"])
+
+ @parametrize
+ def test_raw_response_list_activity(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.with_raw_response.list_activity(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(SyncCursorPage[CaseActivityEntry], case, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list_activity(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.with_streaming_response.list_activity(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = response.parse()
+ assert_matches_type(SyncCursorPage[CaseActivityEntry], case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_list_activity(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.with_raw_response.list_activity(
+ case_token="",
+ )
+
+ @parametrize
+ def test_method_list_transactions(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.list_transactions(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SyncCursorPage[CaseTransaction], case, path=["response"])
+
+ @parametrize
+ def test_method_list_transactions_with_all_params(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.list_transactions(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SyncCursorPage[CaseTransaction], case, path=["response"])
+
+ @parametrize
+ def test_raw_response_list_transactions(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.with_raw_response.list_transactions(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(SyncCursorPage[CaseTransaction], case, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list_transactions(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.with_streaming_response.list_transactions(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = response.parse()
+ assert_matches_type(SyncCursorPage[CaseTransaction], case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_list_transactions(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.with_raw_response.list_transactions(
+ case_token="",
+ )
+
+ @parametrize
+ def test_method_retrieve_cards(self, client: Lithic) -> None:
+ case = client.transaction_monitoring.cases.retrieve_cards(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(CaseRetrieveCardsResponse, case, path=["response"])
+
+ @parametrize
+ def test_raw_response_retrieve_cards(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.cases.with_raw_response.retrieve_cards(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(CaseRetrieveCardsResponse, case, path=["response"])
+
+ @parametrize
+ def test_streaming_response_retrieve_cards(self, client: Lithic) -> None:
+ with client.transaction_monitoring.cases.with_streaming_response.retrieve_cards(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = response.parse()
+ assert_matches_type(CaseRetrieveCardsResponse, case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_retrieve_cards(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ client.transaction_monitoring.cases.with_raw_response.retrieve_cards(
+ "",
+ )
+
+
+class TestAsyncCases:
+ parametrize = pytest.mark.parametrize(
+ "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"]
+ )
+
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.with_raw_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.with_streaming_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = await response.parse()
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_retrieve(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.with_raw_response.retrieve(
+ "",
+ )
+
+ @parametrize
+ async def test_method_update(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.update(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ async def test_method_update_with_all_params(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.update(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ actor_token="actor_token",
+ assignee="assignee",
+ priority="LOW",
+ resolution="CONFIRMED_FRAUD",
+ resolution_notes="resolution_notes",
+ sla_deadline=parse_datetime("2019-12-27T18:11:19.117Z"),
+ status="OPEN",
+ tags={"foo": "string"},
+ title="title",
+ )
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ async def test_raw_response_update(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.with_raw_response.update(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_update(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.with_streaming_response.update(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = await response.parse()
+ assert_matches_type(MonitoringCase, case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_update(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.with_raw_response.update(
+ case_token="",
+ )
+
+ @parametrize
+ async def test_method_list(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.list()
+ assert_matches_type(AsyncCursorPage[MonitoringCase], case, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.list(
+ account_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ assignee="assignee",
+ begin=parse_datetime("2019-12-27T18:11:19.117Z"),
+ card_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ end=parse_datetime("2019-12-27T18:11:19.117Z"),
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ entity_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ rule_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ sort_by="CREATED_ASC",
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ status="OPEN",
+ transaction_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AsyncCursorPage[MonitoringCase], case, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(AsyncCursorPage[MonitoringCase], case, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = await response.parse()
+ assert_matches_type(AsyncCursorPage[MonitoringCase], case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_list_activity(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.list_activity(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AsyncCursorPage[CaseActivityEntry], case, path=["response"])
+
+ @parametrize
+ async def test_method_list_activity_with_all_params(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.list_activity(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AsyncCursorPage[CaseActivityEntry], case, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list_activity(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.with_raw_response.list_activity(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(AsyncCursorPage[CaseActivityEntry], case, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list_activity(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.with_streaming_response.list_activity(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = await response.parse()
+ assert_matches_type(AsyncCursorPage[CaseActivityEntry], case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_list_activity(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.with_raw_response.list_activity(
+ case_token="",
+ )
+
+ @parametrize
+ async def test_method_list_transactions(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.list_transactions(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AsyncCursorPage[CaseTransaction], case, path=["response"])
+
+ @parametrize
+ async def test_method_list_transactions_with_all_params(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.list_transactions(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AsyncCursorPage[CaseTransaction], case, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list_transactions(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.with_raw_response.list_transactions(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(AsyncCursorPage[CaseTransaction], case, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list_transactions(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.with_streaming_response.list_transactions(
+ case_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = await response.parse()
+ assert_matches_type(AsyncCursorPage[CaseTransaction], case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_list_transactions(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.with_raw_response.list_transactions(
+ case_token="",
+ )
+
+ @parametrize
+ async def test_method_retrieve_cards(self, async_client: AsyncLithic) -> None:
+ case = await async_client.transaction_monitoring.cases.retrieve_cards(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(CaseRetrieveCardsResponse, case, path=["response"])
+
+ @parametrize
+ async def test_raw_response_retrieve_cards(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.cases.with_raw_response.retrieve_cards(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ case = response.parse()
+ assert_matches_type(CaseRetrieveCardsResponse, case, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_retrieve_cards(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.cases.with_streaming_response.retrieve_cards(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ case = await response.parse()
+ assert_matches_type(CaseRetrieveCardsResponse, case, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_retrieve_cards(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `case_token` but received ''"):
+ await async_client.transaction_monitoring.cases.with_raw_response.retrieve_cards(
+ "",
+ )
diff --git a/tests/api_resources/transaction_monitoring/test_queues.py b/tests/api_resources/transaction_monitoring/test_queues.py
new file mode 100644
index 00000000..24809ce2
--- /dev/null
+++ b/tests/api_resources/transaction_monitoring/test_queues.py
@@ -0,0 +1,417 @@
+# 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 lithic import Lithic, AsyncLithic
+from tests.utils import assert_matches_type
+from lithic.pagination import SyncCursorPage, AsyncCursorPage
+from lithic.types.transaction_monitoring import Queue
+
+base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
+
+
+class TestQueues:
+ parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"])
+
+ @parametrize
+ def test_method_create(self, client: Lithic) -> None:
+ queue = client.transaction_monitoring.queues.create(
+ name="name",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ def test_method_create_with_all_params(self, client: Lithic) -> None:
+ queue = client.transaction_monitoring.queues.create(
+ name="name",
+ description="description",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ def test_raw_response_create(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.queues.with_raw_response.create(
+ name="name",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ def test_streaming_response_create(self, client: Lithic) -> None:
+ with client.transaction_monitoring.queues.with_streaming_response.create(
+ name="name",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_retrieve(self, client: Lithic) -> None:
+ queue = client.transaction_monitoring.queues.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ def test_raw_response_retrieve(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.queues.with_raw_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ def test_streaming_response_retrieve(self, client: Lithic) -> None:
+ with client.transaction_monitoring.queues.with_streaming_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_retrieve(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_token` but received ''"):
+ client.transaction_monitoring.queues.with_raw_response.retrieve(
+ "",
+ )
+
+ @parametrize
+ def test_method_update(self, client: Lithic) -> None:
+ queue = client.transaction_monitoring.queues.update(
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ def test_method_update_with_all_params(self, client: Lithic) -> None:
+ queue = client.transaction_monitoring.queues.update(
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ description="description",
+ name="name",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ def test_raw_response_update(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.queues.with_raw_response.update(
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ def test_streaming_response_update(self, client: Lithic) -> None:
+ with client.transaction_monitoring.queues.with_streaming_response.update(
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_update(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_token` but received ''"):
+ client.transaction_monitoring.queues.with_raw_response.update(
+ queue_token="",
+ )
+
+ @parametrize
+ def test_method_list(self, client: Lithic) -> None:
+ queue = client.transaction_monitoring.queues.list()
+ assert_matches_type(SyncCursorPage[Queue], queue, path=["response"])
+
+ @parametrize
+ def test_method_list_with_all_params(self, client: Lithic) -> None:
+ queue = client.transaction_monitoring.queues.list(
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(SyncCursorPage[Queue], queue, path=["response"])
+
+ @parametrize
+ def test_raw_response_list(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.queues.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert_matches_type(SyncCursorPage[Queue], queue, path=["response"])
+
+ @parametrize
+ def test_streaming_response_list(self, client: Lithic) -> None:
+ with client.transaction_monitoring.queues.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = response.parse()
+ assert_matches_type(SyncCursorPage[Queue], queue, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_method_delete(self, client: Lithic) -> None:
+ queue = client.transaction_monitoring.queues.delete(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert queue is None
+
+ @parametrize
+ def test_raw_response_delete(self, client: Lithic) -> None:
+ response = client.transaction_monitoring.queues.with_raw_response.delete(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert queue is None
+
+ @parametrize
+ def test_streaming_response_delete(self, client: Lithic) -> None:
+ with client.transaction_monitoring.queues.with_streaming_response.delete(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = response.parse()
+ assert queue is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_delete(self, client: Lithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_token` but received ''"):
+ client.transaction_monitoring.queues.with_raw_response.delete(
+ "",
+ )
+
+
+class TestAsyncQueues:
+ 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: AsyncLithic) -> None:
+ queue = await async_client.transaction_monitoring.queues.create(
+ name="name",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ async def test_method_create_with_all_params(self, async_client: AsyncLithic) -> None:
+ queue = await async_client.transaction_monitoring.queues.create(
+ name="name",
+ description="description",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ async def test_raw_response_create(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.queues.with_raw_response.create(
+ name="name",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_create(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.queues.with_streaming_response.create(
+ name="name",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = await response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_retrieve(self, async_client: AsyncLithic) -> None:
+ queue = await async_client.transaction_monitoring.queues.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ async def test_raw_response_retrieve(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.queues.with_raw_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_retrieve(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.queues.with_streaming_response.retrieve(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = await response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_retrieve(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_token` but received ''"):
+ await async_client.transaction_monitoring.queues.with_raw_response.retrieve(
+ "",
+ )
+
+ @parametrize
+ async def test_method_update(self, async_client: AsyncLithic) -> None:
+ queue = await async_client.transaction_monitoring.queues.update(
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ async def test_method_update_with_all_params(self, async_client: AsyncLithic) -> None:
+ queue = await async_client.transaction_monitoring.queues.update(
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ description="description",
+ name="name",
+ )
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ async def test_raw_response_update(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.queues.with_raw_response.update(
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_update(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.queues.with_streaming_response.update(
+ queue_token="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = await response.parse()
+ assert_matches_type(Queue, queue, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_update(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_token` but received ''"):
+ await async_client.transaction_monitoring.queues.with_raw_response.update(
+ queue_token="",
+ )
+
+ @parametrize
+ async def test_method_list(self, async_client: AsyncLithic) -> None:
+ queue = await async_client.transaction_monitoring.queues.list()
+ assert_matches_type(AsyncCursorPage[Queue], queue, path=["response"])
+
+ @parametrize
+ async def test_method_list_with_all_params(self, async_client: AsyncLithic) -> None:
+ queue = await async_client.transaction_monitoring.queues.list(
+ ending_before="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ page_size=1,
+ starting_after="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert_matches_type(AsyncCursorPage[Queue], queue, path=["response"])
+
+ @parametrize
+ async def test_raw_response_list(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.queues.with_raw_response.list()
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert_matches_type(AsyncCursorPage[Queue], queue, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_list(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.queues.with_streaming_response.list() as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = await response.parse()
+ assert_matches_type(AsyncCursorPage[Queue], queue, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_method_delete(self, async_client: AsyncLithic) -> None:
+ queue = await async_client.transaction_monitoring.queues.delete(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+ assert queue is None
+
+ @parametrize
+ async def test_raw_response_delete(self, async_client: AsyncLithic) -> None:
+ response = await async_client.transaction_monitoring.queues.with_raw_response.delete(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ queue = response.parse()
+ assert queue is None
+
+ @parametrize
+ async def test_streaming_response_delete(self, async_client: AsyncLithic) -> None:
+ async with async_client.transaction_monitoring.queues.with_streaming_response.delete(
+ "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ queue = await response.parse()
+ assert queue is None
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_delete(self, async_client: AsyncLithic) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `queue_token` but received ''"):
+ await async_client.transaction_monitoring.queues.with_raw_response.delete(
+ "",
+ )