From c29da7803e93ca8046292a8036b0000767c0fd29 Mon Sep 17 00:00:00 2001
From: "stainless-app[bot]"
<142633134+stainless-app[bot]@users.noreply.github.com>
Date: Tue, 30 Jul 2024 15:09:58 +0000
Subject: [PATCH] feat(api): update via SDK Studio (#271)
---
api.md | 17 ++++++----
.../resources/news/news_items.py | 10 +++---
.../resources/news/newsfeeds/items.py | 10 +++---
.../resources/news/newsfeeds/newsfeeds.py | 10 +++---
src/python_intercom/types/__init__.py | 1 -
src/python_intercom/types/news/__init__.py | 2 ++
.../news_item_list_response.py} | 10 +++---
.../types/news/newsfeed_list_response.py | 32 +++++++++++++++++++
.../types/news/newsfeeds/__init__.py | 2 ++
.../news/newsfeeds/item_list_response.py | 32 +++++++++++++++++++
src/python_intercom/types/shared/__init__.py | 1 -
.../news/newsfeeds/test_items.py | 18 +++++------
tests/api_resources/news/test_news_items.py | 18 +++++------
tests/api_resources/news/test_newsfeeds.py | 19 ++++++-----
14 files changed, 126 insertions(+), 56 deletions(-)
rename src/python_intercom/types/{shared/paginated_response.py => news/news_item_list_response.py} (81%)
create mode 100644 src/python_intercom/types/news/newsfeed_list_response.py
create mode 100644 src/python_intercom/types/news/newsfeeds/item_list_response.py
diff --git a/api.md b/api.md
index 9d1e9f19..edb09daa 100644
--- a/api.md
+++ b/api.md
@@ -15,7 +15,6 @@ from python_intercom.types import (
Message,
MultipleFilterSearchRequest,
Note,
- PaginatedResponse,
PartAttachment,
Reference,
SearchRequest,
@@ -365,7 +364,7 @@ Methods:
Types:
```python
-from python_intercom.types.news import NewsItem, NewsItemDeleteResponse
+from python_intercom.types.news import NewsItem, NewsItemListResponse, NewsItemDeleteResponse
```
Methods:
@@ -373,7 +372,7 @@ Methods:
- client.news.news_items.create(\*\*params) -> NewsItem
- client.news.news_items.retrieve(id) -> NewsItem
- client.news.news_items.update(id, \*\*params) -> NewsItem
-- client.news.news_items.list() -> PaginatedResponse
+- client.news.news_items.list() -> NewsItemListResponse
- client.news.news_items.delete(id) -> NewsItemDeleteResponse
## Newsfeeds
@@ -381,19 +380,25 @@ Methods:
Types:
```python
-from python_intercom.types.news import Newsfeed
+from python_intercom.types.news import Newsfeed, NewsfeedListResponse
```
Methods:
- client.news.newsfeeds.retrieve(id) -> Newsfeed
-- client.news.newsfeeds.list() -> PaginatedResponse
+- client.news.newsfeeds.list() -> NewsfeedListResponse
### Items
+Types:
+
+```python
+from python_intercom.types.news.newsfeeds import ItemListResponse
+```
+
Methods:
-- client.news.newsfeeds.items.list(id) -> PaginatedResponse
+- client.news.newsfeeds.items.list(id) -> ItemListResponse
# Notes
diff --git a/src/python_intercom/resources/news/news_items.py b/src/python_intercom/resources/news/news_items.py
index b346eb33..a58f2f7a 100644
--- a/src/python_intercom/resources/news/news_items.py
+++ b/src/python_intercom/resources/news/news_items.py
@@ -25,7 +25,7 @@
from ...types.news import news_item_create_params, news_item_update_params
from ..._base_client import make_request_options
from ...types.news.news_item import NewsItem
-from ...types.shared.paginated_response import PaginatedResponse
+from ...types.news.news_item_list_response import NewsItemListResponse
from ...types.news.news_item_delete_response import NewsItemDeleteResponse
__all__ = ["NewsItemsResource", "AsyncNewsItemsResource"]
@@ -327,7 +327,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PaginatedResponse:
+ ) -> NewsItemListResponse:
"""
You can fetch a list of all news items
@@ -352,7 +352,7 @@ def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=PaginatedResponse,
+ cast_to=NewsItemListResponse,
)
def delete(
@@ -711,7 +711,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PaginatedResponse:
+ ) -> NewsItemListResponse:
"""
You can fetch a list of all news items
@@ -736,7 +736,7 @@ async def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=PaginatedResponse,
+ cast_to=NewsItemListResponse,
)
async def delete(
diff --git a/src/python_intercom/resources/news/newsfeeds/items.py b/src/python_intercom/resources/news/newsfeeds/items.py
index 63175b30..571ee207 100644
--- a/src/python_intercom/resources/news/newsfeeds/items.py
+++ b/src/python_intercom/resources/news/newsfeeds/items.py
@@ -17,7 +17,7 @@
async_to_streamed_response_wrapper,
)
from ...._base_client import make_request_options
-from ....types.shared.paginated_response import PaginatedResponse
+from ....types.news.newsfeeds.item_list_response import ItemListResponse
__all__ = ["ItemsResource", "AsyncItemsResource"]
@@ -62,7 +62,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PaginatedResponse:
+ ) -> ItemListResponse:
"""
You can fetch a list of all news items that are live on a given newsfeed
@@ -89,7 +89,7 @@ def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=PaginatedResponse,
+ cast_to=ItemListResponse,
)
@@ -133,7 +133,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PaginatedResponse:
+ ) -> ItemListResponse:
"""
You can fetch a list of all news items that are live on a given newsfeed
@@ -160,7 +160,7 @@ async def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=PaginatedResponse,
+ cast_to=ItemListResponse,
)
diff --git a/src/python_intercom/resources/news/newsfeeds/newsfeeds.py b/src/python_intercom/resources/news/newsfeeds/newsfeeds.py
index ffcd4985..ed398314 100644
--- a/src/python_intercom/resources/news/newsfeeds/newsfeeds.py
+++ b/src/python_intercom/resources/news/newsfeeds/newsfeeds.py
@@ -26,7 +26,7 @@
)
from ...._base_client import make_request_options
from ....types.news.newsfeed import Newsfeed
-from ....types.shared.paginated_response import PaginatedResponse
+from ....types.news.newsfeed_list_response import NewsfeedListResponse
__all__ = ["NewsfeedsResource", "AsyncNewsfeedsResource"]
@@ -135,7 +135,7 @@ def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PaginatedResponse:
+ ) -> NewsfeedListResponse:
"""
You can fetch a list of all newsfeeds
@@ -160,7 +160,7 @@ def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=PaginatedResponse,
+ cast_to=NewsfeedListResponse,
)
@@ -268,7 +268,7 @@ async def list(
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
- ) -> PaginatedResponse:
+ ) -> NewsfeedListResponse:
"""
You can fetch a list of all newsfeeds
@@ -293,7 +293,7 @@ async def list(
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
- cast_to=PaginatedResponse,
+ cast_to=NewsfeedListResponse,
)
diff --git a/src/python_intercom/types/__init__.py b/src/python_intercom/types/__init__.py
index 37e28bc5..a0f68036 100644
--- a/src/python_intercom/types/__init__.py
+++ b/src/python_intercom/types/__init__.py
@@ -20,7 +20,6 @@
ArticleContent as ArticleContent,
PartAttachment as PartAttachment,
ContactReference as ContactReference,
- PaginatedResponse as PaginatedResponse,
StartingAfterPaging as StartingAfterPaging,
TicketTypeAttribute as TicketTypeAttribute,
SubscriptionTypeList as SubscriptionTypeList,
diff --git a/src/python_intercom/types/news/__init__.py b/src/python_intercom/types/news/__init__.py
index 41c0fea4..cb408518 100644
--- a/src/python_intercom/types/news/__init__.py
+++ b/src/python_intercom/types/news/__init__.py
@@ -4,6 +4,8 @@
from .newsfeed import Newsfeed as Newsfeed
from .news_item import NewsItem as NewsItem
+from .newsfeed_list_response import NewsfeedListResponse as NewsfeedListResponse
from .news_item_create_params import NewsItemCreateParams as NewsItemCreateParams
+from .news_item_list_response import NewsItemListResponse as NewsItemListResponse
from .news_item_update_params import NewsItemUpdateParams as NewsItemUpdateParams
from .news_item_delete_response import NewsItemDeleteResponse as NewsItemDeleteResponse
diff --git a/src/python_intercom/types/shared/paginated_response.py b/src/python_intercom/types/news/news_item_list_response.py
similarity index 81%
rename from src/python_intercom/types/shared/paginated_response.py
rename to src/python_intercom/types/news/news_item_list_response.py
index bc025b53..4cb5b729 100644
--- a/src/python_intercom/types/shared/paginated_response.py
+++ b/src/python_intercom/types/news/news_item_list_response.py
@@ -3,17 +3,17 @@
from typing import List, Union, Optional
from typing_extensions import Literal
+from .newsfeed import Newsfeed
from ..._models import BaseModel
-from .cursor_pages import CursorPages
-from ..news.newsfeed import Newsfeed
-from ..news.news_item import NewsItem
+from .news_item import NewsItem
+from ..shared.cursor_pages import CursorPages
-__all__ = ["PaginatedResponse", "Data"]
+__all__ = ["NewsItemListResponse", "Data"]
Data = Union[NewsItem, Newsfeed]
-class PaginatedResponse(BaseModel):
+class NewsItemListResponse(BaseModel):
data: Optional[List[Data]] = None
"""An array of Objects"""
diff --git a/src/python_intercom/types/news/newsfeed_list_response.py b/src/python_intercom/types/news/newsfeed_list_response.py
new file mode 100644
index 00000000..170dd1ff
--- /dev/null
+++ b/src/python_intercom/types/news/newsfeed_list_response.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Union, Optional
+from typing_extensions import Literal
+
+from .newsfeed import Newsfeed
+from ..._models import BaseModel
+from .news_item import NewsItem
+from ..shared.cursor_pages import CursorPages
+
+__all__ = ["NewsfeedListResponse", "Data"]
+
+Data = Union[NewsItem, Newsfeed]
+
+
+class NewsfeedListResponse(BaseModel):
+ data: Optional[List[Data]] = None
+ """An array of Objects"""
+
+ pages: Optional[CursorPages] = None
+ """
+ Cursor-based pagination is a technique used in the Intercom API to navigate
+ through large amounts of data. A "cursor" or pointer is used to keep track of
+ the current position in the result set, allowing the API to return the data in
+ small chunks or "pages" as needed.
+ """
+
+ total_count: Optional[int] = None
+ """A count of the total number of objects."""
+
+ type: Optional[Literal["list", "conversation.list"]] = None
+ """The type of object"""
diff --git a/src/python_intercom/types/news/newsfeeds/__init__.py b/src/python_intercom/types/news/newsfeeds/__init__.py
index f8ee8b14..93502d4f 100644
--- a/src/python_intercom/types/news/newsfeeds/__init__.py
+++ b/src/python_intercom/types/news/newsfeeds/__init__.py
@@ -1,3 +1,5 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from __future__ import annotations
+
+from .item_list_response import ItemListResponse as ItemListResponse
diff --git a/src/python_intercom/types/news/newsfeeds/item_list_response.py b/src/python_intercom/types/news/newsfeeds/item_list_response.py
new file mode 100644
index 00000000..4e2d7f31
--- /dev/null
+++ b/src/python_intercom/types/news/newsfeeds/item_list_response.py
@@ -0,0 +1,32 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List, Union, Optional
+from typing_extensions import Literal
+
+from ..newsfeed import Newsfeed
+from ...._models import BaseModel
+from ..news_item import NewsItem
+from ...shared.cursor_pages import CursorPages
+
+__all__ = ["ItemListResponse", "Data"]
+
+Data = Union[NewsItem, Newsfeed]
+
+
+class ItemListResponse(BaseModel):
+ data: Optional[List[Data]] = None
+ """An array of Objects"""
+
+ pages: Optional[CursorPages] = None
+ """
+ Cursor-based pagination is a technique used in the Intercom API to navigate
+ through large amounts of data. A "cursor" or pointer is used to keep track of
+ the current position in the result set, allowing the API to return the data in
+ small chunks or "pages" as needed.
+ """
+
+ total_count: Optional[int] = None
+ """A count of the total number of objects."""
+
+ type: Optional[Literal["list", "conversation.list"]] = None
+ """The type of object"""
diff --git a/src/python_intercom/types/shared/__init__.py b/src/python_intercom/types/shared/__init__.py
index e5fe0d4f..4a029fbe 100644
--- a/src/python_intercom/types/shared/__init__.py
+++ b/src/python_intercom/types/shared/__init__.py
@@ -16,7 +16,6 @@
from .article_content import ArticleContent as ArticleContent
from .part_attachment import PartAttachment as PartAttachment
from .contact_reference import ContactReference as ContactReference
-from .paginated_response import PaginatedResponse as PaginatedResponse
from .starting_after_paging import StartingAfterPaging as StartingAfterPaging
from .ticket_type_attribute import TicketTypeAttribute as TicketTypeAttribute
from .subscription_type_list import SubscriptionTypeList as SubscriptionTypeList
diff --git a/tests/api_resources/news/newsfeeds/test_items.py b/tests/api_resources/news/newsfeeds/test_items.py
index 8bb85891..80926b94 100644
--- a/tests/api_resources/news/newsfeeds/test_items.py
+++ b/tests/api_resources/news/newsfeeds/test_items.py
@@ -9,7 +9,7 @@
from tests.utils import assert_matches_type
from python_intercom import Intercom, AsyncIntercom
-from python_intercom.types.shared import PaginatedResponse
+from python_intercom.types.news.newsfeeds import ItemListResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -22,7 +22,7 @@ def test_method_list(self, client: Intercom) -> None:
item = client.news.newsfeeds.items.list(
id="123",
)
- assert_matches_type(PaginatedResponse, item, path=["response"])
+ assert_matches_type(ItemListResponse, item, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Intercom) -> None:
@@ -30,7 +30,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None:
id="123",
intercom_version="2.11",
)
- assert_matches_type(PaginatedResponse, item, path=["response"])
+ assert_matches_type(ItemListResponse, item, path=["response"])
@parametrize
def test_raw_response_list(self, client: Intercom) -> None:
@@ -41,7 +41,7 @@ def test_raw_response_list(self, client: Intercom) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = response.parse()
- assert_matches_type(PaginatedResponse, item, path=["response"])
+ assert_matches_type(ItemListResponse, item, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Intercom) -> None:
@@ -52,7 +52,7 @@ def test_streaming_response_list(self, client: Intercom) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = response.parse()
- assert_matches_type(PaginatedResponse, item, path=["response"])
+ assert_matches_type(ItemListResponse, item, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -72,7 +72,7 @@ async def test_method_list(self, async_client: AsyncIntercom) -> None:
item = await async_client.news.newsfeeds.items.list(
id="123",
)
- assert_matches_type(PaginatedResponse, item, path=["response"])
+ assert_matches_type(ItemListResponse, item, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None:
@@ -80,7 +80,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) ->
id="123",
intercom_version="2.11",
)
- assert_matches_type(PaginatedResponse, item, path=["response"])
+ assert_matches_type(ItemListResponse, item, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncIntercom) -> None:
@@ -91,7 +91,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = await response.parse()
- assert_matches_type(PaginatedResponse, item, path=["response"])
+ assert_matches_type(ItemListResponse, item, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None:
@@ -102,7 +102,7 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
item = await response.parse()
- assert_matches_type(PaginatedResponse, item, path=["response"])
+ assert_matches_type(ItemListResponse, item, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/news/test_news_items.py b/tests/api_resources/news/test_news_items.py
index 4b8b5cca..9a2a39f0 100644
--- a/tests/api_resources/news/test_news_items.py
+++ b/tests/api_resources/news/test_news_items.py
@@ -11,9 +11,9 @@
from python_intercom import Intercom, AsyncIntercom
from python_intercom.types.news import (
NewsItem,
+ NewsItemListResponse,
NewsItemDeleteResponse,
)
-from python_intercom.types.shared import PaginatedResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -183,14 +183,14 @@ def test_streaming_response_update(self, client: Intercom) -> None:
@parametrize
def test_method_list(self, client: Intercom) -> None:
news_item = client.news.news_items.list()
- assert_matches_type(PaginatedResponse, news_item, path=["response"])
+ assert_matches_type(NewsItemListResponse, news_item, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Intercom) -> None:
news_item = client.news.news_items.list(
intercom_version="2.11",
)
- assert_matches_type(PaginatedResponse, news_item, path=["response"])
+ assert_matches_type(NewsItemListResponse, news_item, path=["response"])
@parametrize
def test_raw_response_list(self, client: Intercom) -> None:
@@ -199,7 +199,7 @@ def test_raw_response_list(self, client: Intercom) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
news_item = response.parse()
- assert_matches_type(PaginatedResponse, news_item, path=["response"])
+ assert_matches_type(NewsItemListResponse, news_item, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Intercom) -> None:
@@ -208,7 +208,7 @@ def test_streaming_response_list(self, client: Intercom) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
news_item = response.parse()
- assert_matches_type(PaginatedResponse, news_item, path=["response"])
+ assert_matches_type(NewsItemListResponse, news_item, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -417,14 +417,14 @@ async def test_streaming_response_update(self, async_client: AsyncIntercom) -> N
@parametrize
async def test_method_list(self, async_client: AsyncIntercom) -> None:
news_item = await async_client.news.news_items.list()
- assert_matches_type(PaginatedResponse, news_item, path=["response"])
+ assert_matches_type(NewsItemListResponse, news_item, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None:
news_item = await async_client.news.news_items.list(
intercom_version="2.11",
)
- assert_matches_type(PaginatedResponse, news_item, path=["response"])
+ assert_matches_type(NewsItemListResponse, news_item, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncIntercom) -> None:
@@ -433,7 +433,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
news_item = await response.parse()
- assert_matches_type(PaginatedResponse, news_item, path=["response"])
+ assert_matches_type(NewsItemListResponse, news_item, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None:
@@ -442,7 +442,7 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
news_item = await response.parse()
- assert_matches_type(PaginatedResponse, news_item, path=["response"])
+ assert_matches_type(NewsItemListResponse, news_item, path=["response"])
assert cast(Any, response.is_closed) is True
diff --git a/tests/api_resources/news/test_newsfeeds.py b/tests/api_resources/news/test_newsfeeds.py
index 2db0f22f..f870dc00 100644
--- a/tests/api_resources/news/test_newsfeeds.py
+++ b/tests/api_resources/news/test_newsfeeds.py
@@ -9,8 +9,7 @@
from tests.utils import assert_matches_type
from python_intercom import Intercom, AsyncIntercom
-from python_intercom.types.news import Newsfeed
-from python_intercom.types.shared import PaginatedResponse
+from python_intercom.types.news import Newsfeed, NewsfeedListResponse
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
@@ -67,14 +66,14 @@ def test_path_params_retrieve(self, client: Intercom) -> None:
@parametrize
def test_method_list(self, client: Intercom) -> None:
newsfeed = client.news.newsfeeds.list()
- assert_matches_type(PaginatedResponse, newsfeed, path=["response"])
+ assert_matches_type(NewsfeedListResponse, newsfeed, path=["response"])
@parametrize
def test_method_list_with_all_params(self, client: Intercom) -> None:
newsfeed = client.news.newsfeeds.list(
intercom_version="2.11",
)
- assert_matches_type(PaginatedResponse, newsfeed, path=["response"])
+ assert_matches_type(NewsfeedListResponse, newsfeed, path=["response"])
@parametrize
def test_raw_response_list(self, client: Intercom) -> None:
@@ -83,7 +82,7 @@ def test_raw_response_list(self, client: Intercom) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
newsfeed = response.parse()
- assert_matches_type(PaginatedResponse, newsfeed, path=["response"])
+ assert_matches_type(NewsfeedListResponse, newsfeed, path=["response"])
@parametrize
def test_streaming_response_list(self, client: Intercom) -> None:
@@ -92,7 +91,7 @@ def test_streaming_response_list(self, client: Intercom) -> None:
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
newsfeed = response.parse()
- assert_matches_type(PaginatedResponse, newsfeed, path=["response"])
+ assert_matches_type(NewsfeedListResponse, newsfeed, path=["response"])
assert cast(Any, response.is_closed) is True
@@ -149,14 +148,14 @@ async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None:
@parametrize
async def test_method_list(self, async_client: AsyncIntercom) -> None:
newsfeed = await async_client.news.newsfeeds.list()
- assert_matches_type(PaginatedResponse, newsfeed, path=["response"])
+ assert_matches_type(NewsfeedListResponse, newsfeed, path=["response"])
@parametrize
async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None:
newsfeed = await async_client.news.newsfeeds.list(
intercom_version="2.11",
)
- assert_matches_type(PaginatedResponse, newsfeed, path=["response"])
+ assert_matches_type(NewsfeedListResponse, newsfeed, path=["response"])
@parametrize
async def test_raw_response_list(self, async_client: AsyncIntercom) -> None:
@@ -165,7 +164,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None:
assert response.is_closed is True
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
newsfeed = await response.parse()
- assert_matches_type(PaginatedResponse, newsfeed, path=["response"])
+ assert_matches_type(NewsfeedListResponse, newsfeed, path=["response"])
@parametrize
async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None:
@@ -174,6 +173,6 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
newsfeed = await response.parse()
- assert_matches_type(PaginatedResponse, newsfeed, path=["response"])
+ assert_matches_type(NewsfeedListResponse, newsfeed, path=["response"])
assert cast(Any, response.is_closed) is True