diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85135b0f..7d9d0a88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: pull_request: branches: - v3 + - next jobs: lint: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 94e8034c..ccf2b876 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ $ pip install -r requirements-dev.lock ## Modifying/Adding code Most of the SDK is generated code, and any modified code will be overridden on the next generation. The -`src/python_minus_intercom/lib/` and `examples/` directories are exceptions and will never be overridden. +`src/python_intercom/lib/` and `examples/` directories are exceptions and will never be overridden. ## Adding and running examples diff --git a/README.md b/README.md index bc3b5d5a..5d55b2f2 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ It is generated with [Stainless](https://www.stainlessapi.com/). ## Documentation -The REST API documentation can be found [on developers.intercom.com](https://developers.intercom.com). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found on [developers.intercom.com](https://developers.intercom.com). The full API of this library can be found in [api.md](api.md). ## Installation @@ -28,7 +28,7 @@ The full API of this library can be found in [api.md](api.md). ```python import os -from python_minus_intercom import Intercom +from python_intercom import Intercom client = Intercom( # This is the default and can be omitted @@ -53,7 +53,7 @@ Simply import `AsyncIntercom` instead of `Intercom` and use `await` with each AP ```python import os import asyncio -from python_minus_intercom import AsyncIntercom +from python_intercom import AsyncIntercom client = AsyncIntercom( # This is the default and can be omitted @@ -84,27 +84,27 @@ Typed requests and responses provide autocomplete and documentation within your ## Handling errors -When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `python_minus_intercom.APIConnectionError` is raised. +When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `python_intercom.APIConnectionError` is raised. When the API returns a non-success status code (that is, 4xx or 5xx -response), a subclass of `python_minus_intercom.APIStatusError` is raised, containing `status_code` and `response` properties. +response), a subclass of `python_intercom.APIStatusError` is raised, containing `status_code` and `response` properties. -All errors inherit from `python_minus_intercom.APIError`. +All errors inherit from `python_intercom.APIError`. ```python -import python_minus_intercom -from python_minus_intercom import Intercom +import python_intercom +from python_intercom import Intercom client = Intercom() try: client.me.retrieve() -except python_minus_intercom.APIConnectionError as e: +except python_intercom.APIConnectionError as e: print("The server could not be reached") print(e.__cause__) # an underlying Exception, likely raised within httpx. -except python_minus_intercom.RateLimitError as e: +except python_intercom.RateLimitError as e: print("A 429 status code was received; we should back off a bit.") -except python_minus_intercom.APIStatusError as e: +except python_intercom.APIStatusError as e: print("Another non-200-range status code was received") print(e.status_code) print(e.response) @@ -132,7 +132,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ You can use the `max_retries` option to configure or disable retry settings: ```python -from python_minus_intercom import Intercom +from python_intercom import Intercom # Configure the default for all requests: client = Intercom( @@ -150,7 +150,7 @@ By default requests time out after 1 minute. You can configure this with a `time which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object: ```python -from python_minus_intercom import Intercom +from python_intercom import Intercom # Configure the default for all requests: client = Intercom( @@ -200,7 +200,7 @@ if response.my_field is None: The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g., ```py -from python_minus_intercom import Intercom +from python_intercom import Intercom client = Intercom() response = client.me.with_raw_response.retrieve() @@ -210,9 +210,9 @@ me = response.parse() # get the object that `me.retrieve()` would have returned print(me.id) ``` -These methods return an [`APIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_minus_intercom/_response.py) object. +These methods return an [`APIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_intercom/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_minus_intercom/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/intercom/python-intercom/tree/v3/src/python_intercom/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -274,7 +274,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality ```python -from python_minus_intercom import Intercom, DefaultHttpxClient +from python_intercom import Intercom, DefaultHttpxClient client = Intercom( # Or use the `INTERCOM_BASE_URL` env var diff --git a/api.md b/api.md index 66db5e53..5aa24c19 100644 --- a/api.md +++ b/api.md @@ -1,7 +1,7 @@ # Shared Types ```python -from python_minus_intercom.types import ( +from python_intercom.types import ( Admin, ArticleContent, ArticleTranslatedContent, @@ -34,60 +34,55 @@ from python_minus_intercom.types import ( Types: ```python -from python_minus_intercom.types import AdminWithApp +from python_intercom.types import AdminWithApp ``` Methods: -- client.me.retrieve() -> Optional +- client.me.retrieve() -> Optional # Admins Types: ```python -from python_minus_intercom.types import AdminList +from python_intercom.types import AdminList ``` Methods: -- client.admins.retrieve(id) -> Optional -- client.admins.list() -> AdminList -- client.admins.set_away(id, \*\*params) -> Optional +- client.admins.retrieve(id) -> Optional +- client.admins.list() -> AdminList +- client.admins.set_away(id, \*\*params) -> Optional ## ActivityLogs Types: ```python -from python_minus_intercom.types.admins import ActivityLogList +from python_intercom.types.admins import ActivityLogList ``` Methods: -- client.admins.activity_logs.list(\*\*params) -> ActivityLogList +- client.admins.activity_logs.list(\*\*params) -> ActivityLogList # Articles Types: ```python -from python_minus_intercom.types import ( - Article, - ArticleList, - ArticleSearchResponse, - DeletedArticleObject, -) +from python_intercom.types import Article, ArticleList, ArticleSearchResponse, DeletedArticleObject ``` Methods: -- client.articles.create(\*\*params) -> Article -- client.articles.retrieve(id) -> Article -- client.articles.update(id, \*\*params) -> Article -- client.articles.list() -> ArticleList -- client.articles.remove(id) -> DeletedArticleObject -- client.articles.search(\*\*params) -> ArticleSearchResponse +- client.articles.create(\*\*params) -> Article +- client.articles.retrieve(id) -> Article +- client.articles.update(id, \*\*params) -> Article +- client.articles.list() -> ArticleList +- client.articles.remove(id) -> DeletedArticleObject +- client.articles.search(\*\*params) -> ArticleSearchResponse # HelpCenter @@ -96,253 +91,248 @@ Methods: Types: ```python -from python_minus_intercom.types.help_center import Collection, CollectionList, DeletedCollection +from python_intercom.types.help_center import Collection, CollectionList, DeletedCollection ``` Methods: -- client.help_center.collections.create(\*\*params) -> Collection -- client.help_center.collections.retrieve(id) -> Collection -- client.help_center.collections.update(id, \*\*params) -> Collection -- client.help_center.collections.list() -> CollectionList -- client.help_center.collections.delete(id) -> DeletedCollection +- client.help_center.collections.create(\*\*params) -> Collection +- client.help_center.collections.retrieve(id) -> Collection +- client.help_center.collections.update(id, \*\*params) -> Collection +- client.help_center.collections.list() -> CollectionList +- client.help_center.collections.delete(id) -> DeletedCollection ## HelpCenters Types: ```python -from python_minus_intercom.types.help_center import HelpCenter, HelpCenterList +from python_intercom.types.help_center import HelpCenter, HelpCenterList ``` Methods: -- client.help_center.help_centers.retrieve(id) -> HelpCenter -- client.help_center.help_centers.list() -> HelpCenterList +- client.help_center.help_centers.retrieve(id) -> HelpCenter +- client.help_center.help_centers.list() -> HelpCenterList # Companies Types: ```python -from python_minus_intercom.types import CompanyList, CompanyScroll, DeletedCompanyObject +from python_intercom.types import CompanyList, CompanyScroll, DeletedCompanyObject ``` Methods: -- client.companies.create(\*\*params) -> Company -- client.companies.retrieve(id) -> Company -- client.companies.update(id) -> Company -- client.companies.list(\*\*params) -> CompanyList -- client.companies.delete(id) -> DeletedCompanyObject -- client.companies.retrieve_list(\*\*params) -> CompanyList -- client.companies.scroll(\*\*params) -> Optional +- client.companies.create(\*\*params) -> Company +- client.companies.retrieve(id) -> Company +- client.companies.update(id) -> Company +- client.companies.list(\*\*params) -> CompanyList +- client.companies.delete(id) -> DeletedCompanyObject +- client.companies.retrieve_list(\*\*params) -> CompanyList +- client.companies.scroll(\*\*params) -> Optional ## Contacts Types: ```python -from python_minus_intercom.types.companies import CompanyAttachedContacts +from python_intercom.types.companies import CompanyAttachedContacts ``` Methods: -- client.companies.contacts.list(id) -> CompanyAttachedContacts +- client.companies.contacts.list(id) -> CompanyAttachedContacts ## Segments Types: ```python -from python_minus_intercom.types.companies import CompanyAttachedSegments +from python_intercom.types.companies import CompanyAttachedSegments ``` Methods: -- client.companies.segments.list(id) -> CompanyAttachedSegments +- client.companies.segments.list(id) -> CompanyAttachedSegments # Contacts Types: ```python -from python_minus_intercom.types import ( - ContactArchived, - ContactDeleted, - ContactList, - ContactUnarchived, -) +from python_intercom.types import ContactArchived, ContactDeleted, ContactList, ContactUnarchived ``` Methods: -- client.contacts.create(\*\*params) -> Contact -- client.contacts.retrieve(id) -> Contact -- client.contacts.update(id, \*\*params) -> Contact -- client.contacts.list() -> ContactList -- client.contacts.delete(id) -> ContactDeleted -- client.contacts.archive(id) -> ContactArchived -- client.contacts.merge(\*\*params) -> Contact -- client.contacts.search(\*\*params) -> ContactList -- client.contacts.unarchive(id) -> ContactUnarchived +- client.contacts.create(\*\*params) -> Contact +- client.contacts.retrieve(id) -> Contact +- client.contacts.update(id, \*\*params) -> Contact +- client.contacts.list() -> ContactList +- client.contacts.delete(id) -> ContactDeleted +- client.contacts.archive(id) -> ContactArchived +- client.contacts.merge(\*\*params) -> Contact +- client.contacts.search(\*\*params) -> ContactList +- client.contacts.unarchive(id) -> ContactUnarchived ## Companies Types: ```python -from python_minus_intercom.types.contacts import ContactAttachedCompanies +from python_intercom.types.contacts import ContactAttachedCompanies ``` Methods: -- client.contacts.companies.create(contact_id, \*\*params) -> Company -- client.contacts.companies.list(contact_id) -> ContactAttachedCompanies -- client.contacts.companies.delete(id, \*, contact_id) -> Company +- client.contacts.companies.create(contact_id, \*\*params) -> Company +- client.contacts.companies.list(contact_id) -> ContactAttachedCompanies +- client.contacts.companies.delete(id, \*, contact_id) -> Company ## Notes Types: ```python -from python_minus_intercom.types.contacts import NoteList +from python_intercom.types.contacts import NoteList ``` Methods: -- client.contacts.notes.create(id, \*\*params) -> Note -- client.contacts.notes.list(id) -> NoteList +- client.contacts.notes.create(id, \*\*params) -> Note +- client.contacts.notes.list(id) -> NoteList ## Segments Types: ```python -from python_minus_intercom.types.contacts import ContactSegments +from python_intercom.types.contacts import ContactSegments ``` Methods: -- client.contacts.segments.list(contact_id) -> ContactSegments +- client.contacts.segments.list(contact_id) -> ContactSegments ## Subscriptions Types: ```python -from python_minus_intercom.types.contacts import SubscriptionType +from python_intercom.types.contacts import SubscriptionType ``` Methods: -- client.contacts.subscriptions.create(contact_id, \*\*params) -> SubscriptionType -- client.contacts.subscriptions.list(contact_id) -> SubscriptionTypeList -- client.contacts.subscriptions.delete(id, \*, contact_id) -> SubscriptionType +- client.contacts.subscriptions.create(contact_id, \*\*params) -> SubscriptionType +- client.contacts.subscriptions.list(contact_id) -> SubscriptionTypeList +- client.contacts.subscriptions.delete(id, \*, contact_id) -> SubscriptionType ## Tags Methods: -- client.contacts.tags.create(contact_id, \*\*params) -> Tag -- client.contacts.tags.list(contact_id) -> TagList -- client.contacts.tags.delete(id, \*, contact_id) -> Tag +- client.contacts.tags.create(contact_id, \*\*params) -> Tag +- client.contacts.tags.list(contact_id) -> TagList +- client.contacts.tags.delete(id, \*, contact_id) -> Tag # Conversations Types: ```python -from python_minus_intercom.types import ConversationList, ConversationListResponse +from python_intercom.types import ConversationList, ConversationListResponse ``` Methods: -- client.conversations.create(\*\*params) -> Message -- client.conversations.retrieve(id, \*\*params) -> Conversation -- client.conversations.update(id, \*\*params) -> Conversation -- client.conversations.list(\*\*params) -> SyncCursorPagination[ConversationListResponse] -- client.conversations.convert(id, \*\*params) -> Optional -- client.conversations.redact(\*\*params) -> Conversation -- client.conversations.search(\*\*params) -> ConversationList +- client.conversations.create(\*\*params) -> Message +- client.conversations.retrieve(id, \*\*params) -> Conversation +- client.conversations.update(id, \*\*params) -> Conversation +- client.conversations.list(\*\*params) -> SyncCursorPagination[ConversationListResponse] +- client.conversations.convert(id, \*\*params) -> Optional +- client.conversations.redact(\*\*params) -> Conversation +- client.conversations.search(\*\*params) -> ConversationList ## Tags Methods: -- client.conversations.tags.create(conversation_id, \*\*params) -> Tag -- client.conversations.tags.delete(id, \*, conversation_id, \*\*params) -> Tag +- client.conversations.tags.create(conversation_id, \*\*params) -> Tag +- client.conversations.tags.delete(id, \*, conversation_id, \*\*params) -> Tag ## Reply Methods: -- client.conversations.reply.create(id, \*\*params) -> Conversation +- client.conversations.reply.create(id, \*\*params) -> Conversation ## Parts Methods: -- client.conversations.parts.create(id, \*\*params) -> Conversation +- client.conversations.parts.create(id, \*\*params) -> Conversation ## RunAssignmentRules Methods: -- client.conversations.run_assignment_rules.create(id) -> Conversation +- client.conversations.run_assignment_rules.create(id) -> Conversation ## Customers Methods: -- client.conversations.customers.create(id, \*\*params) -> Conversation -- client.conversations.customers.delete(contact_id, \*, conversation_id, \*\*params) -> Conversation +- client.conversations.customers.create(id, \*\*params) -> Conversation +- client.conversations.customers.delete(contact_id, \*, conversation_id, \*\*params) -> Conversation # DataAttributes Types: ```python -from python_minus_intercom.types import DataAttribute, DataAttributeList +from python_intercom.types import DataAttribute, DataAttributeList ``` Methods: -- client.data_attributes.create(\*\*params) -> DataAttribute -- client.data_attributes.update(id, \*\*params) -> DataAttribute -- client.data_attributes.list(\*\*params) -> DataAttributeList +- client.data_attributes.create(\*\*params) -> DataAttribute +- client.data_attributes.update(id, \*\*params) -> DataAttribute +- client.data_attributes.list(\*\*params) -> DataAttributeList # DataEvents Types: ```python -from python_minus_intercom.types import DataEventSummary +from python_intercom.types import DataEventSummary ``` Methods: -- client.data_events.create(\*\*params) -> None -- client.data_events.list(\*\*params) -> DataEventSummary -- client.data_events.summaries(\*\*params) -> None +- client.data_events.create(\*\*params) -> None +- client.data_events.list(\*\*params) -> DataEventSummary +- client.data_events.summaries(\*\*params) -> None # DataExports Types: ```python -from python_minus_intercom.types import DataExport +from python_intercom.types import DataExport ``` Methods: -- client.data_exports.content_data(\*\*params) -> DataExport +- client.data_exports.content_data(\*\*params) -> DataExport # Export Methods: -- client.export.cancel(job_identifier) -> DataExport +- client.export.cancel(job_identifier) -> DataExport ## Content @@ -350,7 +340,7 @@ Methods: Methods: -- client.export.content.data.retrieve(job_identifier) -> DataExport +- client.export.content.data.retrieve(job_identifier) -> DataExport # Download @@ -360,13 +350,13 @@ Methods: Methods: -- client.download.content.data.retrieve(job_identifier) -> None +- client.download.content.data.retrieve(job_identifier) -> None # Messages Methods: -- client.messages.create(\*\*params) -> Message +- client.messages.create(\*\*params) -> Message # News @@ -375,150 +365,150 @@ Methods: Types: ```python -from python_minus_intercom.types.news import NewsItem, NewsItemDeleteResponse +from python_intercom.types.news import NewsItem, NewsItemDeleteResponse ``` 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.delete(id) -> NewsItemDeleteResponse +- 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.delete(id) -> NewsItemDeleteResponse ## Newsfeeds Types: ```python -from python_minus_intercom.types.news import Newsfeed +from python_intercom.types.news import Newsfeed ``` Methods: -- client.news.newsfeeds.retrieve(id) -> Newsfeed -- client.news.newsfeeds.list() -> PaginatedResponse +- client.news.newsfeeds.retrieve(id) -> Newsfeed +- client.news.newsfeeds.list() -> PaginatedResponse ### Items Methods: -- client.news.newsfeeds.items.list(id) -> PaginatedResponse +- client.news.newsfeeds.items.list(id) -> PaginatedResponse # Notes Methods: -- client.notes.retrieve(id) -> Note +- client.notes.retrieve(id) -> Note # Segments Types: ```python -from python_minus_intercom.types import Segment, SegmentList +from python_intercom.types import Segment, SegmentList ``` Methods: -- client.segments.retrieve(id) -> Segment -- client.segments.list(\*\*params) -> SegmentList +- client.segments.retrieve(id) -> Segment +- client.segments.list(\*\*params) -> SegmentList # SubscriptionTypes Methods: -- client.subscription_types.list() -> SubscriptionTypeList +- client.subscription_types.list() -> SubscriptionTypeList # PhoneCallRedirects Types: ```python -from python_minus_intercom.types import PhoneSwitch +from python_intercom.types import PhoneSwitch ``` Methods: -- client.phone_call_redirects.create(\*\*params) -> Optional +- client.phone_call_redirects.create(\*\*params) -> Optional # Tags Methods: -- client.tags.retrieve(id) -> Tag -- client.tags.list() -> TagList -- client.tags.delete(id) -> None -- client.tags.create_or_update(\*\*params) -> Tag +- client.tags.retrieve(id) -> Tag +- client.tags.list() -> TagList +- client.tags.delete(id) -> None +- client.tags.create_or_update(\*\*params) -> Tag # Teams Types: ```python -from python_minus_intercom.types import Team, TeamList +from python_intercom.types import Team, TeamList ``` Methods: -- client.teams.retrieve(id) -> Team -- client.teams.list() -> TeamList +- client.teams.retrieve(id) -> Team +- client.teams.list() -> TeamList # TicketTypes Types: ```python -from python_minus_intercom.types import TicketType, TicketTypeList +from python_intercom.types import TicketType, TicketTypeList ``` Methods: -- client.ticket_types.create(\*\*params) -> Optional -- client.ticket_types.retrieve(id) -> Optional -- client.ticket_types.update(id, \*\*params) -> Optional -- client.ticket_types.list() -> TicketTypeList +- client.ticket_types.create(\*\*params) -> Optional +- client.ticket_types.retrieve(id) -> Optional +- client.ticket_types.update(id, \*\*params) -> Optional +- client.ticket_types.list() -> TicketTypeList ## Attributes Methods: -- client.ticket_types.attributes.create(ticket_type_id, \*\*params) -> Optional -- client.ticket_types.attributes.update(id, \*, ticket_type_id, \*\*params) -> Optional +- client.ticket_types.attributes.create(ticket_type_id, \*\*params) -> Optional +- client.ticket_types.attributes.update(id, \*, ticket_type_id, \*\*params) -> Optional # Tickets Types: ```python -from python_minus_intercom.types import TicketList, TicketReply +from python_intercom.types import TicketList, TicketReply ``` Methods: -- client.tickets.create(\*\*params) -> Optional -- client.tickets.reply(id, \*\*params) -> TicketReply -- client.tickets.retrieve_by_id(id) -> Optional -- client.tickets.search(\*\*params) -> TicketList -- client.tickets.update_by_id(id, \*\*params) -> Optional +- client.tickets.create(\*\*params) -> Optional +- client.tickets.reply(id, \*\*params) -> TicketReply +- client.tickets.retrieve_by_id(id) -> Optional +- client.tickets.search(\*\*params) -> TicketList +- client.tickets.update_by_id(id, \*\*params) -> Optional ## Tags Methods: -- client.tickets.tags.create(ticket_id, \*\*params) -> Tag -- client.tickets.tags.remove(id, \*, ticket_id, \*\*params) -> Tag +- client.tickets.tags.create(ticket_id, \*\*params) -> Tag +- client.tickets.tags.remove(id, \*, ticket_id, \*\*params) -> Tag # Visitors Types: ```python -from python_minus_intercom.types import Visitor, VisitorDeletedObject +from python_intercom.types import Visitor, VisitorDeletedObject ``` Methods: -- client.visitors.retrieve(\*\*params) -> Optional -- client.visitors.update(\*\*params) -> Optional -- client.visitors.convert(\*\*params) -> Contact +- client.visitors.retrieve(\*\*params) -> Optional +- client.visitors.update(\*\*params) -> Optional +- client.visitors.convert(\*\*params) -> Contact diff --git a/mypy.ini b/mypy.ini index 891a1f31..8835fc99 100644 --- a/mypy.ini +++ b/mypy.ini @@ -5,7 +5,7 @@ show_error_codes = True # Exclude _files.py because mypy isn't smart enough to apply # the correct type narrowing and as this is an internal module # it's fine to just use Pyright. -exclude = ^(src/python_minus_intercom/_files\.py|_dev/.*\.py)$ +exclude = ^(src/python_intercom/_files\.py|_dev/.*\.py)$ strict_equality = True implicit_reexport = True diff --git a/pyproject.toml b/pyproject.toml index e2ec9121..d9ec0f84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,7 +85,7 @@ typecheck = { chain = [ "typecheck:mypy" ]} "typecheck:pyright" = "pyright" -"typecheck:verify-types" = "pyright --verifytypes python_minus_intercom --ignoreexternal" +"typecheck:verify-types" = "pyright --verifytypes python_intercom --ignoreexternal" "typecheck:mypy" = "mypy ." [build-system] @@ -98,7 +98,7 @@ include = [ ] [tool.hatch.build.targets.wheel] -packages = ["src/python_minus_intercom"] +packages = ["src/python_intercom"] [tool.hatch.build.targets.sdist] # Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc) @@ -203,7 +203,7 @@ length-sort = true length-sort-straight = true combine-as-imports = true extra-standard-library = ["typing_extensions"] -known-first-party = ["python_minus_intercom", "tests"] +known-first-party = ["python_intercom", "tests"] [tool.ruff.per-file-ignores] "bin/**.py" = ["T201", "T203"] diff --git a/release-please-config.json b/release-please-config.json index e815a3c3..920d5a26 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -61,6 +61,6 @@ ], "release-type": "python", "extra-files": [ - "src/python_minus_intercom/_version.py" + "src/python_intercom/_version.py" ] } \ No newline at end of file diff --git a/scripts/lint b/scripts/lint index 0d41c52f..88585d81 100755 --- a/scripts/lint +++ b/scripts/lint @@ -8,5 +8,5 @@ echo "==> Running lints" rye run lint echo "==> Making sure it imports" -rye run python -c 'import python_minus_intercom' +rye run python -c 'import python_intercom' diff --git a/src/python_minus_intercom/__init__.py b/src/python_intercom/__init__.py similarity index 93% rename from src/python_minus_intercom/__init__.py rename to src/python_intercom/__init__.py index bc04096d..e5f5977f 100644 --- a/src/python_minus_intercom/__init__.py +++ b/src/python_intercom/__init__.py @@ -84,12 +84,12 @@ # Update the __module__ attribute for exported symbols so that # error messages point to this module instead of the module # it was originally defined in, e.g. -# python_minus_intercom._exceptions.NotFoundError -> python_minus_intercom.NotFoundError +# python_intercom._exceptions.NotFoundError -> python_intercom.NotFoundError __locals = locals() for __name in __all__: if not __name.startswith("__"): try: - __locals[__name].__module__ = "python_minus_intercom" + __locals[__name].__module__ = "python_intercom" except (TypeError, AttributeError): # Some of our exported symbols are builtins which we can't set attributes for. pass diff --git a/src/python_minus_intercom/_base_client.py b/src/python_intercom/_base_client.py similarity index 99% rename from src/python_minus_intercom/_base_client.py rename to src/python_intercom/_base_client.py index a0253f13..f1d16835 100644 --- a/src/python_minus_intercom/_base_client.py +++ b/src/python_intercom/_base_client.py @@ -879,9 +879,9 @@ def __exit__( def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options def _prepare_request( self, @@ -961,7 +961,7 @@ def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - self._prepare_options(options) + options = self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1442,9 +1442,9 @@ async def __aexit__( async def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options async def _prepare_request( self, @@ -1529,7 +1529,7 @@ async def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - await self._prepare_options(options) + options = await self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) diff --git a/src/python_minus_intercom/_client.py b/src/python_intercom/_client.py similarity index 100% rename from src/python_minus_intercom/_client.py rename to src/python_intercom/_client.py diff --git a/src/python_minus_intercom/_compat.py b/src/python_intercom/_compat.py similarity index 97% rename from src/python_minus_intercom/_compat.py rename to src/python_intercom/_compat.py index 74c7639b..c919b5ad 100644 --- a/src/python_minus_intercom/_compat.py +++ b/src/python_intercom/_compat.py @@ -118,10 +118,10 @@ def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: return model.__fields__ # type: ignore -def model_copy(model: _ModelT) -> _ModelT: +def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: if PYDANTIC_V2: - return model.model_copy() - return model.copy() # type: ignore + return model.model_copy(deep=deep) + return model.copy(deep=deep) # type: ignore def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: diff --git a/src/python_minus_intercom/_constants.py b/src/python_intercom/_constants.py similarity index 100% rename from src/python_minus_intercom/_constants.py rename to src/python_intercom/_constants.py diff --git a/src/python_minus_intercom/_exceptions.py b/src/python_intercom/_exceptions.py similarity index 100% rename from src/python_minus_intercom/_exceptions.py rename to src/python_intercom/_exceptions.py diff --git a/src/python_minus_intercom/_files.py b/src/python_intercom/_files.py similarity index 100% rename from src/python_minus_intercom/_files.py rename to src/python_intercom/_files.py diff --git a/src/python_minus_intercom/_models.py b/src/python_intercom/_models.py similarity index 100% rename from src/python_minus_intercom/_models.py rename to src/python_intercom/_models.py diff --git a/src/python_minus_intercom/_qs.py b/src/python_intercom/_qs.py similarity index 100% rename from src/python_minus_intercom/_qs.py rename to src/python_intercom/_qs.py diff --git a/src/python_minus_intercom/_resource.py b/src/python_intercom/_resource.py similarity index 100% rename from src/python_minus_intercom/_resource.py rename to src/python_intercom/_resource.py diff --git a/src/python_minus_intercom/_response.py b/src/python_intercom/_response.py similarity index 99% rename from src/python_minus_intercom/_response.py rename to src/python_intercom/_response.py index cd2e9a4f..d9db234b 100644 --- a/src/python_minus_intercom/_response.py +++ b/src/python_intercom/_response.py @@ -204,7 +204,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): raise TypeError( - "Pydantic models must subclass our base model type, e.g. `from python_minus_intercom import BaseModel`" + "Pydantic models must subclass our base model type, e.g. `from python_intercom import BaseModel`" ) if ( @@ -273,7 +273,7 @@ def parse(self, *, to: type[_T] | None = None) -> R | _T: the `to` argument, e.g. ```py - from python_minus_intercom import BaseModel + from python_intercom import BaseModel class MyModel(BaseModel): @@ -377,7 +377,7 @@ async def parse(self, *, to: type[_T] | None = None) -> R | _T: the `to` argument, e.g. ```py - from python_minus_intercom import BaseModel + from python_intercom import BaseModel class MyModel(BaseModel): @@ -548,7 +548,7 @@ async def stream_to_file( class MissingStreamClassError(TypeError): def __init__(self) -> None: super().__init__( - "The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `python_minus_intercom._streaming` for reference", + "The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `python_intercom._streaming` for reference", ) diff --git a/src/python_minus_intercom/_streaming.py b/src/python_intercom/_streaming.py similarity index 100% rename from src/python_minus_intercom/_streaming.py rename to src/python_intercom/_streaming.py diff --git a/src/python_minus_intercom/_types.py b/src/python_intercom/_types.py similarity index 99% rename from src/python_minus_intercom/_types.py rename to src/python_intercom/_types.py index 38549ecd..88a523eb 100644 --- a/src/python_minus_intercom/_types.py +++ b/src/python_intercom/_types.py @@ -81,7 +81,7 @@ # This unfortunately means that you will either have # to import this type and pass it explicitly: # -# from python_minus_intercom import NoneType +# from python_intercom import NoneType # client.get('/foo', cast_to=NoneType) # # or build it yourself: diff --git a/src/python_minus_intercom/_utils/__init__.py b/src/python_intercom/_utils/__init__.py similarity index 100% rename from src/python_minus_intercom/_utils/__init__.py rename to src/python_intercom/_utils/__init__.py diff --git a/src/python_minus_intercom/_utils/_logs.py b/src/python_intercom/_utils/_logs.py similarity index 74% rename from src/python_minus_intercom/_utils/_logs.py rename to src/python_intercom/_utils/_logs.py index 7be62876..789d2644 100644 --- a/src/python_minus_intercom/_utils/_logs.py +++ b/src/python_intercom/_utils/_logs.py @@ -1,12 +1,12 @@ import os import logging -logger: logging.Logger = logging.getLogger("python_minus_intercom") +logger: logging.Logger = logging.getLogger("python_intercom") httpx_logger: logging.Logger = logging.getLogger("httpx") def _basic_config() -> None: - # e.g. [2023-10-05 14:12:26 - python_minus_intercom._base_client:818 - DEBUG] HTTP Request: POST http://127.0.0.1:4010/foo/bar "200 OK" + # e.g. [2023-10-05 14:12:26 - python_intercom._base_client:818 - DEBUG] HTTP Request: POST http://127.0.0.1:4010/foo/bar "200 OK" logging.basicConfig( format="[%(asctime)s - %(name)s:%(lineno)d - %(levelname)s] %(message)s", datefmt="%Y-%m-%d %H:%M:%S", diff --git a/src/python_minus_intercom/_utils/_proxy.py b/src/python_intercom/_utils/_proxy.py similarity index 100% rename from src/python_minus_intercom/_utils/_proxy.py rename to src/python_intercom/_utils/_proxy.py diff --git a/src/python_minus_intercom/_utils/_reflection.py b/src/python_intercom/_utils/_reflection.py similarity index 100% rename from src/python_minus_intercom/_utils/_reflection.py rename to src/python_intercom/_utils/_reflection.py diff --git a/src/python_minus_intercom/_utils/_streams.py b/src/python_intercom/_utils/_streams.py similarity index 100% rename from src/python_minus_intercom/_utils/_streams.py rename to src/python_intercom/_utils/_streams.py diff --git a/src/python_minus_intercom/_utils/_sync.py b/src/python_intercom/_utils/_sync.py similarity index 100% rename from src/python_minus_intercom/_utils/_sync.py rename to src/python_intercom/_utils/_sync.py diff --git a/src/python_minus_intercom/_utils/_transform.py b/src/python_intercom/_utils/_transform.py similarity index 100% rename from src/python_minus_intercom/_utils/_transform.py rename to src/python_intercom/_utils/_transform.py diff --git a/src/python_minus_intercom/_utils/_typing.py b/src/python_intercom/_utils/_typing.py similarity index 100% rename from src/python_minus_intercom/_utils/_typing.py rename to src/python_intercom/_utils/_typing.py diff --git a/src/python_minus_intercom/_utils/_utils.py b/src/python_intercom/_utils/_utils.py similarity index 100% rename from src/python_minus_intercom/_utils/_utils.py rename to src/python_intercom/_utils/_utils.py diff --git a/src/python_minus_intercom/_version.py b/src/python_intercom/_version.py similarity index 79% rename from src/python_minus_intercom/_version.py rename to src/python_intercom/_version.py index 355a1c8d..a1aabe03 100644 --- a/src/python_minus_intercom/_version.py +++ b/src/python_intercom/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -__title__ = "python_minus_intercom" +__title__ = "python_intercom" __version__ = "0.0.1" # x-release-please-version diff --git a/src/python_minus_intercom/pagination.py b/src/python_intercom/pagination.py similarity index 100% rename from src/python_minus_intercom/pagination.py rename to src/python_intercom/pagination.py diff --git a/src/python_minus_intercom/py.typed b/src/python_intercom/py.typed similarity index 100% rename from src/python_minus_intercom/py.typed rename to src/python_intercom/py.typed diff --git a/src/python_minus_intercom/resources/__init__.py b/src/python_intercom/resources/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/__init__.py rename to src/python_intercom/resources/__init__.py diff --git a/src/python_minus_intercom/resources/admins/__init__.py b/src/python_intercom/resources/admins/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/admins/__init__.py rename to src/python_intercom/resources/admins/__init__.py diff --git a/src/python_minus_intercom/resources/admins/activity_logs.py b/src/python_intercom/resources/admins/activity_logs.py similarity index 99% rename from src/python_minus_intercom/resources/admins/activity_logs.py rename to src/python_intercom/resources/admins/activity_logs.py index 80168faf..7cbedde8 100644 --- a/src/python_minus_intercom/resources/admins/activity_logs.py +++ b/src/python_intercom/resources/admins/activity_logs.py @@ -21,9 +21,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.admins import activity_log_list_params from ...types.admins.activity_log_list import ActivityLogList diff --git a/src/python_minus_intercom/resources/admins/admins.py b/src/python_intercom/resources/admins/admins.py similarity index 99% rename from src/python_minus_intercom/resources/admins/admins.py rename to src/python_intercom/resources/admins/admins.py index 994e4107..1ce5a048 100644 --- a/src/python_minus_intercom/resources/admins/admins.py +++ b/src/python_intercom/resources/admins/admins.py @@ -31,9 +31,7 @@ ActivityLogsResourceWithStreamingResponse, AsyncActivityLogsResourceWithStreamingResponse, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.admin_list import AdminList from ...types.shared.admin import Admin diff --git a/src/python_minus_intercom/resources/articles.py b/src/python_intercom/resources/articles.py similarity index 99% rename from src/python_minus_intercom/resources/articles.py rename to src/python_intercom/resources/articles.py index 2c3080eb..7268de7f 100644 --- a/src/python_minus_intercom/resources/articles.py +++ b/src/python_intercom/resources/articles.py @@ -23,9 +23,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.article import Article from ..types.article_list import ArticleList from ..types.deleted_article_object import DeletedArticleObject diff --git a/src/python_minus_intercom/resources/companies/__init__.py b/src/python_intercom/resources/companies/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/companies/__init__.py rename to src/python_intercom/resources/companies/__init__.py diff --git a/src/python_minus_intercom/resources/companies/companies.py b/src/python_intercom/resources/companies/companies.py similarity index 99% rename from src/python_minus_intercom/resources/companies/companies.py rename to src/python_intercom/resources/companies/companies.py index 95fc0e97..87b73e04 100644 --- a/src/python_minus_intercom/resources/companies/companies.py +++ b/src/python_intercom/resources/companies/companies.py @@ -44,9 +44,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.company_list import CompanyList from ...types.company_scroll import CompanyScroll from ...types.shared.company import Company diff --git a/src/python_minus_intercom/resources/companies/contacts.py b/src/python_intercom/resources/companies/contacts.py similarity index 99% rename from src/python_minus_intercom/resources/companies/contacts.py rename to src/python_intercom/resources/companies/contacts.py index 34b438d8..7d8e6f5f 100644 --- a/src/python_minus_intercom/resources/companies/contacts.py +++ b/src/python_intercom/resources/companies/contacts.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.companies.company_attached_contacts import CompanyAttachedContacts __all__ = ["ContactsResource", "AsyncContactsResource"] diff --git a/src/python_minus_intercom/resources/companies/segments.py b/src/python_intercom/resources/companies/segments.py similarity index 99% rename from src/python_minus_intercom/resources/companies/segments.py rename to src/python_intercom/resources/companies/segments.py index ab97259a..6c3874a2 100644 --- a/src/python_minus_intercom/resources/companies/segments.py +++ b/src/python_intercom/resources/companies/segments.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.companies.company_attached_segments import CompanyAttachedSegments __all__ = ["SegmentsResource", "AsyncSegmentsResource"] diff --git a/src/python_minus_intercom/resources/contacts/__init__.py b/src/python_intercom/resources/contacts/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/contacts/__init__.py rename to src/python_intercom/resources/contacts/__init__.py diff --git a/src/python_minus_intercom/resources/contacts/companies.py b/src/python_intercom/resources/contacts/companies.py similarity index 99% rename from src/python_minus_intercom/resources/contacts/companies.py rename to src/python_intercom/resources/contacts/companies.py index 88345404..622abecd 100644 --- a/src/python_minus_intercom/resources/contacts/companies.py +++ b/src/python_intercom/resources/contacts/companies.py @@ -21,9 +21,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.contacts import company_create_params from ...types.shared.company import Company from ...types.contacts.contact_attached_companies import ContactAttachedCompanies diff --git a/src/python_minus_intercom/resources/contacts/contacts.py b/src/python_intercom/resources/contacts/contacts.py similarity index 99% rename from src/python_minus_intercom/resources/contacts/contacts.py rename to src/python_intercom/resources/contacts/contacts.py index e44b2424..2d2ba321 100644 --- a/src/python_minus_intercom/resources/contacts/contacts.py +++ b/src/python_intercom/resources/contacts/contacts.py @@ -70,9 +70,7 @@ SubscriptionsResourceWithStreamingResponse, AsyncSubscriptionsResourceWithStreamingResponse, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.contact_list import ContactList from ...types.shared.contact import Contact from ...types.contact_deleted import ContactDeleted diff --git a/src/python_minus_intercom/resources/contacts/notes.py b/src/python_intercom/resources/contacts/notes.py similarity index 99% rename from src/python_minus_intercom/resources/contacts/notes.py rename to src/python_intercom/resources/contacts/notes.py index 24abae9a..2de4b9cb 100644 --- a/src/python_minus_intercom/resources/contacts/notes.py +++ b/src/python_intercom/resources/contacts/notes.py @@ -21,9 +21,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.contacts import note_create_params from ...types.shared.note import Note from ...types.contacts.note_list import NoteList diff --git a/src/python_minus_intercom/resources/contacts/segments.py b/src/python_intercom/resources/contacts/segments.py similarity index 99% rename from src/python_minus_intercom/resources/contacts/segments.py rename to src/python_intercom/resources/contacts/segments.py index 36c0481d..fdfa15dd 100644 --- a/src/python_minus_intercom/resources/contacts/segments.py +++ b/src/python_intercom/resources/contacts/segments.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.contacts.contact_segments import ContactSegments __all__ = ["SegmentsResource", "AsyncSegmentsResource"] diff --git a/src/python_minus_intercom/resources/contacts/subscriptions.py b/src/python_intercom/resources/contacts/subscriptions.py similarity index 99% rename from src/python_minus_intercom/resources/contacts/subscriptions.py rename to src/python_intercom/resources/contacts/subscriptions.py index 2b3952f3..53d0e1e5 100644 --- a/src/python_minus_intercom/resources/contacts/subscriptions.py +++ b/src/python_intercom/resources/contacts/subscriptions.py @@ -21,9 +21,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.contacts import subscription_create_params from ...types.contacts.subscription_type import SubscriptionType from ...types.shared.subscription_type_list import SubscriptionTypeList diff --git a/src/python_minus_intercom/resources/contacts/tags.py b/src/python_intercom/resources/contacts/tags.py similarity index 99% rename from src/python_minus_intercom/resources/contacts/tags.py rename to src/python_intercom/resources/contacts/tags.py index 6de418f1..fd9f1c8d 100644 --- a/src/python_minus_intercom/resources/contacts/tags.py +++ b/src/python_intercom/resources/contacts/tags.py @@ -21,9 +21,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.contacts import tag_create_params from ...types.shared.tag import Tag from ...types.shared.tag_list import TagList diff --git a/src/python_minus_intercom/resources/conversations/__init__.py b/src/python_intercom/resources/conversations/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/conversations/__init__.py rename to src/python_intercom/resources/conversations/__init__.py diff --git a/src/python_minus_intercom/resources/conversations/conversations.py b/src/python_intercom/resources/conversations/conversations.py similarity index 99% rename from src/python_minus_intercom/resources/conversations/conversations.py rename to src/python_intercom/resources/conversations/conversations.py index 93a9f1ff..bb5fe02c 100644 --- a/src/python_minus_intercom/resources/conversations/conversations.py +++ b/src/python_intercom/resources/conversations/conversations.py @@ -66,10 +66,7 @@ async_to_streamed_response_wrapper, ) from ...pagination import SyncCursorPagination, AsyncCursorPagination -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from .run_assignment_rules import ( RunAssignmentRulesResource, AsyncRunAssignmentRulesResource, diff --git a/src/python_minus_intercom/resources/conversations/customers.py b/src/python_intercom/resources/conversations/customers.py similarity index 99% rename from src/python_minus_intercom/resources/conversations/customers.py rename to src/python_intercom/resources/conversations/customers.py index db9e2958..5e09899f 100644 --- a/src/python_minus_intercom/resources/conversations/customers.py +++ b/src/python_intercom/resources/conversations/customers.py @@ -21,9 +21,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.conversations import customer_create_params, customer_delete_params from ...types.shared.conversation import Conversation diff --git a/src/python_minus_intercom/resources/conversations/parts.py b/src/python_intercom/resources/conversations/parts.py similarity index 99% rename from src/python_minus_intercom/resources/conversations/parts.py rename to src/python_intercom/resources/conversations/parts.py index 059043f7..f8e8d7b7 100644 --- a/src/python_minus_intercom/resources/conversations/parts.py +++ b/src/python_intercom/resources/conversations/parts.py @@ -23,9 +23,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.conversations import part_create_params from ...types.shared.conversation import Conversation diff --git a/src/python_minus_intercom/resources/conversations/reply.py b/src/python_intercom/resources/conversations/reply.py similarity index 99% rename from src/python_minus_intercom/resources/conversations/reply.py rename to src/python_intercom/resources/conversations/reply.py index f2278ec6..c2384962 100644 --- a/src/python_minus_intercom/resources/conversations/reply.py +++ b/src/python_intercom/resources/conversations/reply.py @@ -23,9 +23,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.conversations import reply_create_params from ...types.shared.conversation import Conversation diff --git a/src/python_minus_intercom/resources/conversations/run_assignment_rules.py b/src/python_intercom/resources/conversations/run_assignment_rules.py similarity index 99% rename from src/python_minus_intercom/resources/conversations/run_assignment_rules.py rename to src/python_intercom/resources/conversations/run_assignment_rules.py index 1c847d02..9896276a 100644 --- a/src/python_minus_intercom/resources/conversations/run_assignment_rules.py +++ b/src/python_intercom/resources/conversations/run_assignment_rules.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.shared.conversation import Conversation __all__ = ["RunAssignmentRulesResource", "AsyncRunAssignmentRulesResource"] diff --git a/src/python_minus_intercom/resources/conversations/tags.py b/src/python_intercom/resources/conversations/tags.py similarity index 99% rename from src/python_minus_intercom/resources/conversations/tags.py rename to src/python_intercom/resources/conversations/tags.py index ddaa7abd..c45095dd 100644 --- a/src/python_minus_intercom/resources/conversations/tags.py +++ b/src/python_intercom/resources/conversations/tags.py @@ -21,9 +21,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.shared.tag import Tag from ...types.conversations import tag_create_params, tag_delete_params diff --git a/src/python_minus_intercom/resources/data_attributes.py b/src/python_intercom/resources/data_attributes.py similarity index 99% rename from src/python_minus_intercom/resources/data_attributes.py rename to src/python_intercom/resources/data_attributes.py index 69982bfe..4e87bbbc 100644 --- a/src/python_minus_intercom/resources/data_attributes.py +++ b/src/python_intercom/resources/data_attributes.py @@ -27,9 +27,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.data_attribute import DataAttribute from ..types.data_attribute_list import DataAttributeList diff --git a/src/python_minus_intercom/resources/data_events.py b/src/python_intercom/resources/data_events.py similarity index 99% rename from src/python_minus_intercom/resources/data_events.py rename to src/python_intercom/resources/data_events.py index b0cbc2e1..c741d4ed 100644 --- a/src/python_minus_intercom/resources/data_events.py +++ b/src/python_intercom/resources/data_events.py @@ -24,9 +24,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.data_event_summary import DataEventSummary __all__ = ["DataEventsResource", "AsyncDataEventsResource"] diff --git a/src/python_minus_intercom/resources/data_exports.py b/src/python_intercom/resources/data_exports.py similarity index 99% rename from src/python_minus_intercom/resources/data_exports.py rename to src/python_intercom/resources/data_exports.py index b980f399..775c52c1 100644 --- a/src/python_minus_intercom/resources/data_exports.py +++ b/src/python_intercom/resources/data_exports.py @@ -22,9 +22,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.data_export import DataExport __all__ = ["DataExportsResource", "AsyncDataExportsResource"] diff --git a/src/python_minus_intercom/resources/download/__init__.py b/src/python_intercom/resources/download/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/download/__init__.py rename to src/python_intercom/resources/download/__init__.py diff --git a/src/python_minus_intercom/resources/download/content/__init__.py b/src/python_intercom/resources/download/content/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/download/content/__init__.py rename to src/python_intercom/resources/download/content/__init__.py diff --git a/src/python_minus_intercom/resources/download/content/content.py b/src/python_intercom/resources/download/content/content.py similarity index 100% rename from src/python_minus_intercom/resources/download/content/content.py rename to src/python_intercom/resources/download/content/content.py diff --git a/src/python_minus_intercom/resources/download/content/data.py b/src/python_intercom/resources/download/content/data.py similarity index 99% rename from src/python_minus_intercom/resources/download/content/data.py rename to src/python_intercom/resources/download/content/data.py index 11613d4d..fd5195d2 100644 --- a/src/python_minus_intercom/resources/download/content/data.py +++ b/src/python_intercom/resources/download/content/data.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options __all__ = ["DataResource", "AsyncDataResource"] diff --git a/src/python_minus_intercom/resources/download/download.py b/src/python_intercom/resources/download/download.py similarity index 100% rename from src/python_minus_intercom/resources/download/download.py rename to src/python_intercom/resources/download/download.py diff --git a/src/python_minus_intercom/resources/export/__init__.py b/src/python_intercom/resources/export/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/export/__init__.py rename to src/python_intercom/resources/export/__init__.py diff --git a/src/python_minus_intercom/resources/export/content/__init__.py b/src/python_intercom/resources/export/content/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/export/content/__init__.py rename to src/python_intercom/resources/export/content/__init__.py diff --git a/src/python_minus_intercom/resources/export/content/content.py b/src/python_intercom/resources/export/content/content.py similarity index 100% rename from src/python_minus_intercom/resources/export/content/content.py rename to src/python_intercom/resources/export/content/content.py diff --git a/src/python_minus_intercom/resources/export/content/data.py b/src/python_intercom/resources/export/content/data.py similarity index 99% rename from src/python_minus_intercom/resources/export/content/data.py rename to src/python_intercom/resources/export/content/data.py index bf315359..aaa42015 100644 --- a/src/python_minus_intercom/resources/export/content/data.py +++ b/src/python_intercom/resources/export/content/data.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.data_export import DataExport __all__ = ["DataResource", "AsyncDataResource"] diff --git a/src/python_minus_intercom/resources/export/export.py b/src/python_intercom/resources/export/export.py similarity index 99% rename from src/python_minus_intercom/resources/export/export.py rename to src/python_intercom/resources/export/export.py index 727269c4..6258322b 100644 --- a/src/python_minus_intercom/resources/export/export.py +++ b/src/python_intercom/resources/export/export.py @@ -24,9 +24,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from .content.content import ContentResource, AsyncContentResource from ...types.data_export import DataExport diff --git a/src/python_minus_intercom/resources/help_center/__init__.py b/src/python_intercom/resources/help_center/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/help_center/__init__.py rename to src/python_intercom/resources/help_center/__init__.py diff --git a/src/python_minus_intercom/resources/help_center/collections.py b/src/python_intercom/resources/help_center/collections.py similarity index 99% rename from src/python_minus_intercom/resources/help_center/collections.py rename to src/python_intercom/resources/help_center/collections.py index f562bf5b..8ee3019c 100644 --- a/src/python_minus_intercom/resources/help_center/collections.py +++ b/src/python_intercom/resources/help_center/collections.py @@ -23,9 +23,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.help_center import collection_create_params, collection_update_params from ...types.help_center.collection import Collection from ...types.help_center.collection_list import CollectionList diff --git a/src/python_minus_intercom/resources/help_center/help_center.py b/src/python_intercom/resources/help_center/help_center.py similarity index 100% rename from src/python_minus_intercom/resources/help_center/help_center.py rename to src/python_intercom/resources/help_center/help_center.py diff --git a/src/python_minus_intercom/resources/help_center/help_centers.py b/src/python_intercom/resources/help_center/help_centers.py similarity index 99% rename from src/python_minus_intercom/resources/help_center/help_centers.py rename to src/python_intercom/resources/help_center/help_centers.py index 3f9767fa..86446e73 100644 --- a/src/python_minus_intercom/resources/help_center/help_centers.py +++ b/src/python_intercom/resources/help_center/help_centers.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.help_center.help_center import HelpCenter from ...types.help_center.help_center_list import HelpCenterList diff --git a/src/python_minus_intercom/resources/me.py b/src/python_intercom/resources/me.py similarity index 99% rename from src/python_minus_intercom/resources/me.py rename to src/python_intercom/resources/me.py index 328b3bf2..cd95378a 100644 --- a/src/python_minus_intercom/resources/me.py +++ b/src/python_intercom/resources/me.py @@ -17,9 +17,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.admin_with_app import AdminWithApp __all__ = ["MeResource", "AsyncMeResource"] diff --git a/src/python_minus_intercom/resources/messages.py b/src/python_intercom/resources/messages.py similarity index 99% rename from src/python_minus_intercom/resources/messages.py rename to src/python_intercom/resources/messages.py index e8e11157..e2c9feb7 100644 --- a/src/python_minus_intercom/resources/messages.py +++ b/src/python_intercom/resources/messages.py @@ -24,9 +24,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.shared.message import Message __all__ = ["MessagesResource", "AsyncMessagesResource"] diff --git a/src/python_minus_intercom/resources/news/__init__.py b/src/python_intercom/resources/news/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/news/__init__.py rename to src/python_intercom/resources/news/__init__.py diff --git a/src/python_minus_intercom/resources/news/news.py b/src/python_intercom/resources/news/news.py similarity index 100% rename from src/python_minus_intercom/resources/news/news.py rename to src/python_intercom/resources/news/news.py diff --git a/src/python_minus_intercom/resources/news/news_items.py b/src/python_intercom/resources/news/news_items.py similarity index 99% rename from src/python_minus_intercom/resources/news/news_items.py rename to src/python_intercom/resources/news/news_items.py index 1addbd74..b346eb33 100644 --- a/src/python_minus_intercom/resources/news/news_items.py +++ b/src/python_intercom/resources/news/news_items.py @@ -23,9 +23,7 @@ async_to_streamed_response_wrapper, ) from ...types.news import news_item_create_params, news_item_update_params -from ..._base_client import ( - make_request_options, -) +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_delete_response import NewsItemDeleteResponse diff --git a/src/python_minus_intercom/resources/news/newsfeeds/__init__.py b/src/python_intercom/resources/news/newsfeeds/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/news/newsfeeds/__init__.py rename to src/python_intercom/resources/news/newsfeeds/__init__.py diff --git a/src/python_minus_intercom/resources/news/newsfeeds/items.py b/src/python_intercom/resources/news/newsfeeds/items.py similarity index 99% rename from src/python_minus_intercom/resources/news/newsfeeds/items.py rename to src/python_intercom/resources/news/newsfeeds/items.py index 0f2e0a3c..63175b30 100644 --- a/src/python_minus_intercom/resources/news/newsfeeds/items.py +++ b/src/python_intercom/resources/news/newsfeeds/items.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.shared.paginated_response import PaginatedResponse __all__ = ["ItemsResource", "AsyncItemsResource"] diff --git a/src/python_minus_intercom/resources/news/newsfeeds/newsfeeds.py b/src/python_intercom/resources/news/newsfeeds/newsfeeds.py similarity index 99% rename from src/python_minus_intercom/resources/news/newsfeeds/newsfeeds.py rename to src/python_intercom/resources/news/newsfeeds/newsfeeds.py index 48de114b..ffcd4985 100644 --- a/src/python_minus_intercom/resources/news/newsfeeds/newsfeeds.py +++ b/src/python_intercom/resources/news/newsfeeds/newsfeeds.py @@ -24,9 +24,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ...._base_client import ( - make_request_options, -) +from ...._base_client import make_request_options from ....types.news.newsfeed import Newsfeed from ....types.shared.paginated_response import PaginatedResponse diff --git a/src/python_minus_intercom/resources/notes.py b/src/python_intercom/resources/notes.py similarity index 99% rename from src/python_minus_intercom/resources/notes.py rename to src/python_intercom/resources/notes.py index 4469fb98..ba0480ac 100644 --- a/src/python_minus_intercom/resources/notes.py +++ b/src/python_intercom/resources/notes.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.shared.note import Note __all__ = ["NotesResource", "AsyncNotesResource"] diff --git a/src/python_minus_intercom/resources/phone_call_redirects.py b/src/python_intercom/resources/phone_call_redirects.py similarity index 99% rename from src/python_minus_intercom/resources/phone_call_redirects.py rename to src/python_intercom/resources/phone_call_redirects.py index 0f397c92..f937bf67 100644 --- a/src/python_minus_intercom/resources/phone_call_redirects.py +++ b/src/python_intercom/resources/phone_call_redirects.py @@ -23,9 +23,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.phone_switch import PhoneSwitch __all__ = ["PhoneCallRedirectsResource", "AsyncPhoneCallRedirectsResource"] diff --git a/src/python_minus_intercom/resources/segments.py b/src/python_intercom/resources/segments.py similarity index 99% rename from src/python_minus_intercom/resources/segments.py rename to src/python_intercom/resources/segments.py index 55e0a579..e935572c 100644 --- a/src/python_minus_intercom/resources/segments.py +++ b/src/python_intercom/resources/segments.py @@ -22,9 +22,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.segment import Segment from ..types.segment_list import SegmentList diff --git a/src/python_minus_intercom/resources/subscription_types.py b/src/python_intercom/resources/subscription_types.py similarity index 99% rename from src/python_minus_intercom/resources/subscription_types.py rename to src/python_intercom/resources/subscription_types.py index da9d1167..41a7605a 100644 --- a/src/python_minus_intercom/resources/subscription_types.py +++ b/src/python_intercom/resources/subscription_types.py @@ -16,9 +16,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.shared.subscription_type_list import SubscriptionTypeList __all__ = ["SubscriptionTypesResource", "AsyncSubscriptionTypesResource"] diff --git a/src/python_minus_intercom/resources/tags.py b/src/python_intercom/resources/tags.py similarity index 99% rename from src/python_minus_intercom/resources/tags.py rename to src/python_intercom/resources/tags.py index 6d9a791c..43cedbc0 100644 --- a/src/python_minus_intercom/resources/tags.py +++ b/src/python_intercom/resources/tags.py @@ -24,9 +24,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.shared.tag import Tag from ..types.shared.tag_list import TagList diff --git a/src/python_minus_intercom/resources/teams.py b/src/python_intercom/resources/teams.py similarity index 99% rename from src/python_minus_intercom/resources/teams.py rename to src/python_intercom/resources/teams.py index 227e2338..f396608e 100644 --- a/src/python_minus_intercom/resources/teams.py +++ b/src/python_intercom/resources/teams.py @@ -17,9 +17,7 @@ async_to_streamed_response_wrapper, ) from ..types.team import Team -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.team_list import TeamList __all__ = ["TeamsResource", "AsyncTeamsResource"] diff --git a/src/python_minus_intercom/resources/ticket_types/__init__.py b/src/python_intercom/resources/ticket_types/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/ticket_types/__init__.py rename to src/python_intercom/resources/ticket_types/__init__.py diff --git a/src/python_minus_intercom/resources/ticket_types/attributes.py b/src/python_intercom/resources/ticket_types/attributes.py similarity index 99% rename from src/python_minus_intercom/resources/ticket_types/attributes.py rename to src/python_intercom/resources/ticket_types/attributes.py index df3a658a..06313b49 100644 --- a/src/python_minus_intercom/resources/ticket_types/attributes.py +++ b/src/python_intercom/resources/ticket_types/attributes.py @@ -22,9 +22,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.ticket_types import attribute_create_params, attribute_update_params from ...types.shared.ticket_type_attribute import TicketTypeAttribute diff --git a/src/python_minus_intercom/resources/ticket_types/ticket_types.py b/src/python_intercom/resources/ticket_types/ticket_types.py similarity index 99% rename from src/python_minus_intercom/resources/ticket_types/ticket_types.py rename to src/python_intercom/resources/ticket_types/ticket_types.py index 857f60a2..ad4cb1ec 100644 --- a/src/python_minus_intercom/resources/ticket_types/ticket_types.py +++ b/src/python_intercom/resources/ticket_types/ticket_types.py @@ -31,9 +31,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.ticket_type import TicketType from ...types.ticket_type_list import TicketTypeList diff --git a/src/python_minus_intercom/resources/tickets/__init__.py b/src/python_intercom/resources/tickets/__init__.py similarity index 100% rename from src/python_minus_intercom/resources/tickets/__init__.py rename to src/python_intercom/resources/tickets/__init__.py diff --git a/src/python_minus_intercom/resources/tickets/tags.py b/src/python_intercom/resources/tickets/tags.py similarity index 99% rename from src/python_minus_intercom/resources/tickets/tags.py rename to src/python_intercom/resources/tickets/tags.py index e318f188..9f1d9899 100644 --- a/src/python_minus_intercom/resources/tickets/tags.py +++ b/src/python_intercom/resources/tickets/tags.py @@ -21,9 +21,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.tickets import tag_create_params, tag_remove_params from ...types.shared.tag import Tag diff --git a/src/python_minus_intercom/resources/tickets/tickets.py b/src/python_intercom/resources/tickets/tickets.py similarity index 99% rename from src/python_minus_intercom/resources/tickets/tickets.py rename to src/python_intercom/resources/tickets/tickets.py index 7040bcad..99d1a0b3 100644 --- a/src/python_minus_intercom/resources/tickets/tickets.py +++ b/src/python_intercom/resources/tickets/tickets.py @@ -38,9 +38,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.ticket_list import TicketList from ...types.ticket_reply import TicketReply from ...types.shared.ticket import Ticket diff --git a/src/python_minus_intercom/resources/visitors.py b/src/python_intercom/resources/visitors.py similarity index 99% rename from src/python_minus_intercom/resources/visitors.py rename to src/python_intercom/resources/visitors.py index 4cbe014d..ddc009c5 100644 --- a/src/python_minus_intercom/resources/visitors.py +++ b/src/python_intercom/resources/visitors.py @@ -24,9 +24,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.visitor import Visitor from ..types.shared.contact import Contact diff --git a/src/python_minus_intercom/types/__init__.py b/src/python_intercom/types/__init__.py similarity index 100% rename from src/python_minus_intercom/types/__init__.py rename to src/python_intercom/types/__init__.py diff --git a/src/python_minus_intercom/types/admin_list.py b/src/python_intercom/types/admin_list.py similarity index 100% rename from src/python_minus_intercom/types/admin_list.py rename to src/python_intercom/types/admin_list.py diff --git a/src/python_minus_intercom/types/admin_set_away_params.py b/src/python_intercom/types/admin_set_away_params.py similarity index 100% rename from src/python_minus_intercom/types/admin_set_away_params.py rename to src/python_intercom/types/admin_set_away_params.py diff --git a/src/python_minus_intercom/types/admin_with_app.py b/src/python_intercom/types/admin_with_app.py similarity index 100% rename from src/python_minus_intercom/types/admin_with_app.py rename to src/python_intercom/types/admin_with_app.py diff --git a/src/python_minus_intercom/types/admins/__init__.py b/src/python_intercom/types/admins/__init__.py similarity index 100% rename from src/python_minus_intercom/types/admins/__init__.py rename to src/python_intercom/types/admins/__init__.py diff --git a/src/python_minus_intercom/types/admins/activity_log_list.py b/src/python_intercom/types/admins/activity_log_list.py similarity index 100% rename from src/python_minus_intercom/types/admins/activity_log_list.py rename to src/python_intercom/types/admins/activity_log_list.py diff --git a/src/python_minus_intercom/types/admins/activity_log_list_params.py b/src/python_intercom/types/admins/activity_log_list_params.py similarity index 100% rename from src/python_minus_intercom/types/admins/activity_log_list_params.py rename to src/python_intercom/types/admins/activity_log_list_params.py diff --git a/src/python_minus_intercom/types/article.py b/src/python_intercom/types/article.py similarity index 100% rename from src/python_minus_intercom/types/article.py rename to src/python_intercom/types/article.py diff --git a/src/python_minus_intercom/types/article_create_params.py b/src/python_intercom/types/article_create_params.py similarity index 100% rename from src/python_minus_intercom/types/article_create_params.py rename to src/python_intercom/types/article_create_params.py diff --git a/src/python_minus_intercom/types/article_list.py b/src/python_intercom/types/article_list.py similarity index 100% rename from src/python_minus_intercom/types/article_list.py rename to src/python_intercom/types/article_list.py diff --git a/src/python_minus_intercom/types/article_search_params.py b/src/python_intercom/types/article_search_params.py similarity index 100% rename from src/python_minus_intercom/types/article_search_params.py rename to src/python_intercom/types/article_search_params.py diff --git a/src/python_minus_intercom/types/article_search_response.py b/src/python_intercom/types/article_search_response.py similarity index 100% rename from src/python_minus_intercom/types/article_search_response.py rename to src/python_intercom/types/article_search_response.py diff --git a/src/python_minus_intercom/types/article_update_params.py b/src/python_intercom/types/article_update_params.py similarity index 100% rename from src/python_minus_intercom/types/article_update_params.py rename to src/python_intercom/types/article_update_params.py diff --git a/src/python_minus_intercom/types/companies/__init__.py b/src/python_intercom/types/companies/__init__.py similarity index 100% rename from src/python_minus_intercom/types/companies/__init__.py rename to src/python_intercom/types/companies/__init__.py diff --git a/src/python_minus_intercom/types/companies/company_attached_contacts.py b/src/python_intercom/types/companies/company_attached_contacts.py similarity index 100% rename from src/python_minus_intercom/types/companies/company_attached_contacts.py rename to src/python_intercom/types/companies/company_attached_contacts.py diff --git a/src/python_minus_intercom/types/companies/company_attached_segments.py b/src/python_intercom/types/companies/company_attached_segments.py similarity index 100% rename from src/python_minus_intercom/types/companies/company_attached_segments.py rename to src/python_intercom/types/companies/company_attached_segments.py diff --git a/src/python_minus_intercom/types/company_create_params.py b/src/python_intercom/types/company_create_params.py similarity index 100% rename from src/python_minus_intercom/types/company_create_params.py rename to src/python_intercom/types/company_create_params.py diff --git a/src/python_minus_intercom/types/company_list.py b/src/python_intercom/types/company_list.py similarity index 100% rename from src/python_minus_intercom/types/company_list.py rename to src/python_intercom/types/company_list.py diff --git a/src/python_minus_intercom/types/company_list_params.py b/src/python_intercom/types/company_list_params.py similarity index 100% rename from src/python_minus_intercom/types/company_list_params.py rename to src/python_intercom/types/company_list_params.py diff --git a/src/python_minus_intercom/types/company_retrieve_list_params.py b/src/python_intercom/types/company_retrieve_list_params.py similarity index 100% rename from src/python_minus_intercom/types/company_retrieve_list_params.py rename to src/python_intercom/types/company_retrieve_list_params.py diff --git a/src/python_minus_intercom/types/company_scroll.py b/src/python_intercom/types/company_scroll.py similarity index 100% rename from src/python_minus_intercom/types/company_scroll.py rename to src/python_intercom/types/company_scroll.py diff --git a/src/python_minus_intercom/types/company_scroll_params.py b/src/python_intercom/types/company_scroll_params.py similarity index 100% rename from src/python_minus_intercom/types/company_scroll_params.py rename to src/python_intercom/types/company_scroll_params.py diff --git a/src/python_minus_intercom/types/contact_archived.py b/src/python_intercom/types/contact_archived.py similarity index 100% rename from src/python_minus_intercom/types/contact_archived.py rename to src/python_intercom/types/contact_archived.py diff --git a/src/python_minus_intercom/types/contact_create_params.py b/src/python_intercom/types/contact_create_params.py similarity index 100% rename from src/python_minus_intercom/types/contact_create_params.py rename to src/python_intercom/types/contact_create_params.py diff --git a/src/python_minus_intercom/types/contact_deleted.py b/src/python_intercom/types/contact_deleted.py similarity index 100% rename from src/python_minus_intercom/types/contact_deleted.py rename to src/python_intercom/types/contact_deleted.py diff --git a/src/python_minus_intercom/types/contact_list.py b/src/python_intercom/types/contact_list.py similarity index 100% rename from src/python_minus_intercom/types/contact_list.py rename to src/python_intercom/types/contact_list.py diff --git a/src/python_minus_intercom/types/contact_merge_params.py b/src/python_intercom/types/contact_merge_params.py similarity index 100% rename from src/python_minus_intercom/types/contact_merge_params.py rename to src/python_intercom/types/contact_merge_params.py diff --git a/src/python_minus_intercom/types/contact_search_params.py b/src/python_intercom/types/contact_search_params.py similarity index 100% rename from src/python_minus_intercom/types/contact_search_params.py rename to src/python_intercom/types/contact_search_params.py diff --git a/src/python_minus_intercom/types/contact_unarchived.py b/src/python_intercom/types/contact_unarchived.py similarity index 100% rename from src/python_minus_intercom/types/contact_unarchived.py rename to src/python_intercom/types/contact_unarchived.py diff --git a/src/python_minus_intercom/types/contact_update_params.py b/src/python_intercom/types/contact_update_params.py similarity index 100% rename from src/python_minus_intercom/types/contact_update_params.py rename to src/python_intercom/types/contact_update_params.py diff --git a/src/python_minus_intercom/types/contacts/__init__.py b/src/python_intercom/types/contacts/__init__.py similarity index 100% rename from src/python_minus_intercom/types/contacts/__init__.py rename to src/python_intercom/types/contacts/__init__.py diff --git a/src/python_minus_intercom/types/contacts/company_create_params.py b/src/python_intercom/types/contacts/company_create_params.py similarity index 100% rename from src/python_minus_intercom/types/contacts/company_create_params.py rename to src/python_intercom/types/contacts/company_create_params.py diff --git a/src/python_minus_intercom/types/contacts/contact_attached_companies.py b/src/python_intercom/types/contacts/contact_attached_companies.py similarity index 100% rename from src/python_minus_intercom/types/contacts/contact_attached_companies.py rename to src/python_intercom/types/contacts/contact_attached_companies.py diff --git a/src/python_minus_intercom/types/contacts/contact_segments.py b/src/python_intercom/types/contacts/contact_segments.py similarity index 100% rename from src/python_minus_intercom/types/contacts/contact_segments.py rename to src/python_intercom/types/contacts/contact_segments.py diff --git a/src/python_minus_intercom/types/contacts/note_create_params.py b/src/python_intercom/types/contacts/note_create_params.py similarity index 100% rename from src/python_minus_intercom/types/contacts/note_create_params.py rename to src/python_intercom/types/contacts/note_create_params.py diff --git a/src/python_minus_intercom/types/contacts/note_list.py b/src/python_intercom/types/contacts/note_list.py similarity index 100% rename from src/python_minus_intercom/types/contacts/note_list.py rename to src/python_intercom/types/contacts/note_list.py diff --git a/src/python_minus_intercom/types/contacts/subscription_create_params.py b/src/python_intercom/types/contacts/subscription_create_params.py similarity index 100% rename from src/python_minus_intercom/types/contacts/subscription_create_params.py rename to src/python_intercom/types/contacts/subscription_create_params.py diff --git a/src/python_minus_intercom/types/contacts/subscription_type.py b/src/python_intercom/types/contacts/subscription_type.py similarity index 100% rename from src/python_minus_intercom/types/contacts/subscription_type.py rename to src/python_intercom/types/contacts/subscription_type.py diff --git a/src/python_minus_intercom/types/contacts/tag_create_params.py b/src/python_intercom/types/contacts/tag_create_params.py similarity index 100% rename from src/python_minus_intercom/types/contacts/tag_create_params.py rename to src/python_intercom/types/contacts/tag_create_params.py diff --git a/src/python_minus_intercom/types/conversation_convert_params.py b/src/python_intercom/types/conversation_convert_params.py similarity index 100% rename from src/python_minus_intercom/types/conversation_convert_params.py rename to src/python_intercom/types/conversation_convert_params.py diff --git a/src/python_minus_intercom/types/conversation_create_params.py b/src/python_intercom/types/conversation_create_params.py similarity index 100% rename from src/python_minus_intercom/types/conversation_create_params.py rename to src/python_intercom/types/conversation_create_params.py diff --git a/src/python_minus_intercom/types/conversation_list.py b/src/python_intercom/types/conversation_list.py similarity index 100% rename from src/python_minus_intercom/types/conversation_list.py rename to src/python_intercom/types/conversation_list.py diff --git a/src/python_minus_intercom/types/conversation_list_params.py b/src/python_intercom/types/conversation_list_params.py similarity index 100% rename from src/python_minus_intercom/types/conversation_list_params.py rename to src/python_intercom/types/conversation_list_params.py diff --git a/src/python_minus_intercom/types/conversation_list_response.py b/src/python_intercom/types/conversation_list_response.py similarity index 100% rename from src/python_minus_intercom/types/conversation_list_response.py rename to src/python_intercom/types/conversation_list_response.py diff --git a/src/python_minus_intercom/types/conversation_redact_params.py b/src/python_intercom/types/conversation_redact_params.py similarity index 100% rename from src/python_minus_intercom/types/conversation_redact_params.py rename to src/python_intercom/types/conversation_redact_params.py diff --git a/src/python_minus_intercom/types/conversation_retrieve_params.py b/src/python_intercom/types/conversation_retrieve_params.py similarity index 100% rename from src/python_minus_intercom/types/conversation_retrieve_params.py rename to src/python_intercom/types/conversation_retrieve_params.py diff --git a/src/python_minus_intercom/types/conversation_search_params.py b/src/python_intercom/types/conversation_search_params.py similarity index 100% rename from src/python_minus_intercom/types/conversation_search_params.py rename to src/python_intercom/types/conversation_search_params.py diff --git a/src/python_minus_intercom/types/conversation_update_params.py b/src/python_intercom/types/conversation_update_params.py similarity index 100% rename from src/python_minus_intercom/types/conversation_update_params.py rename to src/python_intercom/types/conversation_update_params.py diff --git a/src/python_minus_intercom/types/conversations/__init__.py b/src/python_intercom/types/conversations/__init__.py similarity index 100% rename from src/python_minus_intercom/types/conversations/__init__.py rename to src/python_intercom/types/conversations/__init__.py diff --git a/src/python_minus_intercom/types/conversations/customer_create_params.py b/src/python_intercom/types/conversations/customer_create_params.py similarity index 100% rename from src/python_minus_intercom/types/conversations/customer_create_params.py rename to src/python_intercom/types/conversations/customer_create_params.py diff --git a/src/python_minus_intercom/types/conversations/customer_delete_params.py b/src/python_intercom/types/conversations/customer_delete_params.py similarity index 100% rename from src/python_minus_intercom/types/conversations/customer_delete_params.py rename to src/python_intercom/types/conversations/customer_delete_params.py diff --git a/src/python_minus_intercom/types/conversations/part_create_params.py b/src/python_intercom/types/conversations/part_create_params.py similarity index 100% rename from src/python_minus_intercom/types/conversations/part_create_params.py rename to src/python_intercom/types/conversations/part_create_params.py diff --git a/src/python_minus_intercom/types/conversations/reply_create_params.py b/src/python_intercom/types/conversations/reply_create_params.py similarity index 100% rename from src/python_minus_intercom/types/conversations/reply_create_params.py rename to src/python_intercom/types/conversations/reply_create_params.py diff --git a/src/python_minus_intercom/types/conversations/tag_create_params.py b/src/python_intercom/types/conversations/tag_create_params.py similarity index 100% rename from src/python_minus_intercom/types/conversations/tag_create_params.py rename to src/python_intercom/types/conversations/tag_create_params.py diff --git a/src/python_minus_intercom/types/conversations/tag_delete_params.py b/src/python_intercom/types/conversations/tag_delete_params.py similarity index 100% rename from src/python_minus_intercom/types/conversations/tag_delete_params.py rename to src/python_intercom/types/conversations/tag_delete_params.py diff --git a/src/python_minus_intercom/types/data_attribute.py b/src/python_intercom/types/data_attribute.py similarity index 100% rename from src/python_minus_intercom/types/data_attribute.py rename to src/python_intercom/types/data_attribute.py diff --git a/src/python_minus_intercom/types/data_attribute_create_params.py b/src/python_intercom/types/data_attribute_create_params.py similarity index 100% rename from src/python_minus_intercom/types/data_attribute_create_params.py rename to src/python_intercom/types/data_attribute_create_params.py diff --git a/src/python_minus_intercom/types/data_attribute_list.py b/src/python_intercom/types/data_attribute_list.py similarity index 100% rename from src/python_minus_intercom/types/data_attribute_list.py rename to src/python_intercom/types/data_attribute_list.py diff --git a/src/python_minus_intercom/types/data_attribute_list_params.py b/src/python_intercom/types/data_attribute_list_params.py similarity index 100% rename from src/python_minus_intercom/types/data_attribute_list_params.py rename to src/python_intercom/types/data_attribute_list_params.py diff --git a/src/python_minus_intercom/types/data_attribute_update_params.py b/src/python_intercom/types/data_attribute_update_params.py similarity index 100% rename from src/python_minus_intercom/types/data_attribute_update_params.py rename to src/python_intercom/types/data_attribute_update_params.py diff --git a/src/python_minus_intercom/types/data_event_create_params.py b/src/python_intercom/types/data_event_create_params.py similarity index 100% rename from src/python_minus_intercom/types/data_event_create_params.py rename to src/python_intercom/types/data_event_create_params.py diff --git a/src/python_minus_intercom/types/data_event_list_params.py b/src/python_intercom/types/data_event_list_params.py similarity index 100% rename from src/python_minus_intercom/types/data_event_list_params.py rename to src/python_intercom/types/data_event_list_params.py diff --git a/src/python_minus_intercom/types/data_event_summaries_params.py b/src/python_intercom/types/data_event_summaries_params.py similarity index 100% rename from src/python_minus_intercom/types/data_event_summaries_params.py rename to src/python_intercom/types/data_event_summaries_params.py diff --git a/src/python_minus_intercom/types/data_event_summary.py b/src/python_intercom/types/data_event_summary.py similarity index 100% rename from src/python_minus_intercom/types/data_event_summary.py rename to src/python_intercom/types/data_event_summary.py diff --git a/src/python_minus_intercom/types/data_export.py b/src/python_intercom/types/data_export.py similarity index 100% rename from src/python_minus_intercom/types/data_export.py rename to src/python_intercom/types/data_export.py diff --git a/src/python_minus_intercom/types/data_export_content_data_params.py b/src/python_intercom/types/data_export_content_data_params.py similarity index 100% rename from src/python_minus_intercom/types/data_export_content_data_params.py rename to src/python_intercom/types/data_export_content_data_params.py diff --git a/src/python_minus_intercom/types/deleted_article_object.py b/src/python_intercom/types/deleted_article_object.py similarity index 100% rename from src/python_minus_intercom/types/deleted_article_object.py rename to src/python_intercom/types/deleted_article_object.py diff --git a/src/python_minus_intercom/types/deleted_company_object.py b/src/python_intercom/types/deleted_company_object.py similarity index 100% rename from src/python_minus_intercom/types/deleted_company_object.py rename to src/python_intercom/types/deleted_company_object.py diff --git a/src/python_minus_intercom/types/download/__init__.py b/src/python_intercom/types/download/__init__.py similarity index 100% rename from src/python_minus_intercom/types/download/__init__.py rename to src/python_intercom/types/download/__init__.py diff --git a/src/python_minus_intercom/types/download/content/__init__.py b/src/python_intercom/types/download/content/__init__.py similarity index 100% rename from src/python_minus_intercom/types/download/content/__init__.py rename to src/python_intercom/types/download/content/__init__.py diff --git a/src/python_minus_intercom/types/export/__init__.py b/src/python_intercom/types/export/__init__.py similarity index 100% rename from src/python_minus_intercom/types/export/__init__.py rename to src/python_intercom/types/export/__init__.py diff --git a/src/python_minus_intercom/types/export/content/__init__.py b/src/python_intercom/types/export/content/__init__.py similarity index 100% rename from src/python_minus_intercom/types/export/content/__init__.py rename to src/python_intercom/types/export/content/__init__.py diff --git a/src/python_minus_intercom/types/help_center/__init__.py b/src/python_intercom/types/help_center/__init__.py similarity index 100% rename from src/python_minus_intercom/types/help_center/__init__.py rename to src/python_intercom/types/help_center/__init__.py diff --git a/src/python_minus_intercom/types/help_center/collection.py b/src/python_intercom/types/help_center/collection.py similarity index 100% rename from src/python_minus_intercom/types/help_center/collection.py rename to src/python_intercom/types/help_center/collection.py diff --git a/src/python_minus_intercom/types/help_center/collection_create_params.py b/src/python_intercom/types/help_center/collection_create_params.py similarity index 100% rename from src/python_minus_intercom/types/help_center/collection_create_params.py rename to src/python_intercom/types/help_center/collection_create_params.py diff --git a/src/python_minus_intercom/types/help_center/collection_list.py b/src/python_intercom/types/help_center/collection_list.py similarity index 100% rename from src/python_minus_intercom/types/help_center/collection_list.py rename to src/python_intercom/types/help_center/collection_list.py diff --git a/src/python_minus_intercom/types/help_center/collection_update_params.py b/src/python_intercom/types/help_center/collection_update_params.py similarity index 100% rename from src/python_minus_intercom/types/help_center/collection_update_params.py rename to src/python_intercom/types/help_center/collection_update_params.py diff --git a/src/python_minus_intercom/types/help_center/deleted_collection.py b/src/python_intercom/types/help_center/deleted_collection.py similarity index 100% rename from src/python_minus_intercom/types/help_center/deleted_collection.py rename to src/python_intercom/types/help_center/deleted_collection.py diff --git a/src/python_minus_intercom/types/help_center/help_center.py b/src/python_intercom/types/help_center/help_center.py similarity index 100% rename from src/python_minus_intercom/types/help_center/help_center.py rename to src/python_intercom/types/help_center/help_center.py diff --git a/src/python_minus_intercom/types/help_center/help_center_list.py b/src/python_intercom/types/help_center/help_center_list.py similarity index 100% rename from src/python_minus_intercom/types/help_center/help_center_list.py rename to src/python_intercom/types/help_center/help_center_list.py diff --git a/src/python_minus_intercom/types/message_create_params.py b/src/python_intercom/types/message_create_params.py similarity index 100% rename from src/python_minus_intercom/types/message_create_params.py rename to src/python_intercom/types/message_create_params.py diff --git a/src/python_minus_intercom/types/news/__init__.py b/src/python_intercom/types/news/__init__.py similarity index 100% rename from src/python_minus_intercom/types/news/__init__.py rename to src/python_intercom/types/news/__init__.py diff --git a/src/python_minus_intercom/types/news/news_item.py b/src/python_intercom/types/news/news_item.py similarity index 100% rename from src/python_minus_intercom/types/news/news_item.py rename to src/python_intercom/types/news/news_item.py diff --git a/src/python_minus_intercom/types/news/news_item_create_params.py b/src/python_intercom/types/news/news_item_create_params.py similarity index 100% rename from src/python_minus_intercom/types/news/news_item_create_params.py rename to src/python_intercom/types/news/news_item_create_params.py diff --git a/src/python_minus_intercom/types/news/news_item_delete_response.py b/src/python_intercom/types/news/news_item_delete_response.py similarity index 100% rename from src/python_minus_intercom/types/news/news_item_delete_response.py rename to src/python_intercom/types/news/news_item_delete_response.py diff --git a/src/python_minus_intercom/types/news/news_item_update_params.py b/src/python_intercom/types/news/news_item_update_params.py similarity index 100% rename from src/python_minus_intercom/types/news/news_item_update_params.py rename to src/python_intercom/types/news/news_item_update_params.py diff --git a/src/python_minus_intercom/types/news/newsfeed.py b/src/python_intercom/types/news/newsfeed.py similarity index 100% rename from src/python_minus_intercom/types/news/newsfeed.py rename to src/python_intercom/types/news/newsfeed.py diff --git a/src/python_minus_intercom/types/news/newsfeeds/__init__.py b/src/python_intercom/types/news/newsfeeds/__init__.py similarity index 100% rename from src/python_minus_intercom/types/news/newsfeeds/__init__.py rename to src/python_intercom/types/news/newsfeeds/__init__.py diff --git a/src/python_minus_intercom/types/phone_call_redirect_create_params.py b/src/python_intercom/types/phone_call_redirect_create_params.py similarity index 100% rename from src/python_minus_intercom/types/phone_call_redirect_create_params.py rename to src/python_intercom/types/phone_call_redirect_create_params.py diff --git a/src/python_minus_intercom/types/phone_switch.py b/src/python_intercom/types/phone_switch.py similarity index 100% rename from src/python_minus_intercom/types/phone_switch.py rename to src/python_intercom/types/phone_switch.py diff --git a/src/python_minus_intercom/types/segment.py b/src/python_intercom/types/segment.py similarity index 100% rename from src/python_minus_intercom/types/segment.py rename to src/python_intercom/types/segment.py diff --git a/src/python_minus_intercom/types/segment_list.py b/src/python_intercom/types/segment_list.py similarity index 100% rename from src/python_minus_intercom/types/segment_list.py rename to src/python_intercom/types/segment_list.py diff --git a/src/python_minus_intercom/types/segment_list_params.py b/src/python_intercom/types/segment_list_params.py similarity index 100% rename from src/python_minus_intercom/types/segment_list_params.py rename to src/python_intercom/types/segment_list_params.py diff --git a/src/python_minus_intercom/types/shared/__init__.py b/src/python_intercom/types/shared/__init__.py similarity index 100% rename from src/python_minus_intercom/types/shared/__init__.py rename to src/python_intercom/types/shared/__init__.py diff --git a/src/python_minus_intercom/types/shared/admin.py b/src/python_intercom/types/shared/admin.py similarity index 100% rename from src/python_minus_intercom/types/shared/admin.py rename to src/python_intercom/types/shared/admin.py diff --git a/src/python_minus_intercom/types/shared/article_content.py b/src/python_intercom/types/shared/article_content.py similarity index 100% rename from src/python_minus_intercom/types/shared/article_content.py rename to src/python_intercom/types/shared/article_content.py diff --git a/src/python_minus_intercom/types/shared/article_translated_content.py b/src/python_intercom/types/shared/article_translated_content.py similarity index 100% rename from src/python_minus_intercom/types/shared/article_translated_content.py rename to src/python_intercom/types/shared/article_translated_content.py diff --git a/src/python_minus_intercom/types/shared/company.py b/src/python_intercom/types/shared/company.py similarity index 100% rename from src/python_minus_intercom/types/shared/company.py rename to src/python_intercom/types/shared/company.py diff --git a/src/python_minus_intercom/types/shared/contact.py b/src/python_intercom/types/shared/contact.py similarity index 100% rename from src/python_minus_intercom/types/shared/contact.py rename to src/python_intercom/types/shared/contact.py diff --git a/src/python_minus_intercom/types/shared/contact_reference.py b/src/python_intercom/types/shared/contact_reference.py similarity index 100% rename from src/python_minus_intercom/types/shared/contact_reference.py rename to src/python_intercom/types/shared/contact_reference.py diff --git a/src/python_minus_intercom/types/shared/conversation.py b/src/python_intercom/types/shared/conversation.py similarity index 100% rename from src/python_minus_intercom/types/shared/conversation.py rename to src/python_intercom/types/shared/conversation.py diff --git a/src/python_minus_intercom/types/shared/cursor_pages.py b/src/python_intercom/types/shared/cursor_pages.py similarity index 100% rename from src/python_minus_intercom/types/shared/cursor_pages.py rename to src/python_intercom/types/shared/cursor_pages.py diff --git a/src/python_minus_intercom/types/shared/group_content.py b/src/python_intercom/types/shared/group_content.py similarity index 100% rename from src/python_minus_intercom/types/shared/group_content.py rename to src/python_intercom/types/shared/group_content.py diff --git a/src/python_minus_intercom/types/shared/group_translated_content.py b/src/python_intercom/types/shared/group_translated_content.py similarity index 100% rename from src/python_minus_intercom/types/shared/group_translated_content.py rename to src/python_intercom/types/shared/group_translated_content.py diff --git a/src/python_minus_intercom/types/shared/message.py b/src/python_intercom/types/shared/message.py similarity index 100% rename from src/python_minus_intercom/types/shared/message.py rename to src/python_intercom/types/shared/message.py diff --git a/src/python_minus_intercom/types/shared/multiple_filter_search_request.py b/src/python_intercom/types/shared/multiple_filter_search_request.py similarity index 100% rename from src/python_minus_intercom/types/shared/multiple_filter_search_request.py rename to src/python_intercom/types/shared/multiple_filter_search_request.py diff --git a/src/python_minus_intercom/types/shared/note.py b/src/python_intercom/types/shared/note.py similarity index 100% rename from src/python_minus_intercom/types/shared/note.py rename to src/python_intercom/types/shared/note.py diff --git a/src/python_minus_intercom/types/shared/paginated_response.py b/src/python_intercom/types/shared/paginated_response.py similarity index 100% rename from src/python_minus_intercom/types/shared/paginated_response.py rename to src/python_intercom/types/shared/paginated_response.py diff --git a/src/python_minus_intercom/types/shared/part_attachment.py b/src/python_intercom/types/shared/part_attachment.py similarity index 100% rename from src/python_minus_intercom/types/shared/part_attachment.py rename to src/python_intercom/types/shared/part_attachment.py diff --git a/src/python_minus_intercom/types/shared/reference.py b/src/python_intercom/types/shared/reference.py similarity index 100% rename from src/python_minus_intercom/types/shared/reference.py rename to src/python_intercom/types/shared/reference.py diff --git a/src/python_minus_intercom/types/shared/search_request.py b/src/python_intercom/types/shared/search_request.py similarity index 100% rename from src/python_minus_intercom/types/shared/search_request.py rename to src/python_intercom/types/shared/search_request.py diff --git a/src/python_minus_intercom/types/shared/single_filter_search_request.py b/src/python_intercom/types/shared/single_filter_search_request.py similarity index 100% rename from src/python_minus_intercom/types/shared/single_filter_search_request.py rename to src/python_intercom/types/shared/single_filter_search_request.py diff --git a/src/python_minus_intercom/types/shared/starting_after_paging.py b/src/python_intercom/types/shared/starting_after_paging.py similarity index 100% rename from src/python_minus_intercom/types/shared/starting_after_paging.py rename to src/python_intercom/types/shared/starting_after_paging.py diff --git a/src/python_minus_intercom/types/shared/subscription_type_list.py b/src/python_intercom/types/shared/subscription_type_list.py similarity index 100% rename from src/python_minus_intercom/types/shared/subscription_type_list.py rename to src/python_intercom/types/shared/subscription_type_list.py diff --git a/src/python_minus_intercom/types/shared/tag.py b/src/python_intercom/types/shared/tag.py similarity index 100% rename from src/python_minus_intercom/types/shared/tag.py rename to src/python_intercom/types/shared/tag.py diff --git a/src/python_minus_intercom/types/shared/tag_list.py b/src/python_intercom/types/shared/tag_list.py similarity index 100% rename from src/python_minus_intercom/types/shared/tag_list.py rename to src/python_intercom/types/shared/tag_list.py diff --git a/src/python_minus_intercom/types/shared/ticket.py b/src/python_intercom/types/shared/ticket.py similarity index 100% rename from src/python_minus_intercom/types/shared/ticket.py rename to src/python_intercom/types/shared/ticket.py diff --git a/src/python_minus_intercom/types/shared/ticket_type_attribute.py b/src/python_intercom/types/shared/ticket_type_attribute.py similarity index 100% rename from src/python_minus_intercom/types/shared/ticket_type_attribute.py rename to src/python_intercom/types/shared/ticket_type_attribute.py diff --git a/src/python_minus_intercom/types/shared_params/__init__.py b/src/python_intercom/types/shared_params/__init__.py similarity index 100% rename from src/python_minus_intercom/types/shared_params/__init__.py rename to src/python_intercom/types/shared_params/__init__.py diff --git a/src/python_minus_intercom/types/shared_params/article_content.py b/src/python_intercom/types/shared_params/article_content.py similarity index 100% rename from src/python_minus_intercom/types/shared_params/article_content.py rename to src/python_intercom/types/shared_params/article_content.py diff --git a/src/python_minus_intercom/types/shared_params/article_translated_content.py b/src/python_intercom/types/shared_params/article_translated_content.py similarity index 100% rename from src/python_minus_intercom/types/shared_params/article_translated_content.py rename to src/python_intercom/types/shared_params/article_translated_content.py diff --git a/src/python_minus_intercom/types/shared_params/group_content.py b/src/python_intercom/types/shared_params/group_content.py similarity index 100% rename from src/python_minus_intercom/types/shared_params/group_content.py rename to src/python_intercom/types/shared_params/group_content.py diff --git a/src/python_minus_intercom/types/shared_params/group_translated_content.py b/src/python_intercom/types/shared_params/group_translated_content.py similarity index 100% rename from src/python_minus_intercom/types/shared_params/group_translated_content.py rename to src/python_intercom/types/shared_params/group_translated_content.py diff --git a/src/python_minus_intercom/types/shared_params/multiple_filter_search_request.py b/src/python_intercom/types/shared_params/multiple_filter_search_request.py similarity index 100% rename from src/python_minus_intercom/types/shared_params/multiple_filter_search_request.py rename to src/python_intercom/types/shared_params/multiple_filter_search_request.py diff --git a/src/python_minus_intercom/types/shared_params/single_filter_search_request.py b/src/python_intercom/types/shared_params/single_filter_search_request.py similarity index 100% rename from src/python_minus_intercom/types/shared_params/single_filter_search_request.py rename to src/python_intercom/types/shared_params/single_filter_search_request.py diff --git a/src/python_minus_intercom/types/shared_params/starting_after_paging.py b/src/python_intercom/types/shared_params/starting_after_paging.py similarity index 100% rename from src/python_minus_intercom/types/shared_params/starting_after_paging.py rename to src/python_intercom/types/shared_params/starting_after_paging.py diff --git a/src/python_minus_intercom/types/tag_create_or_update_params.py b/src/python_intercom/types/tag_create_or_update_params.py similarity index 100% rename from src/python_minus_intercom/types/tag_create_or_update_params.py rename to src/python_intercom/types/tag_create_or_update_params.py diff --git a/src/python_minus_intercom/types/team.py b/src/python_intercom/types/team.py similarity index 100% rename from src/python_minus_intercom/types/team.py rename to src/python_intercom/types/team.py diff --git a/src/python_minus_intercom/types/team_list.py b/src/python_intercom/types/team_list.py similarity index 100% rename from src/python_minus_intercom/types/team_list.py rename to src/python_intercom/types/team_list.py diff --git a/src/python_minus_intercom/types/ticket_create_params.py b/src/python_intercom/types/ticket_create_params.py similarity index 100% rename from src/python_minus_intercom/types/ticket_create_params.py rename to src/python_intercom/types/ticket_create_params.py diff --git a/src/python_minus_intercom/types/ticket_list.py b/src/python_intercom/types/ticket_list.py similarity index 100% rename from src/python_minus_intercom/types/ticket_list.py rename to src/python_intercom/types/ticket_list.py diff --git a/src/python_minus_intercom/types/ticket_reply.py b/src/python_intercom/types/ticket_reply.py similarity index 100% rename from src/python_minus_intercom/types/ticket_reply.py rename to src/python_intercom/types/ticket_reply.py diff --git a/src/python_minus_intercom/types/ticket_reply_params.py b/src/python_intercom/types/ticket_reply_params.py similarity index 100% rename from src/python_minus_intercom/types/ticket_reply_params.py rename to src/python_intercom/types/ticket_reply_params.py diff --git a/src/python_minus_intercom/types/ticket_search_params.py b/src/python_intercom/types/ticket_search_params.py similarity index 100% rename from src/python_minus_intercom/types/ticket_search_params.py rename to src/python_intercom/types/ticket_search_params.py diff --git a/src/python_minus_intercom/types/ticket_type.py b/src/python_intercom/types/ticket_type.py similarity index 100% rename from src/python_minus_intercom/types/ticket_type.py rename to src/python_intercom/types/ticket_type.py diff --git a/src/python_minus_intercom/types/ticket_type_create_params.py b/src/python_intercom/types/ticket_type_create_params.py similarity index 100% rename from src/python_minus_intercom/types/ticket_type_create_params.py rename to src/python_intercom/types/ticket_type_create_params.py diff --git a/src/python_minus_intercom/types/ticket_type_list.py b/src/python_intercom/types/ticket_type_list.py similarity index 100% rename from src/python_minus_intercom/types/ticket_type_list.py rename to src/python_intercom/types/ticket_type_list.py diff --git a/src/python_minus_intercom/types/ticket_type_update_params.py b/src/python_intercom/types/ticket_type_update_params.py similarity index 100% rename from src/python_minus_intercom/types/ticket_type_update_params.py rename to src/python_intercom/types/ticket_type_update_params.py diff --git a/src/python_minus_intercom/types/ticket_types/__init__.py b/src/python_intercom/types/ticket_types/__init__.py similarity index 100% rename from src/python_minus_intercom/types/ticket_types/__init__.py rename to src/python_intercom/types/ticket_types/__init__.py diff --git a/src/python_minus_intercom/types/ticket_types/attribute_create_params.py b/src/python_intercom/types/ticket_types/attribute_create_params.py similarity index 100% rename from src/python_minus_intercom/types/ticket_types/attribute_create_params.py rename to src/python_intercom/types/ticket_types/attribute_create_params.py diff --git a/src/python_minus_intercom/types/ticket_types/attribute_update_params.py b/src/python_intercom/types/ticket_types/attribute_update_params.py similarity index 100% rename from src/python_minus_intercom/types/ticket_types/attribute_update_params.py rename to src/python_intercom/types/ticket_types/attribute_update_params.py diff --git a/src/python_minus_intercom/types/ticket_update_by_id_params.py b/src/python_intercom/types/ticket_update_by_id_params.py similarity index 100% rename from src/python_minus_intercom/types/ticket_update_by_id_params.py rename to src/python_intercom/types/ticket_update_by_id_params.py diff --git a/src/python_minus_intercom/types/tickets/__init__.py b/src/python_intercom/types/tickets/__init__.py similarity index 100% rename from src/python_minus_intercom/types/tickets/__init__.py rename to src/python_intercom/types/tickets/__init__.py diff --git a/src/python_minus_intercom/types/tickets/tag_create_params.py b/src/python_intercom/types/tickets/tag_create_params.py similarity index 100% rename from src/python_minus_intercom/types/tickets/tag_create_params.py rename to src/python_intercom/types/tickets/tag_create_params.py diff --git a/src/python_minus_intercom/types/tickets/tag_remove_params.py b/src/python_intercom/types/tickets/tag_remove_params.py similarity index 100% rename from src/python_minus_intercom/types/tickets/tag_remove_params.py rename to src/python_intercom/types/tickets/tag_remove_params.py diff --git a/src/python_minus_intercom/types/visitor.py b/src/python_intercom/types/visitor.py similarity index 100% rename from src/python_minus_intercom/types/visitor.py rename to src/python_intercom/types/visitor.py diff --git a/src/python_minus_intercom/types/visitor_convert_params.py b/src/python_intercom/types/visitor_convert_params.py similarity index 100% rename from src/python_minus_intercom/types/visitor_convert_params.py rename to src/python_intercom/types/visitor_convert_params.py diff --git a/src/python_minus_intercom/types/visitor_retrieve_params.py b/src/python_intercom/types/visitor_retrieve_params.py similarity index 100% rename from src/python_minus_intercom/types/visitor_retrieve_params.py rename to src/python_intercom/types/visitor_retrieve_params.py diff --git a/src/python_minus_intercom/types/visitor_update_params.py b/src/python_intercom/types/visitor_update_params.py similarity index 100% rename from src/python_minus_intercom/types/visitor_update_params.py rename to src/python_intercom/types/visitor_update_params.py diff --git a/tests/api_resources/admins/test_activity_logs.py b/tests/api_resources/admins/test_activity_logs.py index 24803a94..5f95270a 100644 --- a/tests/api_resources/admins/test_activity_logs.py +++ b/tests/api_resources/admins/test_activity_logs.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.admins import ActivityLogList +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.admins import ActivityLogList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,15 +20,15 @@ class TestActivityLogs: @parametrize def test_method_list(self, client: Intercom) -> None: activity_log = client.admins.activity_logs.list( - created_at_after="string", + created_at_after="created_at_after", ) assert_matches_type(ActivityLogList, activity_log, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: activity_log = client.admins.activity_logs.list( - created_at_after="string", - created_at_before="string", + created_at_after="created_at_after", + created_at_before="created_at_before", intercom_version="2.11", ) assert_matches_type(ActivityLogList, activity_log, path=["response"]) @@ -36,7 +36,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.admins.activity_logs.with_raw_response.list( - created_at_after="string", + created_at_after="created_at_after", ) assert response.is_closed is True @@ -47,7 +47,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.admins.activity_logs.with_streaming_response.list( - created_at_after="string", + created_at_after="created_at_after", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,15 +64,15 @@ class TestAsyncActivityLogs: @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: activity_log = await async_client.admins.activity_logs.list( - created_at_after="string", + created_at_after="created_at_after", ) assert_matches_type(ActivityLogList, activity_log, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: activity_log = await async_client.admins.activity_logs.list( - created_at_after="string", - created_at_before="string", + created_at_after="created_at_after", + created_at_before="created_at_before", intercom_version="2.11", ) assert_matches_type(ActivityLogList, activity_log, path=["response"]) @@ -80,7 +80,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.admins.activity_logs.with_raw_response.list( - created_at_after="string", + created_at_after="created_at_after", ) assert response.is_closed is True @@ -91,7 +91,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.admins.activity_logs.with_streaming_response.list( - created_at_after="string", + created_at_after="created_at_after", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/companies/test_contacts.py b/tests/api_resources/companies/test_contacts.py index 99ec0c80..8a3c6899 100644 --- a/tests/api_resources/companies/test_contacts.py +++ b/tests/api_resources/companies/test_contacts.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.companies import CompanyAttachedContacts +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.companies import CompanyAttachedContacts base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestContacts: @parametrize def test_method_list(self, client: Intercom) -> None: contact = client.companies.contacts.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(CompanyAttachedContacts, contact, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: contact = client.companies.contacts.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(CompanyAttachedContacts, contact, path=["response"]) @@ -35,7 +35,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.companies.contacts.with_raw_response.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.companies.contacts.with_streaming_response.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_list(self, client: Intercom) -> None: def test_path_params_list(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.companies.contacts.with_raw_response.list( - "", + id="", ) @@ -70,14 +70,14 @@ class TestAsyncContacts: @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: contact = await async_client.companies.contacts.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(CompanyAttachedContacts, contact, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: contact = await async_client.companies.contacts.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(CompanyAttachedContacts, contact, path=["response"]) @@ -85,7 +85,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.companies.contacts.with_raw_response.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -96,7 +96,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.companies.contacts.with_streaming_response.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,5 +110,5 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non async def test_path_params_list(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.companies.contacts.with_raw_response.list( - "", + id="", ) diff --git a/tests/api_resources/companies/test_segments.py b/tests/api_resources/companies/test_segments.py index 5cedef70..d9b7fb69 100644 --- a/tests/api_resources/companies/test_segments.py +++ b/tests/api_resources/companies/test_segments.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.companies import CompanyAttachedSegments +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.companies import CompanyAttachedSegments base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestSegments: @parametrize def test_method_list(self, client: Intercom) -> None: segment = client.companies.segments.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(CompanyAttachedSegments, segment, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: segment = client.companies.segments.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(CompanyAttachedSegments, segment, path=["response"]) @@ -35,7 +35,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.companies.segments.with_raw_response.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.companies.segments.with_streaming_response.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_list(self, client: Intercom) -> None: def test_path_params_list(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.companies.segments.with_raw_response.list( - "", + id="", ) @@ -70,14 +70,14 @@ class TestAsyncSegments: @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: segment = await async_client.companies.segments.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(CompanyAttachedSegments, segment, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: segment = await async_client.companies.segments.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(CompanyAttachedSegments, segment, path=["response"]) @@ -85,7 +85,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.companies.segments.with_raw_response.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -96,7 +96,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.companies.segments.with_streaming_response.list( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,5 +110,5 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non async def test_path_params_list(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.companies.segments.with_raw_response.list( - "", + id="", ) diff --git a/tests/api_resources/contacts/test_companies.py b/tests/api_resources/contacts/test_companies.py index 8ae26936..71a0abab 100644 --- a/tests/api_resources/contacts/test_companies.py +++ b/tests/api_resources/contacts/test_companies.py @@ -8,9 +8,9 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Company -from python_minus_intercom.types.contacts import ContactAttachedCompanies +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Company +from python_intercom.types.contacts import ContactAttachedCompanies base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +21,7 @@ class TestCompanies: @parametrize def test_method_create(self, client: Intercom) -> None: company = client.contacts.companies.create( - "string", + contact_id="contact_id", company_id="6657add46abd0167d9419cd2", ) assert_matches_type(Company, company, path=["response"]) @@ -29,7 +29,7 @@ def test_method_create(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params(self, client: Intercom) -> None: company = client.contacts.companies.create( - "string", + contact_id="contact_id", company_id="6657add46abd0167d9419cd2", intercom_version="2.11", ) @@ -38,7 +38,7 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_create(self, client: Intercom) -> None: response = client.contacts.companies.with_raw_response.create( - "string", + contact_id="contact_id", company_id="6657add46abd0167d9419cd2", ) @@ -50,7 +50,7 @@ def test_raw_response_create(self, client: Intercom) -> None: @parametrize def test_streaming_response_create(self, client: Intercom) -> None: with client.contacts.companies.with_streaming_response.create( - "string", + contact_id="contact_id", company_id="6657add46abd0167d9419cd2", ) as response: assert not response.is_closed @@ -65,21 +65,21 @@ def test_streaming_response_create(self, client: Intercom) -> None: def test_path_params_create(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.companies.with_raw_response.create( - "", + contact_id="", company_id="6657add46abd0167d9419cd2", ) @parametrize def test_method_list(self, client: Intercom) -> None: company = client.contacts.companies.list( - "string", + contact_id="contact_id", ) assert_matches_type(ContactAttachedCompanies, company, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: company = client.contacts.companies.list( - "string", + contact_id="contact_id", intercom_version="2.11", ) assert_matches_type(ContactAttachedCompanies, company, path=["response"]) @@ -87,7 +87,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.contacts.companies.with_raw_response.list( - "string", + contact_id="contact_id", ) assert response.is_closed is True @@ -98,7 +98,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.contacts.companies.with_streaming_response.list( - "string", + contact_id="contact_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -112,13 +112,13 @@ def test_streaming_response_list(self, client: Intercom) -> None: def test_path_params_list(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.companies.with_raw_response.list( - "", + contact_id="", ) @parametrize def test_method_delete(self, client: Intercom) -> None: company = client.contacts.companies.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="58a430d35458202d41b1e65b", ) assert_matches_type(Company, company, path=["response"]) @@ -126,7 +126,7 @@ def test_method_delete(self, client: Intercom) -> None: @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: company = client.contacts.companies.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="58a430d35458202d41b1e65b", intercom_version="2.11", ) @@ -135,7 +135,7 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.contacts.companies.with_raw_response.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="58a430d35458202d41b1e65b", ) @@ -147,7 +147,7 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.contacts.companies.with_streaming_response.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="58a430d35458202d41b1e65b", ) as response: assert not response.is_closed @@ -162,13 +162,13 @@ def test_streaming_response_delete(self, client: Intercom) -> None: def test_path_params_delete(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.companies.with_raw_response.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.contacts.companies.with_raw_response.delete( - "", + id="", contact_id="58a430d35458202d41b1e65b", ) @@ -179,7 +179,7 @@ class TestAsyncCompanies: @parametrize async def test_method_create(self, async_client: AsyncIntercom) -> None: company = await async_client.contacts.companies.create( - "string", + contact_id="contact_id", company_id="6657add46abd0167d9419cd2", ) assert_matches_type(Company, company, path=["response"]) @@ -187,7 +187,7 @@ async def test_method_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.contacts.companies.create( - "string", + contact_id="contact_id", company_id="6657add46abd0167d9419cd2", intercom_version="2.11", ) @@ -196,7 +196,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.companies.with_raw_response.create( - "string", + contact_id="contact_id", company_id="6657add46abd0167d9419cd2", ) @@ -208,7 +208,7 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.companies.with_streaming_response.create( - "string", + contact_id="contact_id", company_id="6657add46abd0167d9419cd2", ) as response: assert not response.is_closed @@ -223,21 +223,21 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N async def test_path_params_create(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.companies.with_raw_response.create( - "", + contact_id="", company_id="6657add46abd0167d9419cd2", ) @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: company = await async_client.contacts.companies.list( - "string", + contact_id="contact_id", ) assert_matches_type(ContactAttachedCompanies, company, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.contacts.companies.list( - "string", + contact_id="contact_id", intercom_version="2.11", ) assert_matches_type(ContactAttachedCompanies, company, path=["response"]) @@ -245,7 +245,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.companies.with_raw_response.list( - "string", + contact_id="contact_id", ) assert response.is_closed is True @@ -256,7 +256,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.companies.with_streaming_response.list( - "string", + contact_id="contact_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -270,13 +270,13 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non async def test_path_params_list(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.companies.with_raw_response.list( - "", + contact_id="", ) @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: company = await async_client.contacts.companies.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="58a430d35458202d41b1e65b", ) assert_matches_type(Company, company, path=["response"]) @@ -284,7 +284,7 @@ async def test_method_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.contacts.companies.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="58a430d35458202d41b1e65b", intercom_version="2.11", ) @@ -293,7 +293,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.companies.with_raw_response.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="58a430d35458202d41b1e65b", ) @@ -305,7 +305,7 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.companies.with_streaming_response.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="58a430d35458202d41b1e65b", ) as response: assert not response.is_closed @@ -320,12 +320,12 @@ async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> N async def test_path_params_delete(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.companies.with_raw_response.delete( - "string", + id="58a430d35458202d41b1e65b", contact_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.contacts.companies.with_raw_response.delete( - "", + id="", contact_id="58a430d35458202d41b1e65b", ) diff --git a/tests/api_resources/contacts/test_notes.py b/tests/api_resources/contacts/test_notes.py index cf1467ad..e5d6aa8a 100644 --- a/tests/api_resources/contacts/test_notes.py +++ b/tests/api_resources/contacts/test_notes.py @@ -8,9 +8,9 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Note -from python_minus_intercom.types.contacts import NoteList +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Note +from python_intercom.types.contacts import NoteList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,7 +21,7 @@ class TestNotes: @parametrize def test_method_create(self, client: Intercom) -> None: note = client.contacts.notes.create( - 0, + id=0, body="Hello", ) assert_matches_type(Note, note, path=["response"]) @@ -29,9 +29,9 @@ def test_method_create(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params(self, client: Intercom) -> None: note = client.contacts.notes.create( - 0, + id=0, body="Hello", - admin_id="string", + admin_id="admin_id", contact_id="6657adde6abd0167d9419d00", intercom_version="2.11", ) @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_create(self, client: Intercom) -> None: response = client.contacts.notes.with_raw_response.create( - 0, + id=0, body="Hello", ) @@ -52,7 +52,7 @@ def test_raw_response_create(self, client: Intercom) -> None: @parametrize def test_streaming_response_create(self, client: Intercom) -> None: with client.contacts.notes.with_streaming_response.create( - 0, + id=0, body="Hello", ) as response: assert not response.is_closed @@ -66,14 +66,14 @@ def test_streaming_response_create(self, client: Intercom) -> None: @parametrize def test_method_list(self, client: Intercom) -> None: note = client.contacts.notes.list( - 0, + id=0, ) assert_matches_type(NoteList, note, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: note = client.contacts.notes.list( - 0, + id=0, intercom_version="2.11", ) assert_matches_type(NoteList, note, path=["response"]) @@ -81,7 +81,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.contacts.notes.with_raw_response.list( - 0, + id=0, ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.contacts.notes.with_streaming_response.list( - 0, + id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -109,7 +109,7 @@ class TestAsyncNotes: @parametrize async def test_method_create(self, async_client: AsyncIntercom) -> None: note = await async_client.contacts.notes.create( - 0, + id=0, body="Hello", ) assert_matches_type(Note, note, path=["response"]) @@ -117,9 +117,9 @@ async def test_method_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: note = await async_client.contacts.notes.create( - 0, + id=0, body="Hello", - admin_id="string", + admin_id="admin_id", contact_id="6657adde6abd0167d9419d00", intercom_version="2.11", ) @@ -128,7 +128,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.notes.with_raw_response.create( - 0, + id=0, body="Hello", ) @@ -140,7 +140,7 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.notes.with_streaming_response.create( - 0, + id=0, body="Hello", ) as response: assert not response.is_closed @@ -154,14 +154,14 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: note = await async_client.contacts.notes.list( - 0, + id=0, ) assert_matches_type(NoteList, note, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: note = await async_client.contacts.notes.list( - 0, + id=0, intercom_version="2.11", ) assert_matches_type(NoteList, note, path=["response"]) @@ -169,7 +169,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.notes.with_raw_response.list( - 0, + id=0, ) assert response.is_closed is True @@ -180,7 +180,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.notes.with_streaming_response.list( - 0, + id=0, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/contacts/test_segments.py b/tests/api_resources/contacts/test_segments.py index 867bf7c9..a5253616 100644 --- a/tests/api_resources/contacts/test_segments.py +++ b/tests/api_resources/contacts/test_segments.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.contacts import ContactSegments +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.contacts import ContactSegments base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestSegments: @parametrize def test_method_list(self, client: Intercom) -> None: segment = client.contacts.segments.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(ContactSegments, segment, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: segment = client.contacts.segments.list( - "string", + contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(ContactSegments, segment, path=["response"]) @@ -35,7 +35,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.contacts.segments.with_raw_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.contacts.segments.with_streaming_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_list(self, client: Intercom) -> None: def test_path_params_list(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.segments.with_raw_response.list( - "", + contact_id="", ) @@ -70,14 +70,14 @@ class TestAsyncSegments: @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: segment = await async_client.contacts.segments.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(ContactSegments, segment, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: segment = await async_client.contacts.segments.list( - "string", + contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(ContactSegments, segment, path=["response"]) @@ -85,7 +85,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.segments.with_raw_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -96,7 +96,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.segments.with_streaming_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,5 +110,5 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non async def test_path_params_list(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.segments.with_raw_response.list( - "", + contact_id="", ) diff --git a/tests/api_resources/contacts/test_subscriptions.py b/tests/api_resources/contacts/test_subscriptions.py index 80dd499d..d7d993e7 100644 --- a/tests/api_resources/contacts/test_subscriptions.py +++ b/tests/api_resources/contacts/test_subscriptions.py @@ -8,9 +8,9 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import SubscriptionTypeList -from python_minus_intercom.types.contacts import SubscriptionType +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import SubscriptionTypeList +from python_intercom.types.contacts import SubscriptionType base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,8 +21,8 @@ class TestSubscriptions: @parametrize def test_method_create(self, client: Intercom) -> None: subscription = client.contacts.subscriptions.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", consent_type="opt_in", ) assert_matches_type(SubscriptionType, subscription, path=["response"]) @@ -30,8 +30,8 @@ def test_method_create(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params(self, client: Intercom) -> None: subscription = client.contacts.subscriptions.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", consent_type="opt_in", intercom_version="2.11", ) @@ -40,8 +40,8 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_create(self, client: Intercom) -> None: response = client.contacts.subscriptions.with_raw_response.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", consent_type="opt_in", ) @@ -53,8 +53,8 @@ def test_raw_response_create(self, client: Intercom) -> None: @parametrize def test_streaming_response_create(self, client: Intercom) -> None: with client.contacts.subscriptions.with_streaming_response.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", consent_type="opt_in", ) as response: assert not response.is_closed @@ -69,22 +69,22 @@ def test_streaming_response_create(self, client: Intercom) -> None: def test_path_params_create(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.subscriptions.with_raw_response.create( - "", - id="string", + contact_id="", + id="id", consent_type="opt_in", ) @parametrize def test_method_list(self, client: Intercom) -> None: subscription = client.contacts.subscriptions.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(SubscriptionTypeList, subscription, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: subscription = client.contacts.subscriptions.list( - "string", + contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(SubscriptionTypeList, subscription, path=["response"]) @@ -92,7 +92,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.contacts.subscriptions.with_raw_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -103,7 +103,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.contacts.subscriptions.with_streaming_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -117,13 +117,13 @@ def test_streaming_response_list(self, client: Intercom) -> None: def test_path_params_list(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.subscriptions.with_raw_response.list( - "", + contact_id="", ) @parametrize def test_method_delete(self, client: Intercom) -> None: subscription = client.contacts.subscriptions.delete( - "string", + id="37846", contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(SubscriptionType, subscription, path=["response"]) @@ -131,7 +131,7 @@ def test_method_delete(self, client: Intercom) -> None: @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: subscription = client.contacts.subscriptions.delete( - "string", + id="37846", contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) @@ -140,7 +140,7 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.contacts.subscriptions.with_raw_response.delete( - "string", + id="37846", contact_id="63a07ddf05a32042dffac965", ) @@ -152,7 +152,7 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.contacts.subscriptions.with_streaming_response.delete( - "string", + id="37846", contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed @@ -167,13 +167,13 @@ def test_streaming_response_delete(self, client: Intercom) -> None: def test_path_params_delete(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.subscriptions.with_raw_response.delete( - "string", + id="37846", contact_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.contacts.subscriptions.with_raw_response.delete( - "", + id="", contact_id="63a07ddf05a32042dffac965", ) @@ -184,8 +184,8 @@ class TestAsyncSubscriptions: @parametrize async def test_method_create(self, async_client: AsyncIntercom) -> None: subscription = await async_client.contacts.subscriptions.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", consent_type="opt_in", ) assert_matches_type(SubscriptionType, subscription, path=["response"]) @@ -193,8 +193,8 @@ async def test_method_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: subscription = await async_client.contacts.subscriptions.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", consent_type="opt_in", intercom_version="2.11", ) @@ -203,8 +203,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.subscriptions.with_raw_response.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", consent_type="opt_in", ) @@ -216,8 +216,8 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.subscriptions.with_streaming_response.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", consent_type="opt_in", ) as response: assert not response.is_closed @@ -232,22 +232,22 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N async def test_path_params_create(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.subscriptions.with_raw_response.create( - "", - id="string", + contact_id="", + id="id", consent_type="opt_in", ) @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: subscription = await async_client.contacts.subscriptions.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(SubscriptionTypeList, subscription, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: subscription = await async_client.contacts.subscriptions.list( - "string", + contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(SubscriptionTypeList, subscription, path=["response"]) @@ -255,7 +255,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.subscriptions.with_raw_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -266,7 +266,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.subscriptions.with_streaming_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -280,13 +280,13 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non async def test_path_params_list(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.subscriptions.with_raw_response.list( - "", + contact_id="", ) @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: subscription = await async_client.contacts.subscriptions.delete( - "string", + id="37846", contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(SubscriptionType, subscription, path=["response"]) @@ -294,7 +294,7 @@ async def test_method_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: subscription = await async_client.contacts.subscriptions.delete( - "string", + id="37846", contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) @@ -303,7 +303,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.subscriptions.with_raw_response.delete( - "string", + id="37846", contact_id="63a07ddf05a32042dffac965", ) @@ -315,7 +315,7 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.subscriptions.with_streaming_response.delete( - "string", + id="37846", contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed @@ -330,12 +330,12 @@ async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> N async def test_path_params_delete(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.subscriptions.with_raw_response.delete( - "string", + id="37846", contact_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.contacts.subscriptions.with_raw_response.delete( - "", + id="", contact_id="63a07ddf05a32042dffac965", ) diff --git a/tests/api_resources/contacts/test_tags.py b/tests/api_resources/contacts/test_tags.py index 9e12f364..4c47717e 100644 --- a/tests/api_resources/contacts/test_tags.py +++ b/tests/api_resources/contacts/test_tags.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Tag, TagList +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Tag, TagList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,16 +20,16 @@ class TestTags: @parametrize def test_method_create(self, client: Intercom) -> None: tag = client.contacts.tags.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Intercom) -> None: tag = client.contacts.tags.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -37,8 +37,8 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_create(self, client: Intercom) -> None: response = client.contacts.tags.with_raw_response.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", ) assert response.is_closed is True @@ -49,8 +49,8 @@ def test_raw_response_create(self, client: Intercom) -> None: @parametrize def test_streaming_response_create(self, client: Intercom) -> None: with client.contacts.tags.with_streaming_response.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,21 +64,21 @@ def test_streaming_response_create(self, client: Intercom) -> None: def test_path_params_create(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.tags.with_raw_response.create( - "", - id="string", + contact_id="", + id="id", ) @parametrize def test_method_list(self, client: Intercom) -> None: tag = client.contacts.tags.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(TagList, tag, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: tag = client.contacts.tags.list( - "string", + contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(TagList, tag, path=["response"]) @@ -86,7 +86,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.contacts.tags.with_raw_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -97,7 +97,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.contacts.tags.with_streaming_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -111,13 +111,13 @@ def test_streaming_response_list(self, client: Intercom) -> None: def test_path_params_list(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.tags.with_raw_response.list( - "", + contact_id="", ) @parametrize def test_method_delete(self, client: Intercom) -> None: tag = client.contacts.tags.delete( - "string", + id="7522907", contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(Tag, tag, path=["response"]) @@ -125,7 +125,7 @@ def test_method_delete(self, client: Intercom) -> None: @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: tag = client.contacts.tags.delete( - "string", + id="7522907", contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) @@ -134,7 +134,7 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.contacts.tags.with_raw_response.delete( - "string", + id="7522907", contact_id="63a07ddf05a32042dffac965", ) @@ -146,7 +146,7 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.contacts.tags.with_streaming_response.delete( - "string", + id="7522907", contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed @@ -161,13 +161,13 @@ def test_streaming_response_delete(self, client: Intercom) -> None: def test_path_params_delete(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.contacts.tags.with_raw_response.delete( - "string", + id="7522907", contact_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.contacts.tags.with_raw_response.delete( - "", + id="", contact_id="63a07ddf05a32042dffac965", ) @@ -178,16 +178,16 @@ class TestAsyncTags: @parametrize async def test_method_create(self, async_client: AsyncIntercom) -> None: tag = await async_client.contacts.tags.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: tag = await async_client.contacts.tags.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -195,8 +195,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.tags.with_raw_response.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", ) assert response.is_closed is True @@ -207,8 +207,8 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.tags.with_streaming_response.create( - "string", - id="string", + contact_id="63a07ddf05a32042dffac965", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -222,21 +222,21 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N async def test_path_params_create(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.tags.with_raw_response.create( - "", - id="string", + contact_id="", + id="id", ) @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: tag = await async_client.contacts.tags.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(TagList, tag, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: tag = await async_client.contacts.tags.list( - "string", + contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(TagList, tag, path=["response"]) @@ -244,7 +244,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.tags.with_raw_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -255,7 +255,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.tags.with_streaming_response.list( - "string", + contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -269,13 +269,13 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non async def test_path_params_list(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.tags.with_raw_response.list( - "", + contact_id="", ) @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: tag = await async_client.contacts.tags.delete( - "string", + id="7522907", contact_id="63a07ddf05a32042dffac965", ) assert_matches_type(Tag, tag, path=["response"]) @@ -283,7 +283,7 @@ async def test_method_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: tag = await async_client.contacts.tags.delete( - "string", + id="7522907", contact_id="63a07ddf05a32042dffac965", intercom_version="2.11", ) @@ -292,7 +292,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.tags.with_raw_response.delete( - "string", + id="7522907", contact_id="63a07ddf05a32042dffac965", ) @@ -304,7 +304,7 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.tags.with_streaming_response.delete( - "string", + id="7522907", contact_id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed @@ -319,12 +319,12 @@ async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> N async def test_path_params_delete(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.contacts.tags.with_raw_response.delete( - "string", + id="7522907", contact_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.contacts.tags.with_raw_response.delete( - "", + id="", contact_id="63a07ddf05a32042dffac965", ) diff --git a/tests/api_resources/conversations/test_customers.py b/tests/api_resources/conversations/test_customers.py index 21616c46..44d1db40 100644 --- a/tests/api_resources/conversations/test_customers.py +++ b/tests/api_resources/conversations/test_customers.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Conversation +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Conversation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,15 +20,15 @@ class TestCustomers: @parametrize def test_method_create(self, client: Intercom) -> None: customer = client.conversations.customers.create( - "string", + id="123", ) assert_matches_type(Conversation, customer, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Intercom) -> None: customer = client.conversations.customers.create( - "string", - admin_id="string", + id="123", + admin_id="admin_id", customer={ "intercom_user_id": "6657ae626abd0167d9419d6f", "customer": {"intercom_user_id": "6329bd9ffe4e2e91dac76188"}, @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_create(self, client: Intercom) -> None: response = client.conversations.customers.with_raw_response.create( - "string", + id="123", ) assert response.is_closed is True @@ -51,7 +51,7 @@ def test_raw_response_create(self, client: Intercom) -> None: @parametrize def test_streaming_response_create(self, client: Intercom) -> None: with client.conversations.customers.with_streaming_response.create( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,24 +65,24 @@ def test_streaming_response_create(self, client: Intercom) -> None: def test_path_params_create(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.customers.with_raw_response.create( - "", + id="", ) @parametrize def test_method_delete(self, client: Intercom) -> None: customer = client.conversations.customers.delete( - "string", + contact_id="123", conversation_id="123", - admin_id="string", + admin_id="admin_id", ) assert_matches_type(Conversation, customer, path=["response"]) @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: customer = client.conversations.customers.delete( - "string", + contact_id="123", conversation_id="123", - admin_id="string", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Conversation, customer, path=["response"]) @@ -90,9 +90,9 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.conversations.customers.with_raw_response.delete( - "string", + contact_id="123", conversation_id="123", - admin_id="string", + admin_id="admin_id", ) assert response.is_closed is True @@ -103,9 +103,9 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.conversations.customers.with_streaming_response.delete( - "string", + contact_id="123", conversation_id="123", - admin_id="string", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -119,16 +119,16 @@ def test_streaming_response_delete(self, client: Intercom) -> None: def test_path_params_delete(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `conversation_id` but received ''"): client.conversations.customers.with_raw_response.delete( - "string", + contact_id="123", conversation_id="", - admin_id="string", + admin_id="admin_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): client.conversations.customers.with_raw_response.delete( - "", + contact_id="", conversation_id="123", - admin_id="string", + admin_id="admin_id", ) @@ -138,15 +138,15 @@ class TestAsyncCustomers: @parametrize async def test_method_create(self, async_client: AsyncIntercom) -> None: customer = await async_client.conversations.customers.create( - "string", + id="123", ) assert_matches_type(Conversation, customer, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: customer = await async_client.conversations.customers.create( - "string", - admin_id="string", + id="123", + admin_id="admin_id", customer={ "intercom_user_id": "6657ae626abd0167d9419d6f", "customer": {"intercom_user_id": "6329bd9ffe4e2e91dac76188"}, @@ -158,7 +158,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.customers.with_raw_response.create( - "string", + id="123", ) assert response.is_closed is True @@ -169,7 +169,7 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.customers.with_streaming_response.create( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -183,24 +183,24 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N async def test_path_params_create(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.customers.with_raw_response.create( - "", + id="", ) @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: customer = await async_client.conversations.customers.delete( - "string", + contact_id="123", conversation_id="123", - admin_id="string", + admin_id="admin_id", ) assert_matches_type(Conversation, customer, path=["response"]) @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: customer = await async_client.conversations.customers.delete( - "string", + contact_id="123", conversation_id="123", - admin_id="string", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Conversation, customer, path=["response"]) @@ -208,9 +208,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.customers.with_raw_response.delete( - "string", + contact_id="123", conversation_id="123", - admin_id="string", + admin_id="admin_id", ) assert response.is_closed is True @@ -221,9 +221,9 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.customers.with_streaming_response.delete( - "string", + contact_id="123", conversation_id="123", - admin_id="string", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -237,14 +237,14 @@ async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> N async def test_path_params_delete(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `conversation_id` but received ''"): await async_client.conversations.customers.with_raw_response.delete( - "string", + contact_id="123", conversation_id="", - admin_id="string", + admin_id="admin_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `contact_id` but received ''"): await async_client.conversations.customers.with_raw_response.delete( - "", + contact_id="", conversation_id="123", - admin_id="string", + admin_id="admin_id", ) diff --git a/tests/api_resources/conversations/test_parts.py b/tests/api_resources/conversations/test_parts.py index 36b92810..b8dfc2b4 100644 --- a/tests/api_resources/conversations/test_parts.py +++ b/tests/api_resources/conversations/test_parts.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Conversation +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Conversation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +20,7 @@ class TestParts: @parametrize def test_method_create_overload_1(self, client: Intercom) -> None: part = client.conversations.parts.create( - "string", + id="123", admin_id="12345", message_type="close", type="admin", @@ -30,7 +30,7 @@ def test_method_create_overload_1(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params_overload_1(self, client: Intercom) -> None: part = client.conversations.parts.create( - "string", + id="123", admin_id="12345", message_type="close", type="admin", @@ -42,7 +42,7 @@ def test_method_create_with_all_params_overload_1(self, client: Intercom) -> Non @parametrize def test_raw_response_create_overload_1(self, client: Intercom) -> None: response = client.conversations.parts.with_raw_response.create( - "string", + id="123", admin_id="12345", message_type="close", type="admin", @@ -56,7 +56,7 @@ def test_raw_response_create_overload_1(self, client: Intercom) -> None: @parametrize def test_streaming_response_create_overload_1(self, client: Intercom) -> None: with client.conversations.parts.with_streaming_response.create( - "string", + id="123", admin_id="12345", message_type="close", type="admin", @@ -73,7 +73,7 @@ def test_streaming_response_create_overload_1(self, client: Intercom) -> None: def test_path_params_create_overload_1(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.parts.with_raw_response.create( - "", + id="", admin_id="12345", message_type="close", type="admin", @@ -82,7 +82,7 @@ def test_path_params_create_overload_1(self, client: Intercom) -> None: @parametrize def test_method_create_overload_2(self, client: Intercom) -> None: part = client.conversations.parts.create( - "string", + id="123", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -92,7 +92,7 @@ def test_method_create_overload_2(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params_overload_2(self, client: Intercom) -> None: part = client.conversations.parts.create( - "string", + id="123", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -103,7 +103,7 @@ def test_method_create_with_all_params_overload_2(self, client: Intercom) -> Non @parametrize def test_raw_response_create_overload_2(self, client: Intercom) -> None: response = client.conversations.parts.with_raw_response.create( - "string", + id="123", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -117,7 +117,7 @@ def test_raw_response_create_overload_2(self, client: Intercom) -> None: @parametrize def test_streaming_response_create_overload_2(self, client: Intercom) -> None: with client.conversations.parts.with_streaming_response.create( - "string", + id="123", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -134,7 +134,7 @@ def test_streaming_response_create_overload_2(self, client: Intercom) -> None: def test_path_params_create_overload_2(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.parts.with_raw_response.create( - "", + id="", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -143,7 +143,7 @@ def test_path_params_create_overload_2(self, client: Intercom) -> None: @parametrize def test_method_create_overload_3(self, client: Intercom) -> None: part = client.conversations.parts.create( - "string", + id="123", admin_id="5017690", message_type="open", ) @@ -152,7 +152,7 @@ def test_method_create_overload_3(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params_overload_3(self, client: Intercom) -> None: part = client.conversations.parts.create( - "string", + id="123", admin_id="5017690", message_type="open", intercom_version="2.11", @@ -162,7 +162,7 @@ def test_method_create_with_all_params_overload_3(self, client: Intercom) -> Non @parametrize def test_raw_response_create_overload_3(self, client: Intercom) -> None: response = client.conversations.parts.with_raw_response.create( - "string", + id="123", admin_id="5017690", message_type="open", ) @@ -175,7 +175,7 @@ def test_raw_response_create_overload_3(self, client: Intercom) -> None: @parametrize def test_streaming_response_create_overload_3(self, client: Intercom) -> None: with client.conversations.parts.with_streaming_response.create( - "string", + id="123", admin_id="5017690", message_type="open", ) as response: @@ -191,7 +191,7 @@ def test_streaming_response_create_overload_3(self, client: Intercom) -> None: def test_path_params_create_overload_3(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.parts.with_raw_response.create( - "", + id="", admin_id="5017690", message_type="open", ) @@ -199,7 +199,7 @@ def test_path_params_create_overload_3(self, client: Intercom) -> None: @parametrize def test_method_create_overload_4(self, client: Intercom) -> None: part = client.conversations.parts.create( - "string", + id="123", admin_id="12345", assignee_id="4324241", message_type="assignment", @@ -210,7 +210,7 @@ def test_method_create_overload_4(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params_overload_4(self, client: Intercom) -> None: part = client.conversations.parts.create( - "string", + id="123", admin_id="12345", assignee_id="4324241", message_type="assignment", @@ -223,7 +223,7 @@ def test_method_create_with_all_params_overload_4(self, client: Intercom) -> Non @parametrize def test_raw_response_create_overload_4(self, client: Intercom) -> None: response = client.conversations.parts.with_raw_response.create( - "string", + id="123", admin_id="12345", assignee_id="4324241", message_type="assignment", @@ -238,7 +238,7 @@ def test_raw_response_create_overload_4(self, client: Intercom) -> None: @parametrize def test_streaming_response_create_overload_4(self, client: Intercom) -> None: with client.conversations.parts.with_streaming_response.create( - "string", + id="123", admin_id="12345", assignee_id="4324241", message_type="assignment", @@ -256,7 +256,7 @@ def test_streaming_response_create_overload_4(self, client: Intercom) -> None: def test_path_params_create_overload_4(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.parts.with_raw_response.create( - "", + id="", admin_id="12345", assignee_id="4324241", message_type="assignment", @@ -270,7 +270,7 @@ class TestAsyncParts: @parametrize async def test_method_create_overload_1(self, async_client: AsyncIntercom) -> None: part = await async_client.conversations.parts.create( - "string", + id="123", admin_id="12345", message_type="close", type="admin", @@ -280,7 +280,7 @@ async def test_method_create_overload_1(self, async_client: AsyncIntercom) -> No @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncIntercom) -> None: part = await async_client.conversations.parts.create( - "string", + id="123", admin_id="12345", message_type="close", type="admin", @@ -292,7 +292,7 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.parts.with_raw_response.create( - "string", + id="123", admin_id="12345", message_type="close", type="admin", @@ -306,7 +306,7 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.parts.with_streaming_response.create( - "string", + id="123", admin_id="12345", message_type="close", type="admin", @@ -323,7 +323,7 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncInt async def test_path_params_create_overload_1(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.parts.with_raw_response.create( - "", + id="", admin_id="12345", message_type="close", type="admin", @@ -332,7 +332,7 @@ async def test_path_params_create_overload_1(self, async_client: AsyncIntercom) @parametrize async def test_method_create_overload_2(self, async_client: AsyncIntercom) -> None: part = await async_client.conversations.parts.create( - "string", + id="123", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -342,7 +342,7 @@ async def test_method_create_overload_2(self, async_client: AsyncIntercom) -> No @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncIntercom) -> None: part = await async_client.conversations.parts.create( - "string", + id="123", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -353,7 +353,7 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.parts.with_raw_response.create( - "string", + id="123", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -367,7 +367,7 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.parts.with_streaming_response.create( - "string", + id="123", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -384,7 +384,7 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncInt async def test_path_params_create_overload_2(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.parts.with_raw_response.create( - "", + id="", admin_id="5017691", message_type="snoozed", snoozed_until=1673609604, @@ -393,7 +393,7 @@ async def test_path_params_create_overload_2(self, async_client: AsyncIntercom) @parametrize async def test_method_create_overload_3(self, async_client: AsyncIntercom) -> None: part = await async_client.conversations.parts.create( - "string", + id="123", admin_id="5017690", message_type="open", ) @@ -402,7 +402,7 @@ async def test_method_create_overload_3(self, async_client: AsyncIntercom) -> No @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncIntercom) -> None: part = await async_client.conversations.parts.create( - "string", + id="123", admin_id="5017690", message_type="open", intercom_version="2.11", @@ -412,7 +412,7 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.parts.with_raw_response.create( - "string", + id="123", admin_id="5017690", message_type="open", ) @@ -425,7 +425,7 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.parts.with_streaming_response.create( - "string", + id="123", admin_id="5017690", message_type="open", ) as response: @@ -441,7 +441,7 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncInt async def test_path_params_create_overload_3(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.parts.with_raw_response.create( - "", + id="", admin_id="5017690", message_type="open", ) @@ -449,7 +449,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncIntercom) @parametrize async def test_method_create_overload_4(self, async_client: AsyncIntercom) -> None: part = await async_client.conversations.parts.create( - "string", + id="123", admin_id="12345", assignee_id="4324241", message_type="assignment", @@ -460,7 +460,7 @@ async def test_method_create_overload_4(self, async_client: AsyncIntercom) -> No @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncIntercom) -> None: part = await async_client.conversations.parts.create( - "string", + id="123", admin_id="12345", assignee_id="4324241", message_type="assignment", @@ -473,7 +473,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.parts.with_raw_response.create( - "string", + id="123", admin_id="12345", assignee_id="4324241", message_type="assignment", @@ -488,7 +488,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.parts.with_streaming_response.create( - "string", + id="123", admin_id="12345", assignee_id="4324241", message_type="assignment", @@ -506,7 +506,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncInt async def test_path_params_create_overload_4(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.parts.with_raw_response.create( - "", + id="", admin_id="12345", assignee_id="4324241", message_type="assignment", diff --git a/tests/api_resources/conversations/test_reply.py b/tests/api_resources/conversations/test_reply.py index dd85ff2d..ff170db6 100644 --- a/tests/api_resources/conversations/test_reply.py +++ b/tests/api_resources/conversations/test_reply.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Conversation +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Conversation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,8 +20,8 @@ class TestReply: @parametrize def test_method_create_overload_1(self, client: Intercom) -> None: reply = client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -30,8 +30,8 @@ def test_method_create_overload_1(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params_overload_1(self, client: Intercom) -> None: reply = client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -43,8 +43,8 @@ def test_method_create_with_all_params_overload_1(self, client: Intercom) -> Non @parametrize def test_raw_response_create_overload_1(self, client: Intercom) -> None: response = client.conversations.reply.with_raw_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -57,8 +57,8 @@ def test_raw_response_create_overload_1(self, client: Intercom) -> None: @parametrize def test_streaming_response_create_overload_1(self, client: Intercom) -> None: with client.conversations.reply.with_streaming_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) as response: @@ -74,8 +74,8 @@ def test_streaming_response_create_overload_1(self, client: Intercom) -> None: def test_path_params_create_overload_1(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.reply.with_raw_response.create( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -83,8 +83,8 @@ def test_path_params_create_overload_1(self, client: Intercom) -> None: @parametrize def test_method_create_overload_2(self, client: Intercom) -> None: reply = client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -93,8 +93,8 @@ def test_method_create_overload_2(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params_overload_2(self, client: Intercom) -> None: reply = client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -106,8 +106,8 @@ def test_method_create_with_all_params_overload_2(self, client: Intercom) -> Non @parametrize def test_raw_response_create_overload_2(self, client: Intercom) -> None: response = client.conversations.reply.with_raw_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -120,8 +120,8 @@ def test_raw_response_create_overload_2(self, client: Intercom) -> None: @parametrize def test_streaming_response_create_overload_2(self, client: Intercom) -> None: with client.conversations.reply.with_streaming_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) as response: @@ -137,8 +137,8 @@ def test_streaming_response_create_overload_2(self, client: Intercom) -> None: def test_path_params_create_overload_2(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.reply.with_raw_response.create( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -146,8 +146,8 @@ def test_path_params_create_overload_2(self, client: Intercom) -> None: @parametrize def test_method_create_overload_3(self, client: Intercom) -> None: reply = client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -156,8 +156,8 @@ def test_method_create_overload_3(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params_overload_3(self, client: Intercom) -> None: reply = client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -169,8 +169,8 @@ def test_method_create_with_all_params_overload_3(self, client: Intercom) -> Non @parametrize def test_raw_response_create_overload_3(self, client: Intercom) -> None: response = client.conversations.reply.with_raw_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -183,8 +183,8 @@ def test_raw_response_create_overload_3(self, client: Intercom) -> None: @parametrize def test_streaming_response_create_overload_3(self, client: Intercom) -> None: with client.conversations.reply.with_streaming_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) as response: @@ -200,8 +200,8 @@ def test_streaming_response_create_overload_3(self, client: Intercom) -> None: def test_path_params_create_overload_3(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.reply.with_raw_response.create( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -209,7 +209,7 @@ def test_path_params_create_overload_3(self, client: Intercom) -> None: @parametrize def test_method_create_overload_4(self, client: Intercom) -> None: reply = client.conversations.reply.create( - "string", + id='123 or "last"', admin_id="3156780", message_type="comment", type="admin", @@ -219,7 +219,7 @@ def test_method_create_overload_4(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params_overload_4(self, client: Intercom) -> None: reply = client.conversations.reply.create( - "string", + id='123 or "last"', admin_id="3156780", message_type="comment", type="admin", @@ -250,7 +250,7 @@ def test_method_create_with_all_params_overload_4(self, client: Intercom) -> Non @parametrize def test_raw_response_create_overload_4(self, client: Intercom) -> None: response = client.conversations.reply.with_raw_response.create( - "string", + id='123 or "last"', admin_id="3156780", message_type="comment", type="admin", @@ -264,7 +264,7 @@ def test_raw_response_create_overload_4(self, client: Intercom) -> None: @parametrize def test_streaming_response_create_overload_4(self, client: Intercom) -> None: with client.conversations.reply.with_streaming_response.create( - "string", + id='123 or "last"', admin_id="3156780", message_type="comment", type="admin", @@ -281,7 +281,7 @@ def test_streaming_response_create_overload_4(self, client: Intercom) -> None: def test_path_params_create_overload_4(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.reply.with_raw_response.create( - "", + id="", admin_id="3156780", message_type="comment", type="admin", @@ -294,8 +294,8 @@ class TestAsyncReply: @parametrize async def test_method_create_overload_1(self, async_client: AsyncIntercom) -> None: reply = await async_client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -304,8 +304,8 @@ async def test_method_create_overload_1(self, async_client: AsyncIntercom) -> No @parametrize async def test_method_create_with_all_params_overload_1(self, async_client: AsyncIntercom) -> None: reply = await async_client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -317,8 +317,8 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_1(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.reply.with_raw_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -331,8 +331,8 @@ async def test_raw_response_create_overload_1(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_create_overload_1(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.reply.with_streaming_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) as response: @@ -348,8 +348,8 @@ async def test_streaming_response_create_overload_1(self, async_client: AsyncInt async def test_path_params_create_overload_1(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.reply.with_raw_response.create( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -357,8 +357,8 @@ async def test_path_params_create_overload_1(self, async_client: AsyncIntercom) @parametrize async def test_method_create_overload_2(self, async_client: AsyncIntercom) -> None: reply = await async_client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -367,8 +367,8 @@ async def test_method_create_overload_2(self, async_client: AsyncIntercom) -> No @parametrize async def test_method_create_with_all_params_overload_2(self, async_client: AsyncIntercom) -> None: reply = await async_client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -380,8 +380,8 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_2(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.reply.with_raw_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -394,8 +394,8 @@ async def test_raw_response_create_overload_2(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_create_overload_2(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.reply.with_streaming_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) as response: @@ -411,8 +411,8 @@ async def test_streaming_response_create_overload_2(self, async_client: AsyncInt async def test_path_params_create_overload_2(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.reply.with_raw_response.create( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -420,8 +420,8 @@ async def test_path_params_create_overload_2(self, async_client: AsyncIntercom) @parametrize async def test_method_create_overload_3(self, async_client: AsyncIntercom) -> None: reply = await async_client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -430,8 +430,8 @@ async def test_method_create_overload_3(self, async_client: AsyncIntercom) -> No @parametrize async def test_method_create_with_all_params_overload_3(self, async_client: AsyncIntercom) -> None: reply = await async_client.conversations.reply.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -443,8 +443,8 @@ async def test_method_create_with_all_params_overload_3(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_3(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.reply.with_raw_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) @@ -457,8 +457,8 @@ async def test_raw_response_create_overload_3(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_create_overload_3(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.reply.with_streaming_response.create( - "string", - body="string", + id='123 or "last"', + body="body", message_type="comment", type="user", ) as response: @@ -474,8 +474,8 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncInt async def test_path_params_create_overload_3(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.reply.with_raw_response.create( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -483,7 +483,7 @@ async def test_path_params_create_overload_3(self, async_client: AsyncIntercom) @parametrize async def test_method_create_overload_4(self, async_client: AsyncIntercom) -> None: reply = await async_client.conversations.reply.create( - "string", + id='123 or "last"', admin_id="3156780", message_type="comment", type="admin", @@ -493,7 +493,7 @@ async def test_method_create_overload_4(self, async_client: AsyncIntercom) -> No @parametrize async def test_method_create_with_all_params_overload_4(self, async_client: AsyncIntercom) -> None: reply = await async_client.conversations.reply.create( - "string", + id='123 or "last"', admin_id="3156780", message_type="comment", type="admin", @@ -524,7 +524,7 @@ async def test_method_create_with_all_params_overload_4(self, async_client: Asyn @parametrize async def test_raw_response_create_overload_4(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.reply.with_raw_response.create( - "string", + id='123 or "last"', admin_id="3156780", message_type="comment", type="admin", @@ -538,7 +538,7 @@ async def test_raw_response_create_overload_4(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_create_overload_4(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.reply.with_streaming_response.create( - "string", + id='123 or "last"', admin_id="3156780", message_type="comment", type="admin", @@ -555,7 +555,7 @@ async def test_streaming_response_create_overload_4(self, async_client: AsyncInt async def test_path_params_create_overload_4(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.reply.with_raw_response.create( - "", + id="", admin_id="3156780", message_type="comment", type="admin", diff --git a/tests/api_resources/conversations/test_run_assignment_rules.py b/tests/api_resources/conversations/test_run_assignment_rules.py index f7624b6b..fd397786 100644 --- a/tests/api_resources/conversations/test_run_assignment_rules.py +++ b/tests/api_resources/conversations/test_run_assignment_rules.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Conversation +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Conversation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestRunAssignmentRules: @parametrize def test_method_create(self, client: Intercom) -> None: run_assignment_rule = client.conversations.run_assignment_rules.create( - "string", + id="123", ) assert_matches_type(Conversation, run_assignment_rule, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Intercom) -> None: run_assignment_rule = client.conversations.run_assignment_rules.create( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Conversation, run_assignment_rule, path=["response"]) @@ -35,7 +35,7 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_create(self, client: Intercom) -> None: response = client.conversations.run_assignment_rules.with_raw_response.create( - "string", + id="123", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_create(self, client: Intercom) -> None: @parametrize def test_streaming_response_create(self, client: Intercom) -> None: with client.conversations.run_assignment_rules.with_streaming_response.create( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_create(self, client: Intercom) -> None: def test_path_params_create(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.run_assignment_rules.with_raw_response.create( - "", + id="", ) @@ -70,14 +70,14 @@ class TestAsyncRunAssignmentRules: @parametrize async def test_method_create(self, async_client: AsyncIntercom) -> None: run_assignment_rule = await async_client.conversations.run_assignment_rules.create( - "string", + id="123", ) assert_matches_type(Conversation, run_assignment_rule, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: run_assignment_rule = await async_client.conversations.run_assignment_rules.create( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Conversation, run_assignment_rule, path=["response"]) @@ -85,7 +85,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.run_assignment_rules.with_raw_response.create( - "string", + id="123", ) assert response.is_closed is True @@ -96,7 +96,7 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.run_assignment_rules.with_streaming_response.create( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,5 +110,5 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N async def test_path_params_create(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.run_assignment_rules.with_raw_response.create( - "", + id="", ) diff --git a/tests/api_resources/conversations/test_tags.py b/tests/api_resources/conversations/test_tags.py index 081cf2a2..dbfae1f0 100644 --- a/tests/api_resources/conversations/test_tags.py +++ b/tests/api_resources/conversations/test_tags.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Tag +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Tag base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,18 +20,18 @@ class TestTags: @parametrize def test_method_create(self, client: Intercom) -> None: tag = client.conversations.tags.create( - "string", - id="string", - admin_id="string", + conversation_id="64619700005694", + id="id", + admin_id="admin_id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Intercom) -> None: tag = client.conversations.tags.create( - "string", - id="string", - admin_id="string", + conversation_id="64619700005694", + id="id", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -39,9 +39,9 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_create(self, client: Intercom) -> None: response = client.conversations.tags.with_raw_response.create( - "string", - id="string", - admin_id="string", + conversation_id="64619700005694", + id="id", + admin_id="admin_id", ) assert response.is_closed is True @@ -52,9 +52,9 @@ def test_raw_response_create(self, client: Intercom) -> None: @parametrize def test_streaming_response_create(self, client: Intercom) -> None: with client.conversations.tags.with_streaming_response.create( - "string", - id="string", - admin_id="string", + conversation_id="64619700005694", + id="id", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,26 +68,26 @@ def test_streaming_response_create(self, client: Intercom) -> None: def test_path_params_create(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `conversation_id` but received ''"): client.conversations.tags.with_raw_response.create( - "", - id="string", - admin_id="string", + conversation_id="", + id="id", + admin_id="admin_id", ) @parametrize def test_method_delete(self, client: Intercom) -> None: tag = client.conversations.tags.delete( - "string", + id="7522907", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: tag = client.conversations.tags.delete( - "string", + id="7522907", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -95,9 +95,9 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.conversations.tags.with_raw_response.delete( - "string", + id="7522907", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) assert response.is_closed is True @@ -108,9 +108,9 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.conversations.tags.with_streaming_response.delete( - "string", + id="7522907", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -124,16 +124,16 @@ def test_streaming_response_delete(self, client: Intercom) -> None: def test_path_params_delete(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `conversation_id` but received ''"): client.conversations.tags.with_raw_response.delete( - "string", + id="7522907", conversation_id="", - admin_id="string", + admin_id="admin_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.conversations.tags.with_raw_response.delete( - "", + id="", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) @@ -143,18 +143,18 @@ class TestAsyncTags: @parametrize async def test_method_create(self, async_client: AsyncIntercom) -> None: tag = await async_client.conversations.tags.create( - "string", - id="string", - admin_id="string", + conversation_id="64619700005694", + id="id", + admin_id="admin_id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: tag = await async_client.conversations.tags.create( - "string", - id="string", - admin_id="string", + conversation_id="64619700005694", + id="id", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -162,9 +162,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.tags.with_raw_response.create( - "string", - id="string", - admin_id="string", + conversation_id="64619700005694", + id="id", + admin_id="admin_id", ) assert response.is_closed is True @@ -175,9 +175,9 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.tags.with_streaming_response.create( - "string", - id="string", - admin_id="string", + conversation_id="64619700005694", + id="id", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -191,26 +191,26 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N async def test_path_params_create(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `conversation_id` but received ''"): await async_client.conversations.tags.with_raw_response.create( - "", - id="string", - admin_id="string", + conversation_id="", + id="id", + admin_id="admin_id", ) @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: tag = await async_client.conversations.tags.delete( - "string", + id="7522907", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: tag = await async_client.conversations.tags.delete( - "string", + id="7522907", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -218,9 +218,9 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.tags.with_raw_response.delete( - "string", + id="7522907", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) assert response.is_closed is True @@ -231,9 +231,9 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.tags.with_streaming_response.delete( - "string", + id="7522907", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -247,14 +247,14 @@ async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> N async def test_path_params_delete(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `conversation_id` but received ''"): await async_client.conversations.tags.with_raw_response.delete( - "string", + id="7522907", conversation_id="", - admin_id="string", + admin_id="admin_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.conversations.tags.with_raw_response.delete( - "", + id="", conversation_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) diff --git a/tests/api_resources/download/content/test_data.py b/tests/api_resources/download/content/test_data.py index c9a58987..afd3e4dd 100644 --- a/tests/api_resources/download/content/test_data.py +++ b/tests/api_resources/download/content/test_data.py @@ -7,7 +7,7 @@ import pytest -from python_minus_intercom import Intercom, AsyncIntercom +from python_intercom import Intercom, AsyncIntercom base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,14 +18,14 @@ class TestData: @parametrize def test_method_retrieve(self, client: Intercom) -> None: data = client.download.content.data.retrieve( - "string", + job_identifier="job_identifier", ) assert data is None @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: data = client.download.content.data.retrieve( - "string", + job_identifier="job_identifier", intercom_version="2.11", ) assert data is None @@ -33,7 +33,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.download.content.data.with_raw_response.retrieve( - "string", + job_identifier="job_identifier", ) assert response.is_closed is True @@ -44,7 +44,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.download.content.data.with_streaming_response.retrieve( - "string", + job_identifier="job_identifier", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -58,7 +58,7 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: def test_path_params_retrieve(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_identifier` but received ''"): client.download.content.data.with_raw_response.retrieve( - "", + job_identifier="", ) @@ -68,14 +68,14 @@ class TestAsyncData: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: data = await async_client.download.content.data.retrieve( - "string", + job_identifier="job_identifier", ) assert data is None @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: data = await async_client.download.content.data.retrieve( - "string", + job_identifier="job_identifier", intercom_version="2.11", ) assert data is None @@ -83,7 +83,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.download.content.data.with_raw_response.retrieve( - "string", + job_identifier="job_identifier", ) assert response.is_closed is True @@ -94,7 +94,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.download.content.data.with_streaming_response.retrieve( - "string", + job_identifier="job_identifier", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -108,5 +108,5 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_identifier` but received ''"): await async_client.download.content.data.with_raw_response.retrieve( - "", + job_identifier="", ) diff --git a/tests/api_resources/export/content/test_data.py b/tests/api_resources/export/content/test_data.py index cf406d91..4d024e89 100644 --- a/tests/api_resources/export/content/test_data.py +++ b/tests/api_resources/export/content/test_data.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import DataExport +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import DataExport base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestData: @parametrize def test_method_retrieve(self, client: Intercom) -> None: data = client.export.content.data.retrieve( - "string", + job_identifier="job_identifier", ) assert_matches_type(DataExport, data, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: data = client.export.content.data.retrieve( - "string", + job_identifier="job_identifier", intercom_version="2.11", ) assert_matches_type(DataExport, data, path=["response"]) @@ -35,7 +35,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.export.content.data.with_raw_response.retrieve( - "string", + job_identifier="job_identifier", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.export.content.data.with_streaming_response.retrieve( - "string", + job_identifier="job_identifier", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: def test_path_params_retrieve(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_identifier` but received ''"): client.export.content.data.with_raw_response.retrieve( - "", + job_identifier="", ) @@ -70,14 +70,14 @@ class TestAsyncData: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: data = await async_client.export.content.data.retrieve( - "string", + job_identifier="job_identifier", ) assert_matches_type(DataExport, data, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: data = await async_client.export.content.data.retrieve( - "string", + job_identifier="job_identifier", intercom_version="2.11", ) assert_matches_type(DataExport, data, path=["response"]) @@ -85,7 +85,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.export.content.data.with_raw_response.retrieve( - "string", + job_identifier="job_identifier", ) assert response.is_closed is True @@ -96,7 +96,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.export.content.data.with_streaming_response.retrieve( - "string", + job_identifier="job_identifier", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,5 +110,5 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_identifier` but received ''"): await async_client.export.content.data.with_raw_response.retrieve( - "", + job_identifier="", ) diff --git a/tests/api_resources/help_center/test_collections.py b/tests/api_resources/help_center/test_collections.py index e1ebbce9..4723e467 100644 --- a/tests/api_resources/help_center/test_collections.py +++ b/tests/api_resources/help_center/test_collections.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.help_center import ( +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.help_center import ( Collection, CollectionList, DeletedCollection, @@ -254,14 +254,14 @@ def test_streaming_response_create(self, client: Intercom) -> None: @parametrize def test_method_retrieve(self, client: Intercom) -> None: collection = client.help_center.collections.retrieve( - 0, + id=123, ) assert_matches_type(Collection, collection, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: collection = client.help_center.collections.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(Collection, collection, path=["response"]) @@ -269,7 +269,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.help_center.collections.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -280,7 +280,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.help_center.collections.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -293,14 +293,14 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: @parametrize def test_method_update(self, client: Intercom) -> None: collection = client.help_center.collections.update( - 0, + id=123, ) assert_matches_type(Collection, collection, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Intercom) -> None: collection = client.help_center.collections.update( - 0, + id=123, description="English description", name="Update collection name", parent_id="6871118", @@ -499,7 +499,7 @@ def test_method_update_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update(self, client: Intercom) -> None: response = client.help_center.collections.with_raw_response.update( - 0, + id=123, ) assert response.is_closed is True @@ -510,7 +510,7 @@ def test_raw_response_update(self, client: Intercom) -> None: @parametrize def test_streaming_response_update(self, client: Intercom) -> None: with client.help_center.collections.with_streaming_response.update( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -555,14 +555,14 @@ def test_streaming_response_list(self, client: Intercom) -> None: @parametrize def test_method_delete(self, client: Intercom) -> None: collection = client.help_center.collections.delete( - 0, + id=123, ) assert_matches_type(DeletedCollection, collection, path=["response"]) @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: collection = client.help_center.collections.delete( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(DeletedCollection, collection, path=["response"]) @@ -570,7 +570,7 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.help_center.collections.with_raw_response.delete( - 0, + id=123, ) assert response.is_closed is True @@ -581,7 +581,7 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.help_center.collections.with_streaming_response.delete( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -828,14 +828,14 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: collection = await async_client.help_center.collections.retrieve( - 0, + id=123, ) assert_matches_type(Collection, collection, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: collection = await async_client.help_center.collections.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(Collection, collection, path=["response"]) @@ -843,7 +843,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.help_center.collections.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -854,7 +854,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.help_center.collections.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -867,14 +867,14 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> @parametrize async def test_method_update(self, async_client: AsyncIntercom) -> None: collection = await async_client.help_center.collections.update( - 0, + id=123, ) assert_matches_type(Collection, collection, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIntercom) -> None: collection = await async_client.help_center.collections.update( - 0, + id=123, description="English description", name="Update collection name", parent_id="6871118", @@ -1073,7 +1073,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: response = await async_client.help_center.collections.with_raw_response.update( - 0, + id=123, ) assert response.is_closed is True @@ -1084,7 +1084,7 @@ async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIntercom) -> None: async with async_client.help_center.collections.with_streaming_response.update( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1129,14 +1129,14 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: collection = await async_client.help_center.collections.delete( - 0, + id=123, ) assert_matches_type(DeletedCollection, collection, path=["response"]) @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: collection = await async_client.help_center.collections.delete( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(DeletedCollection, collection, path=["response"]) @@ -1144,7 +1144,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.help_center.collections.with_raw_response.delete( - 0, + id=123, ) assert response.is_closed is True @@ -1155,7 +1155,7 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.help_center.collections.with_streaming_response.delete( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/help_center/test_help_centers.py b/tests/api_resources/help_center/test_help_centers.py index 1c3e7c5b..4d6dbac8 100644 --- a/tests/api_resources/help_center/test_help_centers.py +++ b/tests/api_resources/help_center/test_help_centers.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.help_center import HelpCenter, HelpCenterList +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.help_center import HelpCenter, HelpCenterList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestHelpCenters: @parametrize def test_method_retrieve(self, client: Intercom) -> None: help_center = client.help_center.help_centers.retrieve( - 0, + id=123, ) assert_matches_type(HelpCenter, help_center, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: help_center = client.help_center.help_centers.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(HelpCenter, help_center, path=["response"]) @@ -35,7 +35,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.help_center.help_centers.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.help_center.help_centers.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -95,14 +95,14 @@ class TestAsyncHelpCenters: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: help_center = await async_client.help_center.help_centers.retrieve( - 0, + id=123, ) assert_matches_type(HelpCenter, help_center, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: help_center = await async_client.help_center.help_centers.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(HelpCenter, help_center, path=["response"]) @@ -110,7 +110,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.help_center.help_centers.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -121,7 +121,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.help_center.help_centers.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/news/newsfeeds/test_items.py b/tests/api_resources/news/newsfeeds/test_items.py index e6a4d9e4..8bb85891 100644 --- a/tests/api_resources/news/newsfeeds/test_items.py +++ b/tests/api_resources/news/newsfeeds/test_items.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import PaginatedResponse +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import PaginatedResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestItems: @parametrize def test_method_list(self, client: Intercom) -> None: item = client.news.newsfeeds.items.list( - "string", + id="123", ) assert_matches_type(PaginatedResponse, item, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: item = client.news.newsfeeds.items.list( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(PaginatedResponse, item, path=["response"]) @@ -35,7 +35,7 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.news.newsfeeds.items.with_raw_response.list( - "string", + id="123", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.news.newsfeeds.items.with_streaming_response.list( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_list(self, client: Intercom) -> None: def test_path_params_list(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.news.newsfeeds.items.with_raw_response.list( - "", + id="", ) @@ -70,14 +70,14 @@ class TestAsyncItems: @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: item = await async_client.news.newsfeeds.items.list( - "string", + id="123", ) assert_matches_type(PaginatedResponse, item, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: item = await async_client.news.newsfeeds.items.list( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(PaginatedResponse, item, path=["response"]) @@ -85,7 +85,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.news.newsfeeds.items.with_raw_response.list( - "string", + id="123", ) assert response.is_closed is True @@ -96,7 +96,7 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.news.newsfeeds.items.with_streaming_response.list( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,5 +110,5 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non async def test_path_params_list(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.news.newsfeeds.items.with_raw_response.list( - "", + id="", ) diff --git a/tests/api_resources/news/test_news_items.py b/tests/api_resources/news/test_news_items.py index 31009cfc..4b8b5cca 100644 --- a/tests/api_resources/news/test_news_items.py +++ b/tests/api_resources/news/test_news_items.py @@ -8,12 +8,12 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.news import ( +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.news import ( NewsItem, NewsItemDeleteResponse, ) -from python_minus_intercom.types.shared import PaginatedResponse +from python_intercom.types.shared import PaginatedResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -78,14 +78,14 @@ def test_streaming_response_create(self, client: Intercom) -> None: @parametrize def test_method_retrieve(self, client: Intercom) -> None: news_item = client.news.news_items.retrieve( - 0, + id=123, ) assert_matches_type(NewsItem, news_item, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: news_item = client.news.news_items.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(NewsItem, news_item, path=["response"]) @@ -93,7 +93,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.news.news_items.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -104,7 +104,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.news.news_items.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -117,7 +117,7 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: @parametrize def test_method_update(self, client: Intercom) -> None: news_item = client.news.news_items.update( - 0, + id=123, sender_id=991268701, title="Christmas is here!", ) @@ -126,7 +126,7 @@ def test_method_update(self, client: Intercom) -> None: @parametrize def test_method_update_with_all_params(self, client: Intercom) -> None: news_item = client.news.news_items.update( - 0, + id=123, sender_id=991268701, title="Christmas is here!", body="

New gifts in store for the jolly season

", @@ -155,7 +155,7 @@ def test_method_update_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update(self, client: Intercom) -> None: response = client.news.news_items.with_raw_response.update( - 0, + id=123, sender_id=991268701, title="Christmas is here!", ) @@ -168,7 +168,7 @@ def test_raw_response_update(self, client: Intercom) -> None: @parametrize def test_streaming_response_update(self, client: Intercom) -> None: with client.news.news_items.with_streaming_response.update( - 0, + id=123, sender_id=991268701, title="Christmas is here!", ) as response: @@ -215,14 +215,14 @@ def test_streaming_response_list(self, client: Intercom) -> None: @parametrize def test_method_delete(self, client: Intercom) -> None: news_item = client.news.news_items.delete( - 0, + id=123, ) assert_matches_type(NewsItemDeleteResponse, news_item, path=["response"]) @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: news_item = client.news.news_items.delete( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(NewsItemDeleteResponse, news_item, path=["response"]) @@ -230,7 +230,7 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.news.news_items.with_raw_response.delete( - 0, + id=123, ) assert response.is_closed is True @@ -241,7 +241,7 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.news.news_items.with_streaming_response.delete( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -312,14 +312,14 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: news_item = await async_client.news.news_items.retrieve( - 0, + id=123, ) assert_matches_type(NewsItem, news_item, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: news_item = await async_client.news.news_items.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(NewsItem, news_item, path=["response"]) @@ -327,7 +327,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.news.news_items.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -338,7 +338,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.news.news_items.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -351,7 +351,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> @parametrize async def test_method_update(self, async_client: AsyncIntercom) -> None: news_item = await async_client.news.news_items.update( - 0, + id=123, sender_id=991268701, title="Christmas is here!", ) @@ -360,7 +360,7 @@ async def test_method_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIntercom) -> None: news_item = await async_client.news.news_items.update( - 0, + id=123, sender_id=991268701, title="Christmas is here!", body="

New gifts in store for the jolly season

", @@ -389,7 +389,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: response = await async_client.news.news_items.with_raw_response.update( - 0, + id=123, sender_id=991268701, title="Christmas is here!", ) @@ -402,7 +402,7 @@ async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIntercom) -> None: async with async_client.news.news_items.with_streaming_response.update( - 0, + id=123, sender_id=991268701, title="Christmas is here!", ) as response: @@ -449,14 +449,14 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: news_item = await async_client.news.news_items.delete( - 0, + id=123, ) assert_matches_type(NewsItemDeleteResponse, news_item, path=["response"]) @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: news_item = await async_client.news.news_items.delete( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(NewsItemDeleteResponse, news_item, path=["response"]) @@ -464,7 +464,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.news.news_items.with_raw_response.delete( - 0, + id=123, ) assert response.is_closed is True @@ -475,7 +475,7 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.news.news_items.with_streaming_response.delete( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/news/test_newsfeeds.py b/tests/api_resources/news/test_newsfeeds.py index 05effb9e..2db0f22f 100644 --- a/tests/api_resources/news/test_newsfeeds.py +++ b/tests/api_resources/news/test_newsfeeds.py @@ -8,9 +8,9 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.news import Newsfeed -from python_minus_intercom.types.shared import PaginatedResponse +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.news import Newsfeed +from python_intercom.types.shared import PaginatedResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,14 +21,14 @@ class TestNewsfeeds: @parametrize def test_method_retrieve(self, client: Intercom) -> None: newsfeed = client.news.newsfeeds.retrieve( - "string", + id="123", ) assert_matches_type(Newsfeed, newsfeed, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: newsfeed = client.news.newsfeeds.retrieve( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Newsfeed, newsfeed, path=["response"]) @@ -36,7 +36,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.news.newsfeeds.with_raw_response.retrieve( - "string", + id="123", ) assert response.is_closed is True @@ -47,7 +47,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.news.newsfeeds.with_streaming_response.retrieve( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -61,7 +61,7 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: def test_path_params_retrieve(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.news.newsfeeds.with_raw_response.retrieve( - "", + id="", ) @parametrize @@ -103,14 +103,14 @@ class TestAsyncNewsfeeds: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: newsfeed = await async_client.news.newsfeeds.retrieve( - "string", + id="123", ) assert_matches_type(Newsfeed, newsfeed, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: newsfeed = await async_client.news.newsfeeds.retrieve( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Newsfeed, newsfeed, path=["response"]) @@ -118,7 +118,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.news.newsfeeds.with_raw_response.retrieve( - "string", + id="123", ) assert response.is_closed is True @@ -129,7 +129,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.news.newsfeeds.with_streaming_response.retrieve( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -143,7 +143,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.news.newsfeeds.with_raw_response.retrieve( - "", + id="", ) @parametrize diff --git a/tests/api_resources/test_admins.py b/tests/api_resources/test_admins.py index 9181b985..277ce314 100644 --- a/tests/api_resources/test_admins.py +++ b/tests/api_resources/test_admins.py @@ -8,9 +8,9 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import AdminList -from python_minus_intercom.types.shared import Admin +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import AdminList +from python_intercom.types.shared import Admin base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,14 +21,14 @@ class TestAdmins: @parametrize def test_method_retrieve(self, client: Intercom) -> None: admin = client.admins.retrieve( - 0, + id=123, ) assert_matches_type(Optional[Admin], admin, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: admin = client.admins.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(Optional[Admin], admin, path=["response"]) @@ -36,7 +36,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.admins.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -47,7 +47,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.admins.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -92,7 +92,7 @@ def test_streaming_response_list(self, client: Intercom) -> None: @parametrize def test_method_set_away(self, client: Intercom) -> None: admin = client.admins.set_away( - 0, + id=0, away_mode_enabled=True, away_mode_reassign=True, ) @@ -101,7 +101,7 @@ def test_method_set_away(self, client: Intercom) -> None: @parametrize def test_method_set_away_with_all_params(self, client: Intercom) -> None: admin = client.admins.set_away( - 0, + id=0, away_mode_enabled=True, away_mode_reassign=True, intercom_version="2.11", @@ -111,7 +111,7 @@ def test_method_set_away_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_set_away(self, client: Intercom) -> None: response = client.admins.with_raw_response.set_away( - 0, + id=0, away_mode_enabled=True, away_mode_reassign=True, ) @@ -124,7 +124,7 @@ def test_raw_response_set_away(self, client: Intercom) -> None: @parametrize def test_streaming_response_set_away(self, client: Intercom) -> None: with client.admins.with_streaming_response.set_away( - 0, + id=0, away_mode_enabled=True, away_mode_reassign=True, ) as response: @@ -143,14 +143,14 @@ class TestAsyncAdmins: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: admin = await async_client.admins.retrieve( - 0, + id=123, ) assert_matches_type(Optional[Admin], admin, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: admin = await async_client.admins.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(Optional[Admin], admin, path=["response"]) @@ -158,7 +158,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.admins.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -169,7 +169,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.admins.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -214,7 +214,7 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_set_away(self, async_client: AsyncIntercom) -> None: admin = await async_client.admins.set_away( - 0, + id=0, away_mode_enabled=True, away_mode_reassign=True, ) @@ -223,7 +223,7 @@ async def test_method_set_away(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_set_away_with_all_params(self, async_client: AsyncIntercom) -> None: admin = await async_client.admins.set_away( - 0, + id=0, away_mode_enabled=True, away_mode_reassign=True, intercom_version="2.11", @@ -233,7 +233,7 @@ async def test_method_set_away_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_set_away(self, async_client: AsyncIntercom) -> None: response = await async_client.admins.with_raw_response.set_away( - 0, + id=0, away_mode_enabled=True, away_mode_reassign=True, ) @@ -246,7 +246,7 @@ async def test_raw_response_set_away(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_set_away(self, async_client: AsyncIntercom) -> None: async with async_client.admins.with_streaming_response.set_away( - 0, + id=0, away_mode_enabled=True, away_mode_reassign=True, ) as response: diff --git a/tests/api_resources/test_articles.py b/tests/api_resources/test_articles.py index 572ecb73..6e4f35b9 100644 --- a/tests/api_resources/test_articles.py +++ b/tests/api_resources/test_articles.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import ( +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import ( Article, ArticleList, DeletedArticleObject, @@ -483,14 +483,14 @@ def test_streaming_response_create(self, client: Intercom) -> None: @parametrize def test_method_retrieve(self, client: Intercom) -> None: article = client.articles.retrieve( - 0, + id=123, ) assert_matches_type(Article, article, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: article = client.articles.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(Article, article, path=["response"]) @@ -498,7 +498,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.articles.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -509,7 +509,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.articles.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -522,14 +522,14 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: @parametrize def test_method_update(self, client: Intercom) -> None: article = client.articles.update( - 0, + id=123, ) assert_matches_type(Article, article, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Intercom) -> None: article = client.articles.update( - 0, + id=123, author_id=1295, body="

New gifts in store for the jolly season

", description="Description of the Article", @@ -954,7 +954,7 @@ def test_method_update_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update(self, client: Intercom) -> None: response = client.articles.with_raw_response.update( - 0, + id=123, ) assert response.is_closed is True @@ -965,7 +965,7 @@ def test_raw_response_update(self, client: Intercom) -> None: @parametrize def test_streaming_response_update(self, client: Intercom) -> None: with client.articles.with_streaming_response.update( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1010,14 +1010,14 @@ def test_streaming_response_list(self, client: Intercom) -> None: @parametrize def test_method_remove(self, client: Intercom) -> None: article = client.articles.remove( - 0, + id=123, ) assert_matches_type(DeletedArticleObject, article, path=["response"]) @parametrize def test_method_remove_with_all_params(self, client: Intercom) -> None: article = client.articles.remove( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(DeletedArticleObject, article, path=["response"]) @@ -1025,7 +1025,7 @@ def test_method_remove_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_remove(self, client: Intercom) -> None: response = client.articles.with_raw_response.remove( - 0, + id=123, ) assert response.is_closed is True @@ -1036,7 +1036,7 @@ def test_raw_response_remove(self, client: Intercom) -> None: @parametrize def test_streaming_response_remove(self, client: Intercom) -> None: with client.articles.with_streaming_response.remove( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1056,8 +1056,8 @@ def test_method_search_with_all_params(self, client: Intercom) -> None: article = client.articles.search( help_center_id=0, highlight=True, - phrase="string", - state="string", + phrase="phrase", + state="state", intercom_version="2.11", ) assert_matches_type(ArticleSearchResponse, article, path=["response"]) @@ -1547,14 +1547,14 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: article = await async_client.articles.retrieve( - 0, + id=123, ) assert_matches_type(Article, article, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: article = await async_client.articles.retrieve( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(Article, article, path=["response"]) @@ -1562,7 +1562,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.articles.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -1573,7 +1573,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.articles.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1586,14 +1586,14 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> @parametrize async def test_method_update(self, async_client: AsyncIntercom) -> None: article = await async_client.articles.update( - 0, + id=123, ) assert_matches_type(Article, article, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIntercom) -> None: article = await async_client.articles.update( - 0, + id=123, author_id=1295, body="

New gifts in store for the jolly season

", description="Description of the Article", @@ -2018,7 +2018,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: response = await async_client.articles.with_raw_response.update( - 0, + id=123, ) assert response.is_closed is True @@ -2029,7 +2029,7 @@ async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIntercom) -> None: async with async_client.articles.with_streaming_response.update( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2074,14 +2074,14 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_remove(self, async_client: AsyncIntercom) -> None: article = await async_client.articles.remove( - 0, + id=123, ) assert_matches_type(DeletedArticleObject, article, path=["response"]) @parametrize async def test_method_remove_with_all_params(self, async_client: AsyncIntercom) -> None: article = await async_client.articles.remove( - 0, + id=123, intercom_version="2.11", ) assert_matches_type(DeletedArticleObject, article, path=["response"]) @@ -2089,7 +2089,7 @@ async def test_method_remove_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_remove(self, async_client: AsyncIntercom) -> None: response = await async_client.articles.with_raw_response.remove( - 0, + id=123, ) assert response.is_closed is True @@ -2100,7 +2100,7 @@ async def test_raw_response_remove(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_remove(self, async_client: AsyncIntercom) -> None: async with async_client.articles.with_streaming_response.remove( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -2120,8 +2120,8 @@ async def test_method_search_with_all_params(self, async_client: AsyncIntercom) article = await async_client.articles.search( help_center_id=0, highlight=True, - phrase="string", - state="string", + phrase="phrase", + state="state", intercom_version="2.11", ) assert_matches_type(ArticleSearchResponse, article, path=["response"]) diff --git a/tests/api_resources/test_companies.py b/tests/api_resources/test_companies.py index e9a27bf8..09367811 100644 --- a/tests/api_resources/test_companies.py +++ b/tests/api_resources/test_companies.py @@ -8,13 +8,13 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import ( +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import ( CompanyList, CompanyScroll, DeletedCompanyObject, ) -from python_minus_intercom.types.shared import Company +from python_intercom.types.shared import Company base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -70,14 +70,14 @@ def test_streaming_response_create(self, client: Intercom) -> None: @parametrize def test_method_retrieve(self, client: Intercom) -> None: company = client.companies.retrieve( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(Company, company, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: company = client.companies.retrieve( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(Company, company, path=["response"]) @@ -85,7 +85,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.companies.with_raw_response.retrieve( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -96,7 +96,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.companies.with_streaming_response.retrieve( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,20 +110,20 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: def test_path_params_retrieve(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.companies.with_raw_response.retrieve( - "", + id="", ) @parametrize def test_method_update(self, client: Intercom) -> None: company = client.companies.update( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(Company, company, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Intercom) -> None: company = client.companies.update( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(Company, company, path=["response"]) @@ -131,7 +131,7 @@ def test_method_update_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update(self, client: Intercom) -> None: response = client.companies.with_raw_response.update( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -142,7 +142,7 @@ def test_raw_response_update(self, client: Intercom) -> None: @parametrize def test_streaming_response_update(self, client: Intercom) -> None: with client.companies.with_streaming_response.update( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -156,7 +156,7 @@ def test_streaming_response_update(self, client: Intercom) -> None: def test_path_params_update(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.companies.with_raw_response.update( - "", + id="", ) @parametrize @@ -167,7 +167,7 @@ def test_method_list(self, client: Intercom) -> None: @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: company = client.companies.list( - order="string", + order="order", page=0, per_page=0, intercom_version="2.11", @@ -197,14 +197,14 @@ def test_streaming_response_list(self, client: Intercom) -> None: @parametrize def test_method_delete(self, client: Intercom) -> None: company = client.companies.delete( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(DeletedCompanyObject, company, path=["response"]) @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: company = client.companies.delete( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(DeletedCompanyObject, company, path=["response"]) @@ -212,7 +212,7 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.companies.with_raw_response.delete( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -223,7 +223,7 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.companies.with_streaming_response.delete( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -237,7 +237,7 @@ def test_streaming_response_delete(self, client: Intercom) -> None: def test_path_params_delete(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.companies.with_raw_response.delete( - "", + id="", ) @parametrize @@ -248,12 +248,12 @@ def test_method_retrieve_list(self, client: Intercom) -> None: @parametrize def test_method_retrieve_list_with_all_params(self, client: Intercom) -> None: company = client.companies.retrieve_list( - company_id="string", - name="string", + company_id="company_id", + name="name", page=0, per_page=0, - segment_id="string", - tag_id="string", + segment_id="segment_id", + tag_id="tag_id", intercom_version="2.11", ) assert_matches_type(CompanyList, company, path=["response"]) @@ -286,7 +286,7 @@ def test_method_scroll(self, client: Intercom) -> None: @parametrize def test_method_scroll_with_all_params(self, client: Intercom) -> None: company = client.companies.scroll( - scroll_param="string", + scroll_param="scroll_param", intercom_version="2.11", ) assert_matches_type(Optional[CompanyScroll], company, path=["response"]) @@ -363,14 +363,14 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: company = await async_client.companies.retrieve( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(Company, company, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.companies.retrieve( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(Company, company, path=["response"]) @@ -378,7 +378,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.companies.with_raw_response.retrieve( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -389,7 +389,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.companies.with_streaming_response.retrieve( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -403,20 +403,20 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.companies.with_raw_response.retrieve( - "", + id="", ) @parametrize async def test_method_update(self, async_client: AsyncIntercom) -> None: company = await async_client.companies.update( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(Company, company, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.companies.update( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(Company, company, path=["response"]) @@ -424,7 +424,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: response = await async_client.companies.with_raw_response.update( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -435,7 +435,7 @@ async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIntercom) -> None: async with async_client.companies.with_streaming_response.update( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -449,7 +449,7 @@ async def test_streaming_response_update(self, async_client: AsyncIntercom) -> N async def test_path_params_update(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.companies.with_raw_response.update( - "", + id="", ) @parametrize @@ -460,7 +460,7 @@ async def test_method_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.companies.list( - order="string", + order="order", page=0, per_page=0, intercom_version="2.11", @@ -490,14 +490,14 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: company = await async_client.companies.delete( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert_matches_type(DeletedCompanyObject, company, path=["response"]) @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.companies.delete( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", intercom_version="2.11", ) assert_matches_type(DeletedCompanyObject, company, path=["response"]) @@ -505,7 +505,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.companies.with_raw_response.delete( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) assert response.is_closed is True @@ -516,7 +516,7 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.companies.with_streaming_response.delete( - "string", + id="5f4d3c1c-7b1b-4d7d-a97e-6095715c6632", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -530,7 +530,7 @@ async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> N async def test_path_params_delete(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.companies.with_raw_response.delete( - "", + id="", ) @parametrize @@ -541,12 +541,12 @@ async def test_method_retrieve_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_retrieve_list_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.companies.retrieve_list( - company_id="string", - name="string", + company_id="company_id", + name="name", page=0, per_page=0, - segment_id="string", - tag_id="string", + segment_id="segment_id", + tag_id="tag_id", intercom_version="2.11", ) assert_matches_type(CompanyList, company, path=["response"]) @@ -579,7 +579,7 @@ async def test_method_scroll(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_scroll_with_all_params(self, async_client: AsyncIntercom) -> None: company = await async_client.companies.scroll( - scroll_param="string", + scroll_param="scroll_param", intercom_version="2.11", ) assert_matches_type(Optional[CompanyScroll], company, path=["response"]) diff --git a/tests/api_resources/test_contacts.py b/tests/api_resources/test_contacts.py index 03ea1763..d86c5ebc 100644 --- a/tests/api_resources/test_contacts.py +++ b/tests/api_resources/test_contacts.py @@ -8,14 +8,14 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import ( +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import ( ContactList, ContactDeleted, ContactArchived, ContactUnarchived, ) -from python_minus_intercom.types.shared import Contact +from python_intercom.types.shared import Contact base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -143,14 +143,14 @@ def test_streaming_response_create_overload_3(self, client: Intercom) -> None: @parametrize def test_method_retrieve(self, client: Intercom) -> None: contact = client.contacts.retrieve( - "string", + id="63a07ddf05a32042dffac965", ) assert_matches_type(Contact, contact, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: contact = client.contacts.retrieve( - "string", + id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(Contact, contact, path=["response"]) @@ -158,7 +158,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.contacts.with_raw_response.retrieve( - "string", + id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -169,7 +169,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.contacts.with_streaming_response.retrieve( - "string", + id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -183,29 +183,29 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: def test_path_params_retrieve(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.contacts.with_raw_response.retrieve( - "", + id="", ) @parametrize def test_method_update(self, client: Intercom) -> None: contact = client.contacts.update( - "string", + id="63a07ddf05a32042dffac965", ) assert_matches_type(Contact, contact, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Intercom) -> None: contact = client.contacts.update( - "string", + id="63a07ddf05a32042dffac965", avatar="https://www.example.com/avatar_image.jpg", custom_attributes={}, email="jdoe@example.com", - external_id="string", + external_id="external_id", last_seen_at=1571672154, name="John Doe", owner_id=123, phone="+353871234567", - role="string", + role="role", signed_up_at=1571672154, unsubscribed_from_emails=True, intercom_version="2.11", @@ -215,7 +215,7 @@ def test_method_update_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update(self, client: Intercom) -> None: response = client.contacts.with_raw_response.update( - "string", + id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -226,7 +226,7 @@ def test_raw_response_update(self, client: Intercom) -> None: @parametrize def test_streaming_response_update(self, client: Intercom) -> None: with client.contacts.with_streaming_response.update( - "string", + id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -240,7 +240,7 @@ def test_streaming_response_update(self, client: Intercom) -> None: def test_path_params_update(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.contacts.with_raw_response.update( - "", + id="", ) @parametrize @@ -278,14 +278,14 @@ def test_streaming_response_list(self, client: Intercom) -> None: @parametrize def test_method_delete(self, client: Intercom) -> None: contact = client.contacts.delete( - "string", + id="id", ) assert_matches_type(ContactDeleted, contact, path=["response"]) @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: contact = client.contacts.delete( - "string", + id="id", intercom_version="2.11", ) assert_matches_type(ContactDeleted, contact, path=["response"]) @@ -293,7 +293,7 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.contacts.with_raw_response.delete( - "string", + id="id", ) assert response.is_closed is True @@ -304,7 +304,7 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.contacts.with_streaming_response.delete( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -318,20 +318,20 @@ def test_streaming_response_delete(self, client: Intercom) -> None: def test_path_params_delete(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.contacts.with_raw_response.delete( - "", + id="", ) @parametrize def test_method_archive(self, client: Intercom) -> None: contact = client.contacts.archive( - "string", + id="63a07ddf05a32042dffac965", ) assert_matches_type(ContactArchived, contact, path=["response"]) @parametrize def test_method_archive_with_all_params(self, client: Intercom) -> None: contact = client.contacts.archive( - "string", + id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(ContactArchived, contact, path=["response"]) @@ -339,7 +339,7 @@ def test_method_archive_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_archive(self, client: Intercom) -> None: response = client.contacts.with_raw_response.archive( - "string", + id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -350,7 +350,7 @@ def test_raw_response_archive(self, client: Intercom) -> None: @parametrize def test_streaming_response_archive(self, client: Intercom) -> None: with client.contacts.with_streaming_response.archive( - "string", + id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -364,7 +364,7 @@ def test_streaming_response_archive(self, client: Intercom) -> None: def test_path_params_archive(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.contacts.with_raw_response.archive( - "", + id="", ) @parametrize @@ -414,7 +414,7 @@ def test_method_search_with_all_params(self, client: Intercom) -> None: query={ "field": "created_at", "operator": "=", - "value": "string", + "value": "value", }, pagination={ "per_page": 5, @@ -451,14 +451,14 @@ def test_streaming_response_search(self, client: Intercom) -> None: @parametrize def test_method_unarchive(self, client: Intercom) -> None: contact = client.contacts.unarchive( - "string", + id="63a07ddf05a32042dffac965", ) assert_matches_type(ContactUnarchived, contact, path=["response"]) @parametrize def test_method_unarchive_with_all_params(self, client: Intercom) -> None: contact = client.contacts.unarchive( - "string", + id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(ContactUnarchived, contact, path=["response"]) @@ -466,7 +466,7 @@ def test_method_unarchive_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_unarchive(self, client: Intercom) -> None: response = client.contacts.with_raw_response.unarchive( - "string", + id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -477,7 +477,7 @@ def test_raw_response_unarchive(self, client: Intercom) -> None: @parametrize def test_streaming_response_unarchive(self, client: Intercom) -> None: with client.contacts.with_streaming_response.unarchive( - "string", + id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -491,7 +491,7 @@ def test_streaming_response_unarchive(self, client: Intercom) -> None: def test_path_params_unarchive(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.contacts.with_raw_response.unarchive( - "", + id="", ) @@ -618,14 +618,14 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncInt @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.retrieve( - "string", + id="63a07ddf05a32042dffac965", ) assert_matches_type(Contact, contact, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.retrieve( - "string", + id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(Contact, contact, path=["response"]) @@ -633,7 +633,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.with_raw_response.retrieve( - "string", + id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -644,7 +644,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.with_streaming_response.retrieve( - "string", + id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -658,29 +658,29 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.contacts.with_raw_response.retrieve( - "", + id="", ) @parametrize async def test_method_update(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.update( - "string", + id="63a07ddf05a32042dffac965", ) assert_matches_type(Contact, contact, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.update( - "string", + id="63a07ddf05a32042dffac965", avatar="https://www.example.com/avatar_image.jpg", custom_attributes={}, email="jdoe@example.com", - external_id="string", + external_id="external_id", last_seen_at=1571672154, name="John Doe", owner_id=123, phone="+353871234567", - role="string", + role="role", signed_up_at=1571672154, unsubscribed_from_emails=True, intercom_version="2.11", @@ -690,7 +690,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.with_raw_response.update( - "string", + id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -701,7 +701,7 @@ async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.with_streaming_response.update( - "string", + id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -715,7 +715,7 @@ async def test_streaming_response_update(self, async_client: AsyncIntercom) -> N async def test_path_params_update(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.contacts.with_raw_response.update( - "", + id="", ) @parametrize @@ -753,14 +753,14 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.delete( - "string", + id="id", ) assert_matches_type(ContactDeleted, contact, path=["response"]) @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.delete( - "string", + id="id", intercom_version="2.11", ) assert_matches_type(ContactDeleted, contact, path=["response"]) @@ -768,7 +768,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.with_raw_response.delete( - "string", + id="id", ) assert response.is_closed is True @@ -779,7 +779,7 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.with_streaming_response.delete( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -793,20 +793,20 @@ async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> N async def test_path_params_delete(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.contacts.with_raw_response.delete( - "", + id="", ) @parametrize async def test_method_archive(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.archive( - "string", + id="63a07ddf05a32042dffac965", ) assert_matches_type(ContactArchived, contact, path=["response"]) @parametrize async def test_method_archive_with_all_params(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.archive( - "string", + id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(ContactArchived, contact, path=["response"]) @@ -814,7 +814,7 @@ async def test_method_archive_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_archive(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.with_raw_response.archive( - "string", + id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -825,7 +825,7 @@ async def test_raw_response_archive(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.with_streaming_response.archive( - "string", + id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -839,7 +839,7 @@ async def test_streaming_response_archive(self, async_client: AsyncIntercom) -> async def test_path_params_archive(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.contacts.with_raw_response.archive( - "", + id="", ) @parametrize @@ -889,7 +889,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncIntercom) query={ "field": "created_at", "operator": "=", - "value": "string", + "value": "value", }, pagination={ "per_page": 5, @@ -926,14 +926,14 @@ async def test_streaming_response_search(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_unarchive(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.unarchive( - "string", + id="63a07ddf05a32042dffac965", ) assert_matches_type(ContactUnarchived, contact, path=["response"]) @parametrize async def test_method_unarchive_with_all_params(self, async_client: AsyncIntercom) -> None: contact = await async_client.contacts.unarchive( - "string", + id="63a07ddf05a32042dffac965", intercom_version="2.11", ) assert_matches_type(ContactUnarchived, contact, path=["response"]) @@ -941,7 +941,7 @@ async def test_method_unarchive_with_all_params(self, async_client: AsyncInterco @parametrize async def test_raw_response_unarchive(self, async_client: AsyncIntercom) -> None: response = await async_client.contacts.with_raw_response.unarchive( - "string", + id="63a07ddf05a32042dffac965", ) assert response.is_closed is True @@ -952,7 +952,7 @@ async def test_raw_response_unarchive(self, async_client: AsyncIntercom) -> None @parametrize async def test_streaming_response_unarchive(self, async_client: AsyncIntercom) -> None: async with async_client.contacts.with_streaming_response.unarchive( - "string", + id="63a07ddf05a32042dffac965", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -966,5 +966,5 @@ async def test_streaming_response_unarchive(self, async_client: AsyncIntercom) - async def test_path_params_unarchive(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.contacts.with_raw_response.unarchive( - "", + id="", ) diff --git a/tests/api_resources/test_conversations.py b/tests/api_resources/test_conversations.py index d1362286..38078f0e 100644 --- a/tests/api_resources/test_conversations.py +++ b/tests/api_resources/test_conversations.py @@ -8,13 +8,13 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import ( +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import ( ConversationList, ConversationListResponse, ) -from python_minus_intercom.pagination import SyncCursorPagination, AsyncCursorPagination -from python_minus_intercom.types.shared import Ticket, Message, Conversation +from python_intercom.pagination import SyncCursorPagination, AsyncCursorPagination +from python_intercom.types.shared import Ticket, Message, Conversation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -80,15 +80,15 @@ def test_streaming_response_create(self, client: Intercom) -> None: @parametrize def test_method_retrieve(self, client: Intercom) -> None: conversation = client.conversations.retrieve( - 0, + id=123, ) assert_matches_type(Conversation, conversation, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: conversation = client.conversations.retrieve( - 0, - display_as="string", + id=123, + display_as="display_as", intercom_version="2.11", ) assert_matches_type(Conversation, conversation, path=["response"]) @@ -96,7 +96,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.conversations.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -107,7 +107,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.conversations.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -120,15 +120,15 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: @parametrize def test_method_update(self, client: Intercom) -> None: conversation = client.conversations.update( - 0, + id=123, ) assert_matches_type(Conversation, conversation, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Intercom) -> None: conversation = client.conversations.update( - 0, - display_as="string", + id=123, + display_as="display_as", custom_attributes={ "issue_type": "Billing", "priority": "High", @@ -141,7 +141,7 @@ def test_method_update_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update(self, client: Intercom) -> None: response = client.conversations.with_raw_response.update( - 0, + id=123, ) assert response.is_closed is True @@ -152,7 +152,7 @@ def test_raw_response_update(self, client: Intercom) -> None: @parametrize def test_streaming_response_update(self, client: Intercom) -> None: with client.conversations.with_streaming_response.update( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -171,7 +171,7 @@ def test_method_list(self, client: Intercom) -> None: def test_method_list_with_all_params(self, client: Intercom) -> None: conversation = client.conversations.list( per_page=0, - starting_after="string", + starting_after="starting_after", intercom_version="2.11", ) assert_matches_type(SyncCursorPagination[ConversationListResponse], conversation, path=["response"]) @@ -199,7 +199,7 @@ def test_streaming_response_list(self, client: Intercom) -> None: @parametrize def test_method_convert(self, client: Intercom) -> None: conversation = client.conversations.convert( - 0, + id=123, ticket_type_id="120", ) assert_matches_type(Optional[Ticket], conversation, path=["response"]) @@ -207,7 +207,7 @@ def test_method_convert(self, client: Intercom) -> None: @parametrize def test_method_convert_with_all_params(self, client: Intercom) -> None: conversation = client.conversations.convert( - 0, + id=123, ticket_type_id="120", attributes={ "_default_title_": "Found a bug", @@ -220,7 +220,7 @@ def test_method_convert_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_convert(self, client: Intercom) -> None: response = client.conversations.with_raw_response.convert( - 0, + id=123, ticket_type_id="120", ) @@ -232,7 +232,7 @@ def test_raw_response_convert(self, client: Intercom) -> None: @parametrize def test_streaming_response_convert(self, client: Intercom) -> None: with client.conversations.with_streaming_response.convert( - 0, + id=123, ticket_type_id="120", ) as response: assert not response.is_closed @@ -350,7 +350,7 @@ def test_method_search_with_all_params(self, client: Intercom) -> None: query={ "field": "created_at", "operator": "=", - "value": "string", + "value": "value", }, pagination={ "per_page": 5, @@ -446,15 +446,15 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: conversation = await async_client.conversations.retrieve( - 0, + id=123, ) assert_matches_type(Conversation, conversation, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: conversation = await async_client.conversations.retrieve( - 0, - display_as="string", + id=123, + display_as="display_as", intercom_version="2.11", ) assert_matches_type(Conversation, conversation, path=["response"]) @@ -462,7 +462,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.with_raw_response.retrieve( - 0, + id=123, ) assert response.is_closed is True @@ -473,7 +473,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.with_streaming_response.retrieve( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -486,15 +486,15 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> @parametrize async def test_method_update(self, async_client: AsyncIntercom) -> None: conversation = await async_client.conversations.update( - 0, + id=123, ) assert_matches_type(Conversation, conversation, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIntercom) -> None: conversation = await async_client.conversations.update( - 0, - display_as="string", + id=123, + display_as="display_as", custom_attributes={ "issue_type": "Billing", "priority": "High", @@ -507,7 +507,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.with_raw_response.update( - 0, + id=123, ) assert response.is_closed is True @@ -518,7 +518,7 @@ async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.with_streaming_response.update( - 0, + id=123, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -537,7 +537,7 @@ async def test_method_list(self, async_client: AsyncIntercom) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: conversation = await async_client.conversations.list( per_page=0, - starting_after="string", + starting_after="starting_after", intercom_version="2.11", ) assert_matches_type(AsyncCursorPagination[ConversationListResponse], conversation, path=["response"]) @@ -565,7 +565,7 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_convert(self, async_client: AsyncIntercom) -> None: conversation = await async_client.conversations.convert( - 0, + id=123, ticket_type_id="120", ) assert_matches_type(Optional[Ticket], conversation, path=["response"]) @@ -573,7 +573,7 @@ async def test_method_convert(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_convert_with_all_params(self, async_client: AsyncIntercom) -> None: conversation = await async_client.conversations.convert( - 0, + id=123, ticket_type_id="120", attributes={ "_default_title_": "Found a bug", @@ -586,7 +586,7 @@ async def test_method_convert_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_convert(self, async_client: AsyncIntercom) -> None: response = await async_client.conversations.with_raw_response.convert( - 0, + id=123, ticket_type_id="120", ) @@ -598,7 +598,7 @@ async def test_raw_response_convert(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_convert(self, async_client: AsyncIntercom) -> None: async with async_client.conversations.with_streaming_response.convert( - 0, + id=123, ticket_type_id="120", ) as response: assert not response.is_closed @@ -716,7 +716,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncIntercom) query={ "field": "created_at", "operator": "=", - "value": "string", + "value": "value", }, pagination={ "per_page": 5, diff --git a/tests/api_resources/test_data_attributes.py b/tests/api_resources/test_data_attributes.py index ea6f95ce..ef434c1b 100644 --- a/tests/api_resources/test_data_attributes.py +++ b/tests/api_resources/test_data_attributes.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import ( +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import ( DataAttribute, DataAttributeList, ) @@ -73,14 +73,14 @@ def test_streaming_response_create(self, client: Intercom) -> None: @parametrize def test_method_update(self, client: Intercom) -> None: data_attribute = client.data_attributes.update( - 0, + id=1, ) assert_matches_type(DataAttribute, data_attribute, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Intercom) -> None: data_attribute = client.data_attributes.update( - 0, + id=1, archived=False, description="Just a plain old ring", messenger_writable=False, @@ -92,7 +92,7 @@ def test_method_update_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update(self, client: Intercom) -> None: response = client.data_attributes.with_raw_response.update( - 0, + id=1, ) assert response.is_closed is True @@ -103,7 +103,7 @@ def test_raw_response_update(self, client: Intercom) -> None: @parametrize def test_streaming_response_update(self, client: Intercom) -> None: with client.data_attributes.with_streaming_response.update( - 0, + id=1, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,14 +204,14 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_update(self, async_client: AsyncIntercom) -> None: data_attribute = await async_client.data_attributes.update( - 0, + id=1, ) assert_matches_type(DataAttribute, data_attribute, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIntercom) -> None: data_attribute = await async_client.data_attributes.update( - 0, + id=1, archived=False, description="Just a plain old ring", messenger_writable=False, @@ -223,7 +223,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: response = await async_client.data_attributes.with_raw_response.update( - 0, + id=1, ) assert response.is_closed is True @@ -234,7 +234,7 @@ async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIntercom) -> None: async with async_client.data_attributes.with_streaming_response.update( - 0, + id=1, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_data_events.py b/tests/api_resources/test_data_events.py index bcd6efaf..cac8af9c 100644 --- a/tests/api_resources/test_data_events.py +++ b/tests/api_resources/test_data_events.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import ( +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import ( DataEventSummary, ) @@ -139,16 +139,16 @@ def test_streaming_response_create_overload_3(self, client: Intercom) -> None: @parametrize def test_method_list(self, client: Intercom) -> None: data_event = client.data_events.list( - filter={"user_id": "string"}, - type="string", + filter={"user_id": "user_id"}, + type="type", ) assert_matches_type(DataEventSummary, data_event, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Intercom) -> None: data_event = client.data_events.list( - filter={"user_id": "string"}, - type="string", + filter={"user_id": "user_id"}, + type="type", summary=True, intercom_version="2.11", ) @@ -157,8 +157,8 @@ def test_method_list_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_list(self, client: Intercom) -> None: response = client.data_events.with_raw_response.list( - filter={"user_id": "string"}, - type="string", + filter={"user_id": "user_id"}, + type="type", ) assert response.is_closed is True @@ -169,8 +169,8 @@ def test_raw_response_list(self, client: Intercom) -> None: @parametrize def test_streaming_response_list(self, client: Intercom) -> None: with client.data_events.with_streaming_response.list( - filter={"user_id": "string"}, - type="string", + filter={"user_id": "user_id"}, + type="type", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -343,16 +343,16 @@ async def test_streaming_response_create_overload_3(self, async_client: AsyncInt @parametrize async def test_method_list(self, async_client: AsyncIntercom) -> None: data_event = await async_client.data_events.list( - filter={"user_id": "string"}, - type="string", + filter={"user_id": "user_id"}, + type="type", ) assert_matches_type(DataEventSummary, data_event, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> None: data_event = await async_client.data_events.list( - filter={"user_id": "string"}, - type="string", + filter={"user_id": "user_id"}, + type="type", summary=True, intercom_version="2.11", ) @@ -361,8 +361,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncIntercom) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: response = await async_client.data_events.with_raw_response.list( - filter={"user_id": "string"}, - type="string", + filter={"user_id": "user_id"}, + type="type", ) assert response.is_closed is True @@ -373,8 +373,8 @@ async def test_raw_response_list(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIntercom) -> None: async with async_client.data_events.with_streaming_response.list( - filter={"user_id": "string"}, - type="string", + filter={"user_id": "user_id"}, + type="type", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_data_exports.py b/tests/api_resources/test_data_exports.py index 5713886a..55d93667 100644 --- a/tests/api_resources/test_data_exports.py +++ b/tests/api_resources/test_data_exports.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import DataExport +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import DataExport base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_export.py b/tests/api_resources/test_export.py index b8e6be39..800fc46e 100644 --- a/tests/api_resources/test_export.py +++ b/tests/api_resources/test_export.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import DataExport +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import DataExport base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestExport: @parametrize def test_method_cancel(self, client: Intercom) -> None: export = client.export.cancel( - "string", + job_identifier="job_identifier", ) assert_matches_type(DataExport, export, path=["response"]) @parametrize def test_method_cancel_with_all_params(self, client: Intercom) -> None: export = client.export.cancel( - "string", + job_identifier="job_identifier", intercom_version="2.11", ) assert_matches_type(DataExport, export, path=["response"]) @@ -35,7 +35,7 @@ def test_method_cancel_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_cancel(self, client: Intercom) -> None: response = client.export.with_raw_response.cancel( - "string", + job_identifier="job_identifier", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_cancel(self, client: Intercom) -> None: @parametrize def test_streaming_response_cancel(self, client: Intercom) -> None: with client.export.with_streaming_response.cancel( - "string", + job_identifier="job_identifier", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_cancel(self, client: Intercom) -> None: def test_path_params_cancel(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_identifier` but received ''"): client.export.with_raw_response.cancel( - "", + job_identifier="", ) @@ -70,14 +70,14 @@ class TestAsyncExport: @parametrize async def test_method_cancel(self, async_client: AsyncIntercom) -> None: export = await async_client.export.cancel( - "string", + job_identifier="job_identifier", ) assert_matches_type(DataExport, export, path=["response"]) @parametrize async def test_method_cancel_with_all_params(self, async_client: AsyncIntercom) -> None: export = await async_client.export.cancel( - "string", + job_identifier="job_identifier", intercom_version="2.11", ) assert_matches_type(DataExport, export, path=["response"]) @@ -85,7 +85,7 @@ async def test_method_cancel_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIntercom) -> None: response = await async_client.export.with_raw_response.cancel( - "string", + job_identifier="job_identifier", ) assert response.is_closed is True @@ -96,7 +96,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIntercom) -> None: async with async_client.export.with_streaming_response.cancel( - "string", + job_identifier="job_identifier", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,5 +110,5 @@ async def test_streaming_response_cancel(self, async_client: AsyncIntercom) -> N async def test_path_params_cancel(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `job_identifier` but received ''"): await async_client.export.with_raw_response.cancel( - "", + job_identifier="", ) diff --git a/tests/api_resources/test_me.py b/tests/api_resources/test_me.py index 69476b6c..26bf9908 100644 --- a/tests/api_resources/test_me.py +++ b/tests/api_resources/test_me.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import AdminWithApp +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import AdminWithApp base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_messages.py b/tests/api_resources/test_messages.py index af481447..110bd28b 100644 --- a/tests/api_resources/test_messages.py +++ b/tests/api_resources/test_messages.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Message +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Message base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_notes.py b/tests/api_resources/test_notes.py index daf0adba..0f11138c 100644 --- a/tests/api_resources/test_notes.py +++ b/tests/api_resources/test_notes.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Note +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Note base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestNotes: @parametrize def test_method_retrieve(self, client: Intercom) -> None: note = client.notes.retrieve( - 0, + id=1, ) assert_matches_type(Note, note, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: note = client.notes.retrieve( - 0, + id=1, intercom_version="2.11", ) assert_matches_type(Note, note, path=["response"]) @@ -35,7 +35,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.notes.with_raw_response.retrieve( - 0, + id=1, ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.notes.with_streaming_response.retrieve( - 0, + id=1, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -63,14 +63,14 @@ class TestAsyncNotes: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: note = await async_client.notes.retrieve( - 0, + id=1, ) assert_matches_type(Note, note, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: note = await async_client.notes.retrieve( - 0, + id=1, intercom_version="2.11", ) assert_matches_type(Note, note, path=["response"]) @@ -78,7 +78,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.notes.with_raw_response.retrieve( - 0, + id=1, ) assert response.is_closed is True @@ -89,7 +89,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.notes.with_streaming_response.retrieve( - 0, + id=1, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_phone_call_redirects.py b/tests/api_resources/test_phone_call_redirects.py index 7b9ffb6e..0f3cc13e 100644 --- a/tests/api_resources/test_phone_call_redirects.py +++ b/tests/api_resources/test_phone_call_redirects.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import PhoneSwitch +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import PhoneSwitch base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_segments.py b/tests/api_resources/test_segments.py index e580b46f..ceb503b4 100644 --- a/tests/api_resources/test_segments.py +++ b/tests/api_resources/test_segments.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import Segment, SegmentList +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import Segment, SegmentList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestSegments: @parametrize def test_method_retrieve(self, client: Intercom) -> None: segment = client.segments.retrieve( - "string", + id="123", ) assert_matches_type(Segment, segment, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: segment = client.segments.retrieve( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Segment, segment, path=["response"]) @@ -35,7 +35,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.segments.with_raw_response.retrieve( - "string", + id="123", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.segments.with_streaming_response.retrieve( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: def test_path_params_retrieve(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.segments.with_raw_response.retrieve( - "", + id="", ) @parametrize @@ -103,14 +103,14 @@ class TestAsyncSegments: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: segment = await async_client.segments.retrieve( - "string", + id="123", ) assert_matches_type(Segment, segment, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: segment = await async_client.segments.retrieve( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Segment, segment, path=["response"]) @@ -118,7 +118,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.segments.with_raw_response.retrieve( - "string", + id="123", ) assert response.is_closed is True @@ -129,7 +129,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.segments.with_streaming_response.retrieve( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -143,7 +143,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.segments.with_raw_response.retrieve( - "", + id="", ) @parametrize diff --git a/tests/api_resources/test_subscription_types.py b/tests/api_resources/test_subscription_types.py index 598ab2ea..1129e242 100644 --- a/tests/api_resources/test_subscription_types.py +++ b/tests/api_resources/test_subscription_types.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import SubscriptionTypeList +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import SubscriptionTypeList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_tags.py b/tests/api_resources/test_tags.py index f00d38ca..5c125160 100644 --- a/tests/api_resources/test_tags.py +++ b/tests/api_resources/test_tags.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Tag, TagList +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Tag, TagList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestTags: @parametrize def test_method_retrieve(self, client: Intercom) -> None: tag = client.tags.retrieve( - "string", + id="123", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: tag = client.tags.retrieve( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -35,7 +35,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.tags.with_raw_response.retrieve( - "string", + id="123", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.tags.with_streaming_response.retrieve( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: def test_path_params_retrieve(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.tags.with_raw_response.retrieve( - "", + id="", ) @parametrize @@ -98,14 +98,14 @@ def test_streaming_response_list(self, client: Intercom) -> None: @parametrize def test_method_delete(self, client: Intercom) -> None: tag = client.tags.delete( - "string", + id="123", ) assert tag is None @parametrize def test_method_delete_with_all_params(self, client: Intercom) -> None: tag = client.tags.delete( - "string", + id="123", intercom_version="2.11", ) assert tag is None @@ -113,7 +113,7 @@ def test_method_delete_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_delete(self, client: Intercom) -> None: response = client.tags.with_raw_response.delete( - "string", + id="123", ) assert response.is_closed is True @@ -124,7 +124,7 @@ def test_raw_response_delete(self, client: Intercom) -> None: @parametrize def test_streaming_response_delete(self, client: Intercom) -> None: with client.tags.with_streaming_response.delete( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -138,7 +138,7 @@ def test_streaming_response_delete(self, client: Intercom) -> None: def test_path_params_delete(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.tags.with_raw_response.delete( - "", + id="", ) @parametrize @@ -350,14 +350,14 @@ class TestAsyncTags: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: tag = await async_client.tags.retrieve( - "string", + id="123", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: tag = await async_client.tags.retrieve( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -365,7 +365,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.tags.with_raw_response.retrieve( - "string", + id="123", ) assert response.is_closed is True @@ -376,7 +376,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.tags.with_streaming_response.retrieve( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -390,7 +390,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.tags.with_raw_response.retrieve( - "", + id="", ) @parametrize @@ -428,14 +428,14 @@ async def test_streaming_response_list(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_delete(self, async_client: AsyncIntercom) -> None: tag = await async_client.tags.delete( - "string", + id="123", ) assert tag is None @parametrize async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) -> None: tag = await async_client.tags.delete( - "string", + id="123", intercom_version="2.11", ) assert tag is None @@ -443,7 +443,7 @@ async def test_method_delete_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: response = await async_client.tags.with_raw_response.delete( - "string", + id="123", ) assert response.is_closed is True @@ -454,7 +454,7 @@ async def test_raw_response_delete(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> None: async with async_client.tags.with_streaming_response.delete( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -468,7 +468,7 @@ async def test_streaming_response_delete(self, async_client: AsyncIntercom) -> N async def test_path_params_delete(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.tags.with_raw_response.delete( - "", + id="", ) @parametrize diff --git a/tests/api_resources/test_teams.py b/tests/api_resources/test_teams.py index 5a6ec1ca..2dc423e3 100644 --- a/tests/api_resources/test_teams.py +++ b/tests/api_resources/test_teams.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import Team, TeamList +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import Team, TeamList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,14 +20,14 @@ class TestTeams: @parametrize def test_method_retrieve(self, client: Intercom) -> None: team = client.teams.retrieve( - "string", + id="123", ) assert_matches_type(Team, team, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: team = client.teams.retrieve( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Team, team, path=["response"]) @@ -35,7 +35,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.teams.with_raw_response.retrieve( - "string", + id="123", ) assert response.is_closed is True @@ -46,7 +46,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.teams.with_streaming_response.retrieve( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,7 +60,7 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: def test_path_params_retrieve(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.teams.with_raw_response.retrieve( - "", + id="", ) @parametrize @@ -102,14 +102,14 @@ class TestAsyncTeams: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: team = await async_client.teams.retrieve( - "string", + id="123", ) assert_matches_type(Team, team, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: team = await async_client.teams.retrieve( - "string", + id="123", intercom_version="2.11", ) assert_matches_type(Team, team, path=["response"]) @@ -117,7 +117,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.teams.with_raw_response.retrieve( - "string", + id="123", ) assert response.is_closed is True @@ -128,7 +128,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.teams.with_streaming_response.retrieve( - "string", + id="123", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -142,7 +142,7 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.teams.with_raw_response.retrieve( - "", + id="", ) @parametrize diff --git a/tests/api_resources/test_ticket_types.py b/tests/api_resources/test_ticket_types.py index 84d524a0..1b3a80ec 100644 --- a/tests/api_resources/test_ticket_types.py +++ b/tests/api_resources/test_ticket_types.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import TicketType, TicketTypeList +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import TicketType, TicketTypeList base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -63,14 +63,14 @@ def test_streaming_response_create(self, client: Intercom) -> None: @parametrize def test_method_retrieve(self, client: Intercom) -> None: ticket_type = client.ticket_types.retrieve( - "string", + id="id", ) assert_matches_type(Optional[TicketType], ticket_type, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: ticket_type = client.ticket_types.retrieve( - "string", + id="id", intercom_version="2.11", ) assert_matches_type(Optional[TicketType], ticket_type, path=["response"]) @@ -78,7 +78,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.ticket_types.with_raw_response.retrieve( - "string", + id="id", ) assert response.is_closed is True @@ -89,7 +89,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.ticket_types.with_streaming_response.retrieve( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -103,20 +103,20 @@ def test_streaming_response_retrieve(self, client: Intercom) -> None: def test_path_params_retrieve(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ticket_types.with_raw_response.retrieve( - "", + id="", ) @parametrize def test_method_update(self, client: Intercom) -> None: ticket_type = client.ticket_types.update( - "string", + id="id", ) assert_matches_type(Optional[TicketType], ticket_type, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Intercom) -> None: ticket_type = client.ticket_types.update( - "string", + id="id", archived=False, category="Customer", description="A bug has been occured", @@ -130,7 +130,7 @@ def test_method_update_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update(self, client: Intercom) -> None: response = client.ticket_types.with_raw_response.update( - "string", + id="id", ) assert response.is_closed is True @@ -141,7 +141,7 @@ def test_raw_response_update(self, client: Intercom) -> None: @parametrize def test_streaming_response_update(self, client: Intercom) -> None: with client.ticket_types.with_streaming_response.update( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,7 +155,7 @@ def test_streaming_response_update(self, client: Intercom) -> None: def test_path_params_update(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ticket_types.with_raw_response.update( - "", + id="", ) @parametrize @@ -240,14 +240,14 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: ticket_type = await async_client.ticket_types.retrieve( - "string", + id="id", ) assert_matches_type(Optional[TicketType], ticket_type, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: ticket_type = await async_client.ticket_types.retrieve( - "string", + id="id", intercom_version="2.11", ) assert_matches_type(Optional[TicketType], ticket_type, path=["response"]) @@ -255,7 +255,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.ticket_types.with_raw_response.retrieve( - "string", + id="id", ) assert response.is_closed is True @@ -266,7 +266,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.ticket_types.with_streaming_response.retrieve( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -280,20 +280,20 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> async def test_path_params_retrieve(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ticket_types.with_raw_response.retrieve( - "", + id="", ) @parametrize async def test_method_update(self, async_client: AsyncIntercom) -> None: ticket_type = await async_client.ticket_types.update( - "string", + id="id", ) assert_matches_type(Optional[TicketType], ticket_type, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIntercom) -> None: ticket_type = await async_client.ticket_types.update( - "string", + id="id", archived=False, category="Customer", description="A bug has been occured", @@ -307,7 +307,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: response = await async_client.ticket_types.with_raw_response.update( - "string", + id="id", ) assert response.is_closed is True @@ -318,7 +318,7 @@ async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIntercom) -> None: async with async_client.ticket_types.with_streaming_response.update( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -332,7 +332,7 @@ async def test_streaming_response_update(self, async_client: AsyncIntercom) -> N async def test_path_params_update(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ticket_types.with_raw_response.update( - "", + id="", ) @parametrize diff --git a/tests/api_resources/test_tickets.py b/tests/api_resources/test_tickets.py index e6975354..30be1e0b 100644 --- a/tests/api_resources/test_tickets.py +++ b/tests/api_resources/test_tickets.py @@ -8,12 +8,12 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import ( +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import ( TicketList, TicketReply, ) -from python_minus_intercom.types.shared import Ticket +from python_intercom.types.shared import Ticket base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,7 @@ class TestTickets: def test_method_create(self, client: Intercom) -> None: ticket = client.tickets.create( contacts=[{"id": "6657af026abd0167d9419def"}], - ticket_type_id="string", + ticket_type_id="ticket_type_id", ) assert_matches_type(Optional[Ticket], ticket, path=["response"]) @@ -33,7 +33,7 @@ def test_method_create(self, client: Intercom) -> None: def test_method_create_with_all_params(self, client: Intercom) -> None: ticket = client.tickets.create( contacts=[{"id": "6657af026abd0167d9419def"}], - ticket_type_id="string", + ticket_type_id="ticket_type_id", company_id="1234", created_at=1590000000, ticket_attributes={ @@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: def test_raw_response_create(self, client: Intercom) -> None: response = client.tickets.with_raw_response.create( contacts=[{"id": "6657af026abd0167d9419def"}], - ticket_type_id="string", + ticket_type_id="ticket_type_id", ) assert response.is_closed is True @@ -60,7 +60,7 @@ def test_raw_response_create(self, client: Intercom) -> None: def test_streaming_response_create(self, client: Intercom) -> None: with client.tickets.with_streaming_response.create( contacts=[{"id": "6657af026abd0167d9419def"}], - ticket_type_id="string", + ticket_type_id="ticket_type_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -73,8 +73,8 @@ def test_streaming_response_create(self, client: Intercom) -> None: @parametrize def test_method_reply_overload_1(self, client: Intercom) -> None: ticket = client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -83,8 +83,8 @@ def test_method_reply_overload_1(self, client: Intercom) -> None: @parametrize def test_method_reply_with_all_params_overload_1(self, client: Intercom) -> None: ticket = client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -96,8 +96,8 @@ def test_method_reply_with_all_params_overload_1(self, client: Intercom) -> None @parametrize def test_raw_response_reply_overload_1(self, client: Intercom) -> None: response = client.tickets.with_raw_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -110,8 +110,8 @@ def test_raw_response_reply_overload_1(self, client: Intercom) -> None: @parametrize def test_streaming_response_reply_overload_1(self, client: Intercom) -> None: with client.tickets.with_streaming_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) as response: @@ -127,8 +127,8 @@ def test_streaming_response_reply_overload_1(self, client: Intercom) -> None: def test_path_params_reply_overload_1(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.tickets.with_raw_response.reply( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -136,8 +136,8 @@ def test_path_params_reply_overload_1(self, client: Intercom) -> None: @parametrize def test_method_reply_overload_2(self, client: Intercom) -> None: ticket = client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -146,8 +146,8 @@ def test_method_reply_overload_2(self, client: Intercom) -> None: @parametrize def test_method_reply_with_all_params_overload_2(self, client: Intercom) -> None: ticket = client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -159,8 +159,8 @@ def test_method_reply_with_all_params_overload_2(self, client: Intercom) -> None @parametrize def test_raw_response_reply_overload_2(self, client: Intercom) -> None: response = client.tickets.with_raw_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -173,8 +173,8 @@ def test_raw_response_reply_overload_2(self, client: Intercom) -> None: @parametrize def test_streaming_response_reply_overload_2(self, client: Intercom) -> None: with client.tickets.with_streaming_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) as response: @@ -190,8 +190,8 @@ def test_streaming_response_reply_overload_2(self, client: Intercom) -> None: def test_path_params_reply_overload_2(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.tickets.with_raw_response.reply( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -199,8 +199,8 @@ def test_path_params_reply_overload_2(self, client: Intercom) -> None: @parametrize def test_method_reply_overload_3(self, client: Intercom) -> None: ticket = client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -209,8 +209,8 @@ def test_method_reply_overload_3(self, client: Intercom) -> None: @parametrize def test_method_reply_with_all_params_overload_3(self, client: Intercom) -> None: ticket = client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -222,8 +222,8 @@ def test_method_reply_with_all_params_overload_3(self, client: Intercom) -> None @parametrize def test_raw_response_reply_overload_3(self, client: Intercom) -> None: response = client.tickets.with_raw_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -236,8 +236,8 @@ def test_raw_response_reply_overload_3(self, client: Intercom) -> None: @parametrize def test_streaming_response_reply_overload_3(self, client: Intercom) -> None: with client.tickets.with_streaming_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) as response: @@ -253,8 +253,8 @@ def test_streaming_response_reply_overload_3(self, client: Intercom) -> None: def test_path_params_reply_overload_3(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.tickets.with_raw_response.reply( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -262,7 +262,7 @@ def test_path_params_reply_overload_3(self, client: Intercom) -> None: @parametrize def test_method_reply_overload_4(self, client: Intercom) -> None: ticket = client.tickets.reply( - "123", + id="123", admin_id="3156780", message_type="comment", type="admin", @@ -272,7 +272,7 @@ def test_method_reply_overload_4(self, client: Intercom) -> None: @parametrize def test_method_reply_with_all_params_overload_4(self, client: Intercom) -> None: ticket = client.tickets.reply( - "123", + id="123", admin_id="3156780", message_type="comment", type="admin", @@ -281,15 +281,15 @@ def test_method_reply_with_all_params_overload_4(self, client: Intercom) -> None created_at=1590000000, reply_options=[ { - "text": "string", + "text": "text", "uuid": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, { - "text": "string", + "text": "text", "uuid": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, { - "text": "string", + "text": "text", "uuid": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, ], @@ -300,7 +300,7 @@ def test_method_reply_with_all_params_overload_4(self, client: Intercom) -> None @parametrize def test_raw_response_reply_overload_4(self, client: Intercom) -> None: response = client.tickets.with_raw_response.reply( - "123", + id="123", admin_id="3156780", message_type="comment", type="admin", @@ -314,7 +314,7 @@ def test_raw_response_reply_overload_4(self, client: Intercom) -> None: @parametrize def test_streaming_response_reply_overload_4(self, client: Intercom) -> None: with client.tickets.with_streaming_response.reply( - "123", + id="123", admin_id="3156780", message_type="comment", type="admin", @@ -331,7 +331,7 @@ def test_streaming_response_reply_overload_4(self, client: Intercom) -> None: def test_path_params_reply_overload_4(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.tickets.with_raw_response.reply( - "", + id="", admin_id="3156780", message_type="comment", type="admin", @@ -340,14 +340,14 @@ def test_path_params_reply_overload_4(self, client: Intercom) -> None: @parametrize def test_method_retrieve_by_id(self, client: Intercom) -> None: ticket = client.tickets.retrieve_by_id( - "string", + id="id", ) assert_matches_type(Optional[Ticket], ticket, path=["response"]) @parametrize def test_method_retrieve_by_id_with_all_params(self, client: Intercom) -> None: ticket = client.tickets.retrieve_by_id( - "string", + id="id", intercom_version="2.11", ) assert_matches_type(Optional[Ticket], ticket, path=["response"]) @@ -355,7 +355,7 @@ def test_method_retrieve_by_id_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve_by_id(self, client: Intercom) -> None: response = client.tickets.with_raw_response.retrieve_by_id( - "string", + id="id", ) assert response.is_closed is True @@ -366,7 +366,7 @@ def test_raw_response_retrieve_by_id(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve_by_id(self, client: Intercom) -> None: with client.tickets.with_streaming_response.retrieve_by_id( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -380,7 +380,7 @@ def test_streaming_response_retrieve_by_id(self, client: Intercom) -> None: def test_path_params_retrieve_by_id(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.tickets.with_raw_response.retrieve_by_id( - "", + id="", ) @parametrize @@ -396,7 +396,7 @@ def test_method_search_with_all_params(self, client: Intercom) -> None: query={ "field": "created_at", "operator": "=", - "value": "string", + "value": "value", }, pagination={ "per_page": 5, @@ -433,14 +433,14 @@ def test_streaming_response_search(self, client: Intercom) -> None: @parametrize def test_method_update_by_id(self, client: Intercom) -> None: ticket = client.tickets.update_by_id( - "string", + id="id", ) assert_matches_type(Optional[Ticket], ticket, path=["response"]) @parametrize def test_method_update_by_id_with_all_params(self, client: Intercom) -> None: ticket = client.tickets.update_by_id( - "string", + id="id", assignment={ "admin_id": "991268839", "assignee_id": "991268841", @@ -460,7 +460,7 @@ def test_method_update_by_id_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update_by_id(self, client: Intercom) -> None: response = client.tickets.with_raw_response.update_by_id( - "string", + id="id", ) assert response.is_closed is True @@ -471,7 +471,7 @@ def test_raw_response_update_by_id(self, client: Intercom) -> None: @parametrize def test_streaming_response_update_by_id(self, client: Intercom) -> None: with client.tickets.with_streaming_response.update_by_id( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -485,7 +485,7 @@ def test_streaming_response_update_by_id(self, client: Intercom) -> None: def test_path_params_update_by_id(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.tickets.with_raw_response.update_by_id( - "", + id="", ) @@ -496,7 +496,7 @@ class TestAsyncTickets: async def test_method_create(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.create( contacts=[{"id": "6657af026abd0167d9419def"}], - ticket_type_id="string", + ticket_type_id="ticket_type_id", ) assert_matches_type(Optional[Ticket], ticket, path=["response"]) @@ -504,7 +504,7 @@ async def test_method_create(self, async_client: AsyncIntercom) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.create( contacts=[{"id": "6657af026abd0167d9419def"}], - ticket_type_id="string", + ticket_type_id="ticket_type_id", company_id="1234", created_at=1590000000, ticket_attributes={ @@ -519,7 +519,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.tickets.with_raw_response.create( contacts=[{"id": "6657af026abd0167d9419def"}], - ticket_type_id="string", + ticket_type_id="ticket_type_id", ) assert response.is_closed is True @@ -531,7 +531,7 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.tickets.with_streaming_response.create( contacts=[{"id": "6657af026abd0167d9419def"}], - ticket_type_id="string", + ticket_type_id="ticket_type_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -544,8 +544,8 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_reply_overload_1(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -554,8 +554,8 @@ async def test_method_reply_overload_1(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_reply_with_all_params_overload_1(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -567,8 +567,8 @@ async def test_method_reply_with_all_params_overload_1(self, async_client: Async @parametrize async def test_raw_response_reply_overload_1(self, async_client: AsyncIntercom) -> None: response = await async_client.tickets.with_raw_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -581,8 +581,8 @@ async def test_raw_response_reply_overload_1(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_reply_overload_1(self, async_client: AsyncIntercom) -> None: async with async_client.tickets.with_streaming_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) as response: @@ -598,8 +598,8 @@ async def test_streaming_response_reply_overload_1(self, async_client: AsyncInte async def test_path_params_reply_overload_1(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.tickets.with_raw_response.reply( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -607,8 +607,8 @@ async def test_path_params_reply_overload_1(self, async_client: AsyncIntercom) - @parametrize async def test_method_reply_overload_2(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -617,8 +617,8 @@ async def test_method_reply_overload_2(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_reply_with_all_params_overload_2(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -630,8 +630,8 @@ async def test_method_reply_with_all_params_overload_2(self, async_client: Async @parametrize async def test_raw_response_reply_overload_2(self, async_client: AsyncIntercom) -> None: response = await async_client.tickets.with_raw_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -644,8 +644,8 @@ async def test_raw_response_reply_overload_2(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_reply_overload_2(self, async_client: AsyncIntercom) -> None: async with async_client.tickets.with_streaming_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) as response: @@ -661,8 +661,8 @@ async def test_streaming_response_reply_overload_2(self, async_client: AsyncInte async def test_path_params_reply_overload_2(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.tickets.with_raw_response.reply( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -670,8 +670,8 @@ async def test_path_params_reply_overload_2(self, async_client: AsyncIntercom) - @parametrize async def test_method_reply_overload_3(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -680,8 +680,8 @@ async def test_method_reply_overload_3(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_reply_with_all_params_overload_3(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", attachment_urls=["https://example.com", "https://example.com", "https://example.com"], @@ -693,8 +693,8 @@ async def test_method_reply_with_all_params_overload_3(self, async_client: Async @parametrize async def test_raw_response_reply_overload_3(self, async_client: AsyncIntercom) -> None: response = await async_client.tickets.with_raw_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) @@ -707,8 +707,8 @@ async def test_raw_response_reply_overload_3(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_reply_overload_3(self, async_client: AsyncIntercom) -> None: async with async_client.tickets.with_streaming_response.reply( - "123", - body="string", + id="123", + body="body", message_type="comment", type="user", ) as response: @@ -724,8 +724,8 @@ async def test_streaming_response_reply_overload_3(self, async_client: AsyncInte async def test_path_params_reply_overload_3(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.tickets.with_raw_response.reply( - "", - body="string", + id="", + body="body", message_type="comment", type="user", ) @@ -733,7 +733,7 @@ async def test_path_params_reply_overload_3(self, async_client: AsyncIntercom) - @parametrize async def test_method_reply_overload_4(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.reply( - "123", + id="123", admin_id="3156780", message_type="comment", type="admin", @@ -743,7 +743,7 @@ async def test_method_reply_overload_4(self, async_client: AsyncIntercom) -> Non @parametrize async def test_method_reply_with_all_params_overload_4(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.reply( - "123", + id="123", admin_id="3156780", message_type="comment", type="admin", @@ -752,15 +752,15 @@ async def test_method_reply_with_all_params_overload_4(self, async_client: Async created_at=1590000000, reply_options=[ { - "text": "string", + "text": "text", "uuid": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, { - "text": "string", + "text": "text", "uuid": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, { - "text": "string", + "text": "text", "uuid": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, ], @@ -771,7 +771,7 @@ async def test_method_reply_with_all_params_overload_4(self, async_client: Async @parametrize async def test_raw_response_reply_overload_4(self, async_client: AsyncIntercom) -> None: response = await async_client.tickets.with_raw_response.reply( - "123", + id="123", admin_id="3156780", message_type="comment", type="admin", @@ -785,7 +785,7 @@ async def test_raw_response_reply_overload_4(self, async_client: AsyncIntercom) @parametrize async def test_streaming_response_reply_overload_4(self, async_client: AsyncIntercom) -> None: async with async_client.tickets.with_streaming_response.reply( - "123", + id="123", admin_id="3156780", message_type="comment", type="admin", @@ -802,7 +802,7 @@ async def test_streaming_response_reply_overload_4(self, async_client: AsyncInte async def test_path_params_reply_overload_4(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.tickets.with_raw_response.reply( - "", + id="", admin_id="3156780", message_type="comment", type="admin", @@ -811,14 +811,14 @@ async def test_path_params_reply_overload_4(self, async_client: AsyncIntercom) - @parametrize async def test_method_retrieve_by_id(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.retrieve_by_id( - "string", + id="id", ) assert_matches_type(Optional[Ticket], ticket, path=["response"]) @parametrize async def test_method_retrieve_by_id_with_all_params(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.retrieve_by_id( - "string", + id="id", intercom_version="2.11", ) assert_matches_type(Optional[Ticket], ticket, path=["response"]) @@ -826,7 +826,7 @@ async def test_method_retrieve_by_id_with_all_params(self, async_client: AsyncIn @parametrize async def test_raw_response_retrieve_by_id(self, async_client: AsyncIntercom) -> None: response = await async_client.tickets.with_raw_response.retrieve_by_id( - "string", + id="id", ) assert response.is_closed is True @@ -837,7 +837,7 @@ async def test_raw_response_retrieve_by_id(self, async_client: AsyncIntercom) -> @parametrize async def test_streaming_response_retrieve_by_id(self, async_client: AsyncIntercom) -> None: async with async_client.tickets.with_streaming_response.retrieve_by_id( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -851,7 +851,7 @@ async def test_streaming_response_retrieve_by_id(self, async_client: AsyncInterc async def test_path_params_retrieve_by_id(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.tickets.with_raw_response.retrieve_by_id( - "", + id="", ) @parametrize @@ -867,7 +867,7 @@ async def test_method_search_with_all_params(self, async_client: AsyncIntercom) query={ "field": "created_at", "operator": "=", - "value": "string", + "value": "value", }, pagination={ "per_page": 5, @@ -904,14 +904,14 @@ async def test_streaming_response_search(self, async_client: AsyncIntercom) -> N @parametrize async def test_method_update_by_id(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.update_by_id( - "string", + id="id", ) assert_matches_type(Optional[Ticket], ticket, path=["response"]) @parametrize async def test_method_update_by_id_with_all_params(self, async_client: AsyncIntercom) -> None: ticket = await async_client.tickets.update_by_id( - "string", + id="id", assignment={ "admin_id": "991268839", "assignee_id": "991268841", @@ -931,7 +931,7 @@ async def test_method_update_by_id_with_all_params(self, async_client: AsyncInte @parametrize async def test_raw_response_update_by_id(self, async_client: AsyncIntercom) -> None: response = await async_client.tickets.with_raw_response.update_by_id( - "string", + id="id", ) assert response.is_closed is True @@ -942,7 +942,7 @@ async def test_raw_response_update_by_id(self, async_client: AsyncIntercom) -> N @parametrize async def test_streaming_response_update_by_id(self, async_client: AsyncIntercom) -> None: async with async_client.tickets.with_streaming_response.update_by_id( - "string", + id="id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -956,5 +956,5 @@ async def test_streaming_response_update_by_id(self, async_client: AsyncIntercom async def test_path_params_update_by_id(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.tickets.with_raw_response.update_by_id( - "", + id="", ) diff --git a/tests/api_resources/test_visitors.py b/tests/api_resources/test_visitors.py index f40a64dc..f9cec372 100644 --- a/tests/api_resources/test_visitors.py +++ b/tests/api_resources/test_visitors.py @@ -8,9 +8,9 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types import Visitor -from python_minus_intercom.types.shared import Contact +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types import Visitor +from python_intercom.types.shared import Contact base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -21,14 +21,14 @@ class TestVisitors: @parametrize def test_method_retrieve(self, client: Intercom) -> None: visitor = client.visitors.retrieve( - user_id="string", + user_id="user_id", ) assert_matches_type(Optional[Visitor], visitor, path=["response"]) @parametrize def test_method_retrieve_with_all_params(self, client: Intercom) -> None: visitor = client.visitors.retrieve( - user_id="string", + user_id="user_id", intercom_version="2.11", ) assert_matches_type(Optional[Visitor], visitor, path=["response"]) @@ -36,7 +36,7 @@ def test_method_retrieve_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_retrieve(self, client: Intercom) -> None: response = client.visitors.with_raw_response.retrieve( - user_id="string", + user_id="user_id", ) assert response.is_closed is True @@ -47,7 +47,7 @@ def test_raw_response_retrieve(self, client: Intercom) -> None: @parametrize def test_streaming_response_retrieve(self, client: Intercom) -> None: with client.visitors.with_streaming_response.retrieve( - user_id="string", + user_id="user_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -197,14 +197,14 @@ class TestAsyncVisitors: @parametrize async def test_method_retrieve(self, async_client: AsyncIntercom) -> None: visitor = await async_client.visitors.retrieve( - user_id="string", + user_id="user_id", ) assert_matches_type(Optional[Visitor], visitor, path=["response"]) @parametrize async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom) -> None: visitor = await async_client.visitors.retrieve( - user_id="string", + user_id="user_id", intercom_version="2.11", ) assert_matches_type(Optional[Visitor], visitor, path=["response"]) @@ -212,7 +212,7 @@ async def test_method_retrieve_with_all_params(self, async_client: AsyncIntercom @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: response = await async_client.visitors.with_raw_response.retrieve( - user_id="string", + user_id="user_id", ) assert response.is_closed is True @@ -223,7 +223,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIntercom) -> None: async with async_client.visitors.with_streaming_response.retrieve( - user_id="string", + user_id="user_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/ticket_types/test_attributes.py b/tests/api_resources/ticket_types/test_attributes.py index a00c8ff6..4cd9cd2a 100644 --- a/tests/api_resources/ticket_types/test_attributes.py +++ b/tests/api_resources/ticket_types/test_attributes.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import TicketTypeAttribute +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import TicketTypeAttribute base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,7 +20,7 @@ class TestAttributes: @parametrize def test_method_create(self, client: Intercom) -> None: attribute = client.ticket_types.attributes.create( - "string", + ticket_type_id="ticket_type_id", data_type="string", description="Attribute Description", name="Attribute Title", @@ -30,7 +30,7 @@ def test_method_create(self, client: Intercom) -> None: @parametrize def test_method_create_with_all_params(self, client: Intercom) -> None: attribute = client.ticket_types.attributes.create( - "string", + ticket_type_id="ticket_type_id", data_type="string", description="Attribute Description", name="Attribute Title", @@ -48,7 +48,7 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_create(self, client: Intercom) -> None: response = client.ticket_types.attributes.with_raw_response.create( - "string", + ticket_type_id="ticket_type_id", data_type="string", description="Attribute Description", name="Attribute Title", @@ -62,7 +62,7 @@ def test_raw_response_create(self, client: Intercom) -> None: @parametrize def test_streaming_response_create(self, client: Intercom) -> None: with client.ticket_types.attributes.with_streaming_response.create( - "string", + ticket_type_id="ticket_type_id", data_type="string", description="Attribute Description", name="Attribute Title", @@ -79,7 +79,7 @@ def test_streaming_response_create(self, client: Intercom) -> None: def test_path_params_create(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ticket_type_id` but received ''"): client.ticket_types.attributes.with_raw_response.create( - "", + ticket_type_id="", data_type="string", description="Attribute Description", name="Attribute Title", @@ -88,16 +88,16 @@ def test_path_params_create(self, client: Intercom) -> None: @parametrize def test_method_update(self, client: Intercom) -> None: attribute = client.ticket_types.attributes.update( - "string", - ticket_type_id="string", + id="id", + ticket_type_id="ticket_type_id", ) assert_matches_type(Optional[TicketTypeAttribute], attribute, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Intercom) -> None: attribute = client.ticket_types.attributes.update( - "string", - ticket_type_id="string", + id="id", + ticket_type_id="ticket_type_id", allow_multiple_values=False, archived=False, description="New Attribute Description", @@ -115,8 +115,8 @@ def test_method_update_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_update(self, client: Intercom) -> None: response = client.ticket_types.attributes.with_raw_response.update( - "string", - ticket_type_id="string", + id="id", + ticket_type_id="ticket_type_id", ) assert response.is_closed is True @@ -127,8 +127,8 @@ def test_raw_response_update(self, client: Intercom) -> None: @parametrize def test_streaming_response_update(self, client: Intercom) -> None: with client.ticket_types.attributes.with_streaming_response.update( - "string", - ticket_type_id="string", + id="id", + ticket_type_id="ticket_type_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -142,14 +142,14 @@ def test_streaming_response_update(self, client: Intercom) -> None: def test_path_params_update(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ticket_type_id` but received ''"): client.ticket_types.attributes.with_raw_response.update( - "string", + id="id", ticket_type_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.ticket_types.attributes.with_raw_response.update( - "", - ticket_type_id="string", + id="", + ticket_type_id="ticket_type_id", ) @@ -159,7 +159,7 @@ class TestAsyncAttributes: @parametrize async def test_method_create(self, async_client: AsyncIntercom) -> None: attribute = await async_client.ticket_types.attributes.create( - "string", + ticket_type_id="ticket_type_id", data_type="string", description="Attribute Description", name="Attribute Title", @@ -169,7 +169,7 @@ async def test_method_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: attribute = await async_client.ticket_types.attributes.create( - "string", + ticket_type_id="ticket_type_id", data_type="string", description="Attribute Description", name="Attribute Title", @@ -187,7 +187,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.ticket_types.attributes.with_raw_response.create( - "string", + ticket_type_id="ticket_type_id", data_type="string", description="Attribute Description", name="Attribute Title", @@ -201,7 +201,7 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.ticket_types.attributes.with_streaming_response.create( - "string", + ticket_type_id="ticket_type_id", data_type="string", description="Attribute Description", name="Attribute Title", @@ -218,7 +218,7 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N async def test_path_params_create(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ticket_type_id` but received ''"): await async_client.ticket_types.attributes.with_raw_response.create( - "", + ticket_type_id="", data_type="string", description="Attribute Description", name="Attribute Title", @@ -227,16 +227,16 @@ async def test_path_params_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_method_update(self, async_client: AsyncIntercom) -> None: attribute = await async_client.ticket_types.attributes.update( - "string", - ticket_type_id="string", + id="id", + ticket_type_id="ticket_type_id", ) assert_matches_type(Optional[TicketTypeAttribute], attribute, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIntercom) -> None: attribute = await async_client.ticket_types.attributes.update( - "string", - ticket_type_id="string", + id="id", + ticket_type_id="ticket_type_id", allow_multiple_values=False, archived=False, description="New Attribute Description", @@ -254,8 +254,8 @@ async def test_method_update_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: response = await async_client.ticket_types.attributes.with_raw_response.update( - "string", - ticket_type_id="string", + id="id", + ticket_type_id="ticket_type_id", ) assert response.is_closed is True @@ -266,8 +266,8 @@ async def test_raw_response_update(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIntercom) -> None: async with async_client.ticket_types.attributes.with_streaming_response.update( - "string", - ticket_type_id="string", + id="id", + ticket_type_id="ticket_type_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -281,12 +281,12 @@ async def test_streaming_response_update(self, async_client: AsyncIntercom) -> N async def test_path_params_update(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ticket_type_id` but received ''"): await async_client.ticket_types.attributes.with_raw_response.update( - "string", + id="id", ticket_type_id="", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.ticket_types.attributes.with_raw_response.update( - "", - ticket_type_id="string", + id="", + ticket_type_id="ticket_type_id", ) diff --git a/tests/api_resources/tickets/test_tags.py b/tests/api_resources/tickets/test_tags.py index 1ceda5b6..01e754a6 100644 --- a/tests/api_resources/tickets/test_tags.py +++ b/tests/api_resources/tickets/test_tags.py @@ -8,8 +8,8 @@ import pytest from tests.utils import assert_matches_type -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom.types.shared import Tag +from python_intercom import Intercom, AsyncIntercom +from python_intercom.types.shared import Tag base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -20,18 +20,18 @@ class TestTags: @parametrize def test_method_create(self, client: Intercom) -> None: tag = client.tickets.tags.create( - "string", - id="string", - admin_id="string", + ticket_id="64619700005694", + id="id", + admin_id="admin_id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Intercom) -> None: tag = client.tickets.tags.create( - "string", - id="string", - admin_id="string", + ticket_id="64619700005694", + id="id", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -39,9 +39,9 @@ def test_method_create_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_create(self, client: Intercom) -> None: response = client.tickets.tags.with_raw_response.create( - "string", - id="string", - admin_id="string", + ticket_id="64619700005694", + id="id", + admin_id="admin_id", ) assert response.is_closed is True @@ -52,9 +52,9 @@ def test_raw_response_create(self, client: Intercom) -> None: @parametrize def test_streaming_response_create(self, client: Intercom) -> None: with client.tickets.tags.with_streaming_response.create( - "string", - id="string", - admin_id="string", + ticket_id="64619700005694", + id="id", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -68,26 +68,26 @@ def test_streaming_response_create(self, client: Intercom) -> None: def test_path_params_create(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ticket_id` but received ''"): client.tickets.tags.with_raw_response.create( - "", - id="string", - admin_id="string", + ticket_id="", + id="id", + admin_id="admin_id", ) @parametrize def test_method_remove(self, client: Intercom) -> None: tag = client.tickets.tags.remove( - "string", + id="7522907", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize def test_method_remove_with_all_params(self, client: Intercom) -> None: tag = client.tickets.tags.remove( - "string", + id="7522907", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -95,9 +95,9 @@ def test_method_remove_with_all_params(self, client: Intercom) -> None: @parametrize def test_raw_response_remove(self, client: Intercom) -> None: response = client.tickets.tags.with_raw_response.remove( - "string", + id="7522907", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) assert response.is_closed is True @@ -108,9 +108,9 @@ def test_raw_response_remove(self, client: Intercom) -> None: @parametrize def test_streaming_response_remove(self, client: Intercom) -> None: with client.tickets.tags.with_streaming_response.remove( - "string", + id="7522907", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -124,16 +124,16 @@ def test_streaming_response_remove(self, client: Intercom) -> None: def test_path_params_remove(self, client: Intercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ticket_id` but received ''"): client.tickets.tags.with_raw_response.remove( - "string", + id="7522907", ticket_id="", - admin_id="string", + admin_id="admin_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): client.tickets.tags.with_raw_response.remove( - "", + id="", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) @@ -143,18 +143,18 @@ class TestAsyncTags: @parametrize async def test_method_create(self, async_client: AsyncIntercom) -> None: tag = await async_client.tickets.tags.create( - "string", - id="string", - admin_id="string", + ticket_id="64619700005694", + id="id", + admin_id="admin_id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIntercom) -> None: tag = await async_client.tickets.tags.create( - "string", - id="string", - admin_id="string", + ticket_id="64619700005694", + id="id", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -162,9 +162,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: response = await async_client.tickets.tags.with_raw_response.create( - "string", - id="string", - admin_id="string", + ticket_id="64619700005694", + id="id", + admin_id="admin_id", ) assert response.is_closed is True @@ -175,9 +175,9 @@ async def test_raw_response_create(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIntercom) -> None: async with async_client.tickets.tags.with_streaming_response.create( - "string", - id="string", - admin_id="string", + ticket_id="64619700005694", + id="id", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -191,26 +191,26 @@ async def test_streaming_response_create(self, async_client: AsyncIntercom) -> N async def test_path_params_create(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ticket_id` but received ''"): await async_client.tickets.tags.with_raw_response.create( - "", - id="string", - admin_id="string", + ticket_id="", + id="id", + admin_id="admin_id", ) @parametrize async def test_method_remove(self, async_client: AsyncIntercom) -> None: tag = await async_client.tickets.tags.remove( - "string", + id="7522907", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) assert_matches_type(Tag, tag, path=["response"]) @parametrize async def test_method_remove_with_all_params(self, async_client: AsyncIntercom) -> None: tag = await async_client.tickets.tags.remove( - "string", + id="7522907", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", intercom_version="2.11", ) assert_matches_type(Tag, tag, path=["response"]) @@ -218,9 +218,9 @@ async def test_method_remove_with_all_params(self, async_client: AsyncIntercom) @parametrize async def test_raw_response_remove(self, async_client: AsyncIntercom) -> None: response = await async_client.tickets.tags.with_raw_response.remove( - "string", + id="7522907", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) assert response.is_closed is True @@ -231,9 +231,9 @@ async def test_raw_response_remove(self, async_client: AsyncIntercom) -> None: @parametrize async def test_streaming_response_remove(self, async_client: AsyncIntercom) -> None: async with async_client.tickets.tags.with_streaming_response.remove( - "string", + id="7522907", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -247,14 +247,14 @@ async def test_streaming_response_remove(self, async_client: AsyncIntercom) -> N async def test_path_params_remove(self, async_client: AsyncIntercom) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ticket_id` but received ''"): await async_client.tickets.tags.with_raw_response.remove( - "string", + id="7522907", ticket_id="", - admin_id="string", + admin_id="admin_id", ) with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"): await async_client.tickets.tags.with_raw_response.remove( - "", + id="", ticket_id="64619700005694", - admin_id="string", + admin_id="admin_id", ) diff --git a/tests/conftest.py b/tests/conftest.py index 636aa1ec..47a8848e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,14 +7,14 @@ import pytest -from python_minus_intercom import Intercom, AsyncIntercom +from python_intercom import Intercom, AsyncIntercom if TYPE_CHECKING: from _pytest.fixtures import FixtureRequest pytest.register_assert_rewrite("tests.utils") -logging.getLogger("python_minus_intercom").setLevel(logging.DEBUG) +logging.getLogger("python_intercom").setLevel(logging.DEBUG) @pytest.fixture(scope="session") diff --git a/tests/test_client.py b/tests/test_client.py index 65df1e83..54509299 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -16,11 +16,11 @@ from respx import MockRouter from pydantic import ValidationError -from python_minus_intercom import Intercom, AsyncIntercom, APIResponseValidationError -from python_minus_intercom._models import BaseModel, FinalRequestOptions -from python_minus_intercom._constants import RAW_RESPONSE_HEADER -from python_minus_intercom._exceptions import IntercomError, APIStatusError, APITimeoutError, APIResponseValidationError -from python_minus_intercom._base_client import ( +from python_intercom import Intercom, AsyncIntercom, APIResponseValidationError +from python_intercom._models import BaseModel, FinalRequestOptions +from python_intercom._constants import RAW_RESPONSE_HEADER +from python_intercom._exceptions import IntercomError, APIStatusError, APITimeoutError, APIResponseValidationError +from python_intercom._base_client import ( DEFAULT_TIMEOUT, HTTPX_DEFAULT_TIMEOUT, BaseClient, @@ -227,10 +227,10 @@ def add_leak(leaks: list[tracemalloc.StatisticDiff], diff: tracemalloc.Statistic # to_raw_response_wrapper leaks through the @functools.wraps() decorator. # # removing the decorator fixes the leak for reasons we don't understand. - "python_minus_intercom/_legacy_response.py", - "python_minus_intercom/_response.py", + "python_intercom/_legacy_response.py", + "python_intercom/_response.py", # pydantic.BaseModel.model_dump || pydantic.BaseModel.dict leak memory for some reason. - "python_minus_intercom/_compat.py", + "python_intercom/_compat.py", # Standard library leaks we don't care about. "/logging/__init__.py", ] @@ -739,7 +739,7 @@ def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str calculated = client._calculate_retry_timeout(remaining_retries, options, headers) assert calculated == pytest.approx(timeout, 0.5 * 0.875) # pyright: ignore[reportUnknownMemberType] - @mock.patch("python_minus_intercom._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @mock.patch("python_intercom._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: respx_mock.get("/me").mock(side_effect=httpx.TimeoutException("Test timeout error")) @@ -749,7 +749,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No assert _get_open_connections(self.client) == 0 - @mock.patch("python_minus_intercom._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @mock.patch("python_intercom._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: respx_mock.get("/me").mock(return_value=httpx.Response(500)) @@ -938,10 +938,10 @@ def add_leak(leaks: list[tracemalloc.StatisticDiff], diff: tracemalloc.Statistic # to_raw_response_wrapper leaks through the @functools.wraps() decorator. # # removing the decorator fixes the leak for reasons we don't understand. - "python_minus_intercom/_legacy_response.py", - "python_minus_intercom/_response.py", + "python_intercom/_legacy_response.py", + "python_intercom/_response.py", # pydantic.BaseModel.model_dump || pydantic.BaseModel.dict leak memory for some reason. - "python_minus_intercom/_compat.py", + "python_intercom/_compat.py", # Standard library leaks we don't care about. "/logging/__init__.py", ] @@ -1454,7 +1454,7 @@ async def test_parse_retry_after_header(self, remaining_retries: int, retry_afte calculated = client._calculate_retry_timeout(remaining_retries, options, headers) assert calculated == pytest.approx(timeout, 0.5 * 0.875) # pyright: ignore[reportUnknownMemberType] - @mock.patch("python_minus_intercom._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @mock.patch("python_intercom._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: respx_mock.get("/me").mock(side_effect=httpx.TimeoutException("Test timeout error")) @@ -1464,7 +1464,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) assert _get_open_connections(self.client) == 0 - @mock.patch("python_minus_intercom._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @mock.patch("python_intercom._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> None: respx_mock.get("/me").mock(return_value=httpx.Response(500)) diff --git a/tests/test_deepcopy.py b/tests/test_deepcopy.py index 6bdcc7a7..dcb15e3c 100644 --- a/tests/test_deepcopy.py +++ b/tests/test_deepcopy.py @@ -1,4 +1,4 @@ -from python_minus_intercom._utils import deepcopy_minimal +from python_intercom._utils import deepcopy_minimal def assert_different_identities(obj1: object, obj2: object) -> None: diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index 478fc840..b0b8a8e4 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -4,8 +4,8 @@ import pytest -from python_minus_intercom._types import FileTypes -from python_minus_intercom._utils import extract_files +from python_intercom._types import FileTypes +from python_intercom._utils import extract_files def test_removes_files_from_input() -> None: diff --git a/tests/test_files.py b/tests/test_files.py index 25e7aa64..ded119e5 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -4,7 +4,7 @@ import pytest from dirty_equals import IsDict, IsList, IsBytes, IsTuple -from python_minus_intercom._files import to_httpx_files, async_to_httpx_files +from python_intercom._files import to_httpx_files, async_to_httpx_files readme_path = Path(__file__).parent.parent.joinpath("README.md") diff --git a/tests/test_models.py b/tests/test_models.py index 20c14a5f..5cdd56d1 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -7,9 +7,9 @@ import pydantic from pydantic import Field -from python_minus_intercom._utils import PropertyInfo -from python_minus_intercom._compat import PYDANTIC_V2, parse_obj, model_dump, model_json -from python_minus_intercom._models import BaseModel, construct_type +from python_intercom._utils import PropertyInfo +from python_intercom._compat import PYDANTIC_V2, parse_obj, model_dump, model_json +from python_intercom._models import BaseModel, construct_type class BasicModel(BaseModel): diff --git a/tests/test_qs.py b/tests/test_qs.py index 7c2c4daf..1c439d2f 100644 --- a/tests/test_qs.py +++ b/tests/test_qs.py @@ -4,7 +4,7 @@ import pytest -from python_minus_intercom._qs import Querystring, stringify +from python_intercom._qs import Querystring, stringify def test_empty() -> None: diff --git a/tests/test_required_args.py b/tests/test_required_args.py index 6075cc53..10239699 100644 --- a/tests/test_required_args.py +++ b/tests/test_required_args.py @@ -2,7 +2,7 @@ import pytest -from python_minus_intercom._utils import required_args +from python_intercom._utils import required_args def test_too_many_positional_params() -> None: diff --git a/tests/test_response.py b/tests/test_response.py index 2fc4c3fa..2ba6e94c 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -6,8 +6,8 @@ import pytest import pydantic -from python_minus_intercom import Intercom, BaseModel, AsyncIntercom -from python_minus_intercom._response import ( +from python_intercom import Intercom, BaseModel, AsyncIntercom +from python_intercom._response import ( APIResponse, BaseAPIResponse, AsyncAPIResponse, @@ -15,8 +15,8 @@ AsyncBinaryAPIResponse, extract_response_type, ) -from python_minus_intercom._streaming import Stream -from python_minus_intercom._base_client import FinalRequestOptions +from python_intercom._streaming import Stream +from python_intercom._base_client import FinalRequestOptions class ConcreteBaseAPIResponse(APIResponse[bytes]): @@ -40,7 +40,7 @@ def test_extract_response_type_direct_classes() -> None: def test_extract_response_type_direct_class_missing_type_arg() -> None: with pytest.raises( RuntimeError, - match="Expected type to have a type argument at index 0 but it did not", + match="Expected type to have a type argument at index 0 but it did not", ): extract_response_type(AsyncAPIResponse) @@ -72,7 +72,7 @@ def test_response_parse_mismatched_basemodel(client: Intercom) -> None: with pytest.raises( TypeError, - match="Pydantic models must subclass our base model type, e.g. `from python_minus_intercom import BaseModel`", + match="Pydantic models must subclass our base model type, e.g. `from python_intercom import BaseModel`", ): response.parse(to=PydanticModel) @@ -90,7 +90,7 @@ async def test_async_response_parse_mismatched_basemodel(async_client: AsyncInte with pytest.raises( TypeError, - match="Pydantic models must subclass our base model type, e.g. `from python_minus_intercom import BaseModel`", + match="Pydantic models must subclass our base model type, e.g. `from python_intercom import BaseModel`", ): await response.parse(to=PydanticModel) diff --git a/tests/test_streaming.py b/tests/test_streaming.py index 9591f3c9..0d700758 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -5,8 +5,8 @@ import httpx import pytest -from python_minus_intercom import Intercom, AsyncIntercom -from python_minus_intercom._streaming import Stream, AsyncStream, ServerSentEvent +from python_intercom import Intercom, AsyncIntercom +from python_intercom._streaming import Stream, AsyncStream, ServerSentEvent @pytest.mark.asyncio diff --git a/tests/test_transform.py b/tests/test_transform.py index 65ffc971..a4914fc8 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -8,15 +8,15 @@ import pytest -from python_minus_intercom._types import Base64FileInput -from python_minus_intercom._utils import ( +from python_intercom._types import Base64FileInput +from python_intercom._utils import ( PropertyInfo, transform as _transform, parse_datetime, async_transform as _async_transform, ) -from python_minus_intercom._compat import PYDANTIC_V2 -from python_minus_intercom._models import BaseModel +from python_intercom._compat import PYDANTIC_V2 +from python_intercom._models import BaseModel _T = TypeVar("_T") diff --git a/tests/test_utils/test_proxy.py b/tests/test_utils/test_proxy.py index 176b8dd7..9c1b366c 100644 --- a/tests/test_utils/test_proxy.py +++ b/tests/test_utils/test_proxy.py @@ -2,7 +2,7 @@ from typing import Any from typing_extensions import override -from python_minus_intercom._utils import LazyProxy +from python_intercom._utils import LazyProxy class RecursiveLazyProxy(LazyProxy[Any]): diff --git a/tests/test_utils/test_typing.py b/tests/test_utils/test_typing.py index 382d9f88..deafaf51 100644 --- a/tests/test_utils/test_typing.py +++ b/tests/test_utils/test_typing.py @@ -2,7 +2,7 @@ from typing import Generic, TypeVar, cast -from python_minus_intercom._utils import extract_type_var_from_base +from python_intercom._utils import extract_type_var_from_base _T = TypeVar("_T") _T2 = TypeVar("_T2") diff --git a/tests/utils.py b/tests/utils.py index 4f478c9c..2e5e47ca 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -8,8 +8,8 @@ from datetime import date, datetime from typing_extensions import Literal, get_args, get_origin, assert_type -from python_minus_intercom._types import NoneType -from python_minus_intercom._utils import ( +from python_intercom._types import NoneType +from python_intercom._utils import ( is_dict, is_list, is_list_type, @@ -17,8 +17,8 @@ extract_type_arg, is_annotated_type, ) -from python_minus_intercom._compat import PYDANTIC_V2, field_outer_type, get_model_fields -from python_minus_intercom._models import BaseModel +from python_intercom._compat import PYDANTIC_V2, field_outer_type, get_model_fields +from python_intercom._models import BaseModel BaseModelT = TypeVar("BaseModelT", bound=BaseModel)