From 415217615b8ee8bbcb9a97a92b11d77fd8a581e7 Mon Sep 17 00:00:00 2001 From: rocribera Date: Mon, 25 May 2026 14:55:09 +0200 Subject: [PATCH 01/10] feat: add async support --- README.md | 263 ++++++++++++--- mailersend/__init__.py | 4 +- mailersend/async_client.py | 302 +++++++++++++++++ mailersend/exceptions.py | 5 +- mailersend/resources/__init__.py | 77 +++-- mailersend/resources/activity.py | 39 ++- mailersend/resources/analytics.py | 74 ++++- mailersend/resources/base.py | 17 +- mailersend/resources/dmarc_monitoring.py | 176 +++++++++- mailersend/resources/domains.py | 144 +++++++- mailersend/resources/email.py | 57 +++- mailersend/resources/email_verification.py | 137 +++++++- mailersend/resources/identities.py | 142 +++++++- mailersend/resources/inbound.py | 82 ++++- mailersend/resources/messages.py | 37 ++- mailersend/resources/other.py | 16 +- mailersend/resources/recipients.py | 310 ++++++++++++++++- mailersend/resources/schedules.py | 52 ++- mailersend/resources/sms_activity.py | 37 ++- mailersend/resources/sms_inbounds.py | 79 ++++- mailersend/resources/sms_messages.py | 37 ++- mailersend/resources/sms_numbers.py | 69 +++- mailersend/resources/sms_recipients.py | 58 +++- mailersend/resources/sms_sending.py | 20 +- mailersend/resources/sms_webhooks.py | 82 ++++- mailersend/resources/smtp_users.py | 83 ++++- mailersend/resources/templates.py | 56 +++- mailersend/resources/tokens.py | 91 ++++- mailersend/resources/users.py | 132 +++++++- mailersend/resources/webhooks.py | 77 ++++- poetry.lock | 121 ++++++- pyproject.toml | 6 + tests/unit/test_async_activity_resource.py | 67 ++++ tests/unit/test_async_analytics_resource.py | 83 +++++ tests/unit/test_async_client.py | 311 ++++++++++++++++++ .../test_async_dmarc_monitoring_resource.py | 153 +++++++++ tests/unit/test_async_domains_resource.py | 148 +++++++++ tests/unit/test_async_email_resource.py | 89 +++++ .../test_async_email_verification_resource.py | 155 +++++++++ tests/unit/test_async_identities_resource.py | 141 ++++++++ tests/unit/test_async_inbound_resource.py | 124 +++++++ tests/unit/test_async_messages_resource.py | 58 ++++ tests/unit/test_async_other_resource.py | 32 ++ tests/unit/test_async_recipients_resource.py | 282 ++++++++++++++++ tests/unit/test_async_schedules_resource.py | 64 ++++ .../unit/test_async_sms_activity_resource.py | 46 +++ .../unit/test_async_sms_inbounds_resource.py | 100 ++++++ .../unit/test_async_sms_messages_resource.py | 60 ++++ tests/unit/test_async_sms_numbers_resource.py | 74 +++++ .../test_async_sms_recipients_resource.py | 77 +++++ tests/unit/test_async_sms_sending_resource.py | 43 +++ .../unit/test_async_sms_webhooks_resource.py | 109 ++++++ tests/unit/test_async_smtp_users_resource.py | 94 ++++++ tests/unit/test_async_templates_resource.py | 72 ++++ tests/unit/test_async_tokens_resource.py | 105 ++++++ tests/unit/test_async_users_resource.py | 133 ++++++++ tests/unit/test_async_webhooks_resource.py | 103 ++++++ tests/unit/test_webhooks_builder.py | 6 +- 58 files changed, 5502 insertions(+), 109 deletions(-) create mode 100644 mailersend/async_client.py create mode 100644 tests/unit/test_async_activity_resource.py create mode 100644 tests/unit/test_async_analytics_resource.py create mode 100644 tests/unit/test_async_client.py create mode 100644 tests/unit/test_async_dmarc_monitoring_resource.py create mode 100644 tests/unit/test_async_domains_resource.py create mode 100644 tests/unit/test_async_email_resource.py create mode 100644 tests/unit/test_async_email_verification_resource.py create mode 100644 tests/unit/test_async_identities_resource.py create mode 100644 tests/unit/test_async_inbound_resource.py create mode 100644 tests/unit/test_async_messages_resource.py create mode 100644 tests/unit/test_async_other_resource.py create mode 100644 tests/unit/test_async_recipients_resource.py create mode 100644 tests/unit/test_async_schedules_resource.py create mode 100644 tests/unit/test_async_sms_activity_resource.py create mode 100644 tests/unit/test_async_sms_inbounds_resource.py create mode 100644 tests/unit/test_async_sms_messages_resource.py create mode 100644 tests/unit/test_async_sms_numbers_resource.py create mode 100644 tests/unit/test_async_sms_recipients_resource.py create mode 100644 tests/unit/test_async_sms_sending_resource.py create mode 100644 tests/unit/test_async_sms_webhooks_resource.py create mode 100644 tests/unit/test_async_smtp_users_resource.py create mode 100644 tests/unit/test_async_templates_resource.py create mode 100644 tests/unit/test_async_tokens_resource.py create mode 100644 tests/unit/test_async_users_resource.py create mode 100644 tests/unit/test_async_webhooks_resource.py diff --git a/README.md b/README.md index 1fa10cd..0d31354 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ MailerSend Python SDK [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) # Table of Contents + - [Table of Contents](#table-of-contents) - [Installation](#installation) - [Requirements](#requirements) @@ -194,6 +195,11 @@ MailerSend Python SDK - [Remove IP from favorites](#remove-ip-from-favorites) - [Other Endpoints](#other-endpoints) - [Get API Quota](#get-api-quota) + - [Async Support](#async-support) + - [Basic Async Usage](#basic-async-usage) + - [Concurrent Requests](#concurrent-requests) + - [Async Error Handling](#async-error-handling) + - [Async Debug Logging](#async-debug-logging) - [Error Handling](#error-handling) - [Testing](#testing) - [Running Unit Tests](#running-unit-tests) @@ -212,7 +218,7 @@ pip install mailersend ## Requirements -- Python 3.7+ +- Python 3.10+ - An API Key from [mailersend.com](https://www.mailersend.com) ## Authentication @@ -278,7 +284,7 @@ ms = MailerSendClient(api_key="your-api-key") # SDK Architecture -The MailerSend Python SDK v2 introduces a modern, clean architecture that follows industry best practices: +The MailerSend Python SDK v2 introduces a modern, clean architecture that follows industry best practices. Both a synchronous client (`MailerSendClient`) and an async client (`AsyncMailerSendClient`) are available — they share the same resources, builders, and models. ## Builder Pattern @@ -309,7 +315,7 @@ Each API endpoint group has its own resource class that provides clean method in ```python # Access different API resources ms.sms_recipients # SMS Recipients operations -ms.sms_webhooks # SMS Webhooks operations +ms.sms_webhooks # SMS Webhooks operations ms.sms_inbounds # SMS Inbound Routing operations ms.email # Email operations ms.domains # Domain operations @@ -337,6 +343,7 @@ The MailerSend SDK provides flexible ways to access and work with API response d ## Multiple Access Patterns ### Dict-like Access + Access response data using dictionary-style syntax: ```python @@ -362,6 +369,7 @@ if "error" in response: ``` ### Attribute Access + Access data using dot notation for cleaner code: ```python @@ -376,6 +384,7 @@ if hasattr(response, 'sms') and response.sms: ``` ### Safe Access with Defaults + Use the `get()` method for safe access with fallback values: ```python @@ -390,6 +399,7 @@ current_page = meta_info.get("page", 1) ``` ### Handling Method Name Conflicts + When response data contains fields that conflict with built-in methods, use the `data_` prefix: ```python @@ -413,6 +423,7 @@ value_list = response.data_values ## Data Format Conversion ### Convert to Dictionary + Get the complete response as a dictionary: ```python @@ -437,6 +448,7 @@ headers_only = response_dict["headers"] ``` ### Convert to JSON + Get JSON string representation with various formatting options: ```python @@ -455,6 +467,7 @@ json_string = json.dumps(response) ``` ### Extract Raw Data + Access just the API response data without metadata: ```python @@ -474,6 +487,7 @@ else: ## Headers and Metadata ### Access Response Headers + Headers can be accessed in multiple ways with automatic case handling: ```python @@ -494,6 +508,7 @@ retry_after = response.headers.get("retry-after", "0") ``` ### Response Metadata + Access useful metadata about the API response: ```python @@ -518,6 +533,7 @@ if "meta" in response.data: ## Error Handling with Responses ### Check Response Status + Always check if the response was successful: ```python @@ -528,33 +544,34 @@ ms = MailerSendClient() try: email = EmailBuilder().from_email("sender@domain.com").build() response = ms.emails.send(email) - + if response.success: email_id = response.id remaining_quota = response.rate_limit_remaining else: status_code = response.status_code error_details = response.data - + # Handle rate limiting if response.status_code == 429 and response.retry_after: retry_seconds = response.retry_after - + except Exception as e: # Handle exception ``` ### Access Error Information + When requests fail, error details are available in the response: ```python if not response.success: error_data = response.data - + # API error response structure error_message = error_data.get("message", "Unknown error") error_code = error_data.get("code") - + # Validation errors (422 responses) if "errors" in error_data: for field, messages in error_data["errors"].items(): @@ -575,7 +592,7 @@ users_response = ms.users.list_users(request) if users_response.success: users = users_response.data["data"] # Array of users total_count = users_response.data["meta"]["total"] - + for user in users: user_name = user['name'] user_email = user['email'] @@ -1543,7 +1560,7 @@ from mailersend import MailerSendClient, RecipientsBuilder ms = MailerSendClient() -# Delete specific entries by IDs +# Delete specific entries by IDs request = (RecipientsBuilder() .domain_id("domain-id") .ids(["recipient-id"]) @@ -2050,7 +2067,7 @@ request = (SmsSendingBuilder() "data": {"name": "John", "order_id": "12345"} }, { - "phone_number": "+1234567891", + "phone_number": "+1234567891", "data": {"name": "Jane", "order_id": "12346"} } ]) @@ -2840,6 +2857,164 @@ ms = MailerSendClient() response = ms.api_quota.get_quota() ``` + + +## Async Support + +The SDK provides a fully async-compatible client, `AsyncMailerSendClient`, built on `httpx.AsyncClient`. It exposes the same resources and methods as the synchronous `MailerSendClient` — prefixed with `async`/`await` — so you can use it anywhere `asyncio` is available. + +### Basic Async Usage + +Use `AsyncMailerSendClient` as an async context manager (recommended) to ensure the underlying HTTP connection is properly closed: + +```python +import asyncio +from mailersend import AsyncMailerSendClient, EmailBuilder + +async def main(): + async with AsyncMailerSendClient() as client: + email = (EmailBuilder() + .from_email("sender@domain.com", "Your Name") + .to_many([{"email": "recipient@domain.com", "name": "Recipient"}]) + .subject("Hello from MailerSend!") + .html("

Hello World!

") + .text("Hello World!") + .build()) + + response = await client.emails.send(email) + print(response.status_code) + +asyncio.run(main()) +``` + +If you prefer to manage the lifecycle manually, call `await client.close()` when finished: + +```python +from mailersend import AsyncMailerSendClient + +client = AsyncMailerSendClient(api_key="your-api-key") + +try: + response = await client.api_quota.get_quota() +finally: + await client.close() +``` + +All resources available on `MailerSendClient` are also available on `AsyncMailerSendClient`: + +```python +async with AsyncMailerSendClient() as client: + client.emails # Email operations + client.activities # Activity operations + client.analytics # Analytics operations + client.domains # Domain operations + client.identities # Sender identity operations + client.inbound # Inbound route operations + client.templates # Template operations + client.tokens # Token operations + client.webhooks # Webhook operations + client.email_verification # Email verification operations + client.users # User operations + client.messages # Message operations + client.recipients # Recipient & suppression operations + client.schedules # Scheduled message operations + client.smtp_users # SMTP user operations + client.sms_sending # SMS sending operations + client.sms_numbers # SMS phone number operations + client.sms_activity # SMS activity operations + client.sms_inbounds # SMS inbound routing operations + client.sms_recipients # SMS recipient operations + client.sms_webhooks # SMS webhook operations + client.sms_messages # SMS message operations + client.api_quota # API quota operations + client.dmarc_monitoring # DMARC monitoring operations +``` + +### Concurrent Requests + +The main benefit of `AsyncMailerSendClient` is the ability to run multiple API calls concurrently with `asyncio.gather`: + +```python +import asyncio +from mailersend import AsyncMailerSendClient, DomainsBuilder, TemplatesBuilder + +async def main(): + async with AsyncMailerSendClient() as client: + domains_request = DomainsBuilder().build_list_request() + templates_request = TemplatesBuilder().build_list_request() + + # Both requests run concurrently + domains_response, templates_response = await asyncio.gather( + client.domains.list_domains(domains_request), + client.templates.list_templates(templates_request), + ) + + print(f"Domains: {domains_response.data}") + print(f"Templates: {templates_response.data}") + +asyncio.run(main()) +``` + +### Async Error Handling + +`AsyncMailerSendClient` raises the same exception types as the synchronous client: + +```python +import asyncio +from mailersend import AsyncMailerSendClient +from mailersend.exceptions import ( + AuthenticationError, + RateLimitExceeded, + ResourceNotFoundError, + BadRequestError, + ServerError, + MailerSendError, +) + +async def main(): + async with AsyncMailerSendClient() as client: + try: + response = await client.api_quota.get_quota() + except AuthenticationError: + print("Invalid API key") + except RateLimitExceeded as e: + print(f"Rate limit hit: {e}") + except ResourceNotFoundError: + print("Resource not found") + except BadRequestError as e: + print(f"Bad request: {e}") + except ServerError as e: + print(f"Server error: {e}") + except MailerSendError as e: + print(f"Unexpected error: {e}") + +asyncio.run(main()) +``` + +The client automatically retries transient errors (429, 500, 502, 503, 504) with exponential backoff. For 429 responses the `Retry-After` header is respected if present. + +### Async Debug Logging + +Debug logging works the same way as the synchronous client: + +```python +import asyncio +from mailersend import AsyncMailerSendClient + +async def main(): + # Enable debug at construction time + async with AsyncMailerSendClient(debug=True) as client: + response = await client.api_quota.get_quota() + + # Or toggle at runtime + async with AsyncMailerSendClient() as client: + client.enable_debug() + response = await client.api_quota.get_quota() + client.disable_debug() + +asyncio.run(main()) +``` + # Error Handling @@ -2860,14 +3035,14 @@ try: .subject("Test") .html("

Test

") .build()) - + response = ms.emails.send(email) - + except MailerSendError as e: print(f"MailerSend API Error: {e}") print(f"Status Code: {e.status_code}") print(f"Error Details: {e.details}") - + except Exception as e: print(f"Unexpected error: {e}") ``` @@ -2919,36 +3094,36 @@ def test_list_sms_recipients(): # Available endpoints -| Feature group | Endpoint | Available | -|-----------------------|-----------------------------------------|-----------| -| Activity | `GET activity` | ✅ | -| Analytics | `GET analytics` | ✅ | -| Domains | `{GET, POST, PUT, DELETE} domains` | ✅ | -| Email | `POST send` | ✅ | -| Email Verification | `{GET, POST, PUT} email-verification` | ✅ | -| Bulk Email | `POST bulk-email` | ✅ | -| Inbound Routes | `{GET, POST, PUT, DELETE} inbound` | ✅ | -| Messages | `GET messages` | ✅ | -| Scheduled Messages | `{GET, DELETE} scheduled-messages` | ✅ | -| Recipients | `{GET, POST, DELETE} recipients` | ✅ | -| Templates | `{GET, DELETE} templates` | ✅ | -| Tokens | `{POST, PUT, DELETE} tokens` | ✅ | -| SMTP Users | `{GET, POST, PUT, DELETE} smtp-users` | ✅ | -| Users | `{GET, POST, PUT, DELETE} users` | ✅ | -| User Invites | `{GET, POST, DELETE} invites` | ✅ | -| Webhooks | `{GET, POST, PUT, DELETE} webhooks` | ✅ | -| SMS Sending | `POST sms` | ✅ | -| SMS Activity | `GET sms-activity` | ✅ | -| SMS Phone Numbers | `{GET, PUT, DELETE} sms-numbers` | ✅ | -| SMS Recipients | `{GET, PUT} sms-recipients` | ✅ | -| SMS Messages | `GET sms-messages` | ✅ | -| SMS Webhooks | `{GET, POST, PUT, DELETE} sms-webhooks` | ✅ | -| SMS Inbound Routing | `{GET, POST, PUT, DELETE} sms-inbounds` | ✅ | -| Sender Identities | `{GET, POST, PUT, DELETE} identities` | ✅ | -| API Quota | `GET api-quota` | ✅ | -| DMARC Monitoring | `{GET, POST, PUT, DELETE} dmarc-monitoring` | ✅ | - -*All endpoints are available and fully tested. Refer to [official API docs](https://developers.mailersend.com/) for the most up-to-date API specifications.* +| Feature group | Endpoint | Available | +| ------------------- | ------------------------------------------- | --------- | +| Activity | `GET activity` | ✅ | +| Analytics | `GET analytics` | ✅ | +| Domains | `{GET, POST, PUT, DELETE} domains` | ✅ | +| Email | `POST send` | ✅ | +| Email Verification | `{GET, POST, PUT} email-verification` | ✅ | +| Bulk Email | `POST bulk-email` | ✅ | +| Inbound Routes | `{GET, POST, PUT, DELETE} inbound` | ✅ | +| Messages | `GET messages` | ✅ | +| Scheduled Messages | `{GET, DELETE} scheduled-messages` | ✅ | +| Recipients | `{GET, POST, DELETE} recipients` | ✅ | +| Templates | `{GET, DELETE} templates` | ✅ | +| Tokens | `{POST, PUT, DELETE} tokens` | ✅ | +| SMTP Users | `{GET, POST, PUT, DELETE} smtp-users` | ✅ | +| Users | `{GET, POST, PUT, DELETE} users` | ✅ | +| User Invites | `{GET, POST, DELETE} invites` | ✅ | +| Webhooks | `{GET, POST, PUT, DELETE} webhooks` | ✅ | +| SMS Sending | `POST sms` | ✅ | +| SMS Activity | `GET sms-activity` | ✅ | +| SMS Phone Numbers | `{GET, PUT, DELETE} sms-numbers` | ✅ | +| SMS Recipients | `{GET, PUT} sms-recipients` | ✅ | +| SMS Messages | `GET sms-messages` | ✅ | +| SMS Webhooks | `{GET, POST, PUT, DELETE} sms-webhooks` | ✅ | +| SMS Inbound Routing | `{GET, POST, PUT, DELETE} sms-inbounds` | ✅ | +| Sender Identities | `{GET, POST, PUT, DELETE} identities` | ✅ | +| API Quota | `GET api-quota` | ✅ | +| DMARC Monitoring | `{GET, POST, PUT, DELETE} dmarc-monitoring` | ✅ | + +_All endpoints are available and fully tested. Refer to [official API docs](https://developers.mailersend.com/) for the most up-to-date API specifications._ diff --git a/mailersend/__init__.py b/mailersend/__init__.py index f8fe436..1ec9e83 100644 --- a/mailersend/__init__.py +++ b/mailersend/__init__.py @@ -5,6 +5,7 @@ """ from .client import MailerSendClient +from .async_client import AsyncMailerSendClient # Import all builders for better UX - users can import everything from main module from .builders.email import EmailBuilder @@ -65,8 +66,9 @@ __version__ = "2.0.0" __all__ = [ - # Core client + # Core clients "MailerSendClient", + "AsyncMailerSendClient", # Builders - All available from main module for better UX "EmailBuilder", "ActivityBuilder", diff --git a/mailersend/async_client.py b/mailersend/async_client.py new file mode 100644 index 0000000..4a53005 --- /dev/null +++ b/mailersend/async_client.py @@ -0,0 +1,302 @@ +import asyncio +import logging +import os +from typing import Any, Dict, Optional +from urllib.parse import urljoin + +import httpx + +from .constants import DEFAULT_BASE_URL, DEFAULT_TIMEOUT, USER_AGENT +from .exceptions import ( + AuthenticationError, + BadRequestError, + MailerSendError, + RateLimitExceeded, + ResourceNotFoundError, + ServerError, +) +from .resources.activity import AsyncActivity +from .resources.analytics import AsyncAnalytics +from .resources.dmarc_monitoring import AsyncDmarcMonitoring +from .resources.domains import AsyncDomains +from .resources.email import AsyncEmail +from .resources.email_verification import AsyncEmailVerification +from .resources.identities import AsyncIdentitiesResource +from .resources.inbound import AsyncInboundResource +from .resources.messages import AsyncMessages +from .resources.other import AsyncOther +from .resources.recipients import AsyncRecipients +from .resources.schedules import AsyncSchedules +from .resources.sms_activity import AsyncSmsActivity +from .resources.sms_inbounds import AsyncSmsInbounds +from .resources.sms_messages import AsyncSmsMessages +from .resources.sms_numbers import AsyncSmsNumbers +from .resources.sms_recipients import AsyncSmsRecipients +from .resources.sms_sending import AsyncSmsSending +from .resources.sms_webhooks import AsyncSmsWebhooks +from .resources.smtp_users import AsyncSmtpUsers +from .resources.templates import AsyncTemplates +from .resources.tokens import AsyncTokens +from .resources.users import AsyncUsers +from .resources.webhooks import AsyncWebhooks +from .logging import get_logger, RequestLogger + +_RETRY_STATUSES = frozenset([429, 500, 502, 503, 504]) + + +class AsyncMailerSendClient: + """ + Async client for the MailerSend API. + + Uses httpx.AsyncClient under the hood. Supports use as an async context + manager (recommended) or manual lifecycle management via close(). + + Examples: + >>> # Using environment variable (recommended) + >>> async with AsyncMailerSendClient() as client: + ... response = await client.emails.send(email_request) + + >>> # Using explicit API key + >>> client = AsyncMailerSendClient(api_key="your_api_key") + + >>> # Enable debug logging for detailed request/response info + >>> client = AsyncMailerSendClient(debug=True) + """ + + def __init__( + self, + api_key: Optional[str] = None, + base_url: str = DEFAULT_BASE_URL, + timeout: int = DEFAULT_TIMEOUT, + max_retries: int = 3, + debug: bool = False, + logger: Optional[logging.Logger] = None, + ) -> None: + """ + Initialize the async MailerSend client. + + Args: + api_key: Your MailerSend API key. If not provided, will try to read + from MAILERSEND_API_KEY environment variable + base_url: Base URL for API requests + timeout: Request timeout in seconds + max_retries: Maximum number of retries for failed requests + debug: Enable detailed debug logging + logger: Custom logger instance + + Raises: + ValueError: If no API key is provided and MAILERSEND_API_KEY + environment variable is not set + """ + resolved_api_key = api_key or os.getenv("MAILERSEND_API_KEY") + + if not resolved_api_key: + raise ValueError( + "API key is required. Either pass it as 'api_key' parameter or " + "set the 'MAILERSEND_API_KEY' environment variable." + ) + + self.api_key = resolved_api_key + self.base_url = base_url + self.timeout = timeout + self.max_retries = max_retries + self.debug = debug + self.logger = logger or get_logger(debug=debug) + self.request_logger = RequestLogger(self.logger) + + self._client = httpx.AsyncClient( + headers={ + "Authorization": f"Bearer {self.api_key}", + "Content-Type": "application/json", + "Accept": "application/json", + "User-Agent": USER_AGENT, + }, + timeout=self.timeout, + ) + + self.emails = AsyncEmail(self) + self.activities = AsyncActivity(self) + self.analytics = AsyncAnalytics(self) + self.domains = AsyncDomains(self) + self.identities = AsyncIdentitiesResource(self) + self.inbound = AsyncInboundResource(self) + self.templates = AsyncTemplates(self) + self.tokens = AsyncTokens(self) + self.webhooks = AsyncWebhooks(self) + self.email_verification = AsyncEmailVerification(self) + self.users = AsyncUsers(self) + self.messages = AsyncMessages(self) + self.recipients = AsyncRecipients(self) + self.schedules = AsyncSchedules(self) + self.sms_messages = AsyncSmsMessages(self) + self.smtp_users = AsyncSmtpUsers(self) + self.sms_sending = AsyncSmsSending(self) + self.sms_numbers = AsyncSmsNumbers(self) + self.sms_activity = AsyncSmsActivity(self) + self.sms_inbounds = AsyncSmsInbounds(self) + self.sms_recipients = AsyncSmsRecipients(self) + self.sms_webhooks = AsyncSmsWebhooks(self) + self.api_quota = AsyncOther(self) + self.dmarc_monitoring = AsyncDmarcMonitoring(self) + + self.logger.info("AsyncMailerSendClient initialized successfully") + + def enable_debug(self) -> None: + """Enable debug logging for this client instance.""" + self.debug = True + self.logger.setLevel(logging.DEBUG) + self.logger.info("Debug mode enabled") + + def disable_debug(self) -> None: + """Disable debug logging for this client instance.""" + self.debug = False + self.logger.setLevel(logging.WARNING) + self.logger.info("Debug mode disabled") + + def get_debug_info(self) -> Dict[str, Any]: + """Get current debug and configuration information.""" + return { + "debug_enabled": self.debug, + "base_url": self.base_url, + "timeout": self.timeout, + "max_retries": self.max_retries, + "user_agent": USER_AGENT, + "logger_level": self.logger.level, + } + + async def request( + self, + method: str, + path: str, + params: Optional[Dict[str, Any]] = None, + body: Optional[Any] = None, + ) -> httpx.Response: + """ + Make an async HTTP request to the MailerSend API. + + Args: + method: HTTP method (GET, POST, PUT, DELETE) + path: API endpoint path + params: Query parameters + body: Request body data + + Returns: + Response object + + Raises: + AuthenticationError: If authentication fails + ResourceNotFoundError: If the requested resource is not found + RateLimitExceeded: If API rate limits are exceeded + BadRequestError: If the request was malformed + ServerError: If a server error occurs + MailerSendError: For other API errors + """ + url = urljoin(self.base_url, path) + request_id = self.request_logger.start_request(method, url, params, body) + + last_exception: Optional[Exception] = None + + for attempt in range(self.max_retries + 1): + try: + response = await self._client.request( + method=method, + url=url, + params=params, + json=body, + ) + + self.request_logger.log_response(response) + + if 200 <= response.status_code < 300: + return response + + # Retry on transient errors (except on the last attempt) + if ( + response.status_code in _RETRY_STATUSES + and attempt < self.max_retries + ): + if response.status_code == 429: + retry_after = response.headers.get("retry-after") + delay = ( + float(retry_after) if retry_after else 0.3 * (2**attempt) + ) + else: + delay = 0.3 * (2**attempt) + self.request_logger.log_retry(attempt + 1, delay) + await asyncio.sleep(delay) + continue + + error_message = self._get_error_message(response) + self.logger.error( + f"API error {response.status_code}: {error_message}", + extra={"request_id": request_id}, + ) + + if response.status_code == 401: + raise AuthenticationError(error_message, response) + elif response.status_code == 404: + raise ResourceNotFoundError(error_message, response) + elif response.status_code == 429: + retry_after = response.headers.get("retry-after") + remaining = response.headers.get("x-apiquota-remaining") + self.logger.warning( + f"Rate limit exceeded. Retry after: {retry_after}s, Remaining: {remaining}", + extra={"request_id": request_id}, + ) + raise RateLimitExceeded(error_message, response) + elif 400 <= response.status_code < 500: + raise BadRequestError(error_message, response) + elif 500 <= response.status_code < 600: + raise ServerError(error_message, response) + else: + raise MailerSendError(error_message, response) + + except ( + AuthenticationError, + ResourceNotFoundError, + RateLimitExceeded, + BadRequestError, + ServerError, + MailerSendError, + ): + raise + except httpx.RequestError as e: + last_exception = e + if attempt < self.max_retries: + delay = 0.3 * (2**attempt) + self.request_logger.log_retry(attempt + 1, delay) + await asyncio.sleep(delay) + continue + self.request_logger.log_error(e) + raise MailerSendError(f"Request failed: {str(e)}") from e + + # Should not be reached, but satisfies type checker + if last_exception: + raise MailerSendError(f"Request failed: {str(last_exception)}") + raise MailerSendError("Request failed after retries") + + def _get_error_message(self, response: httpx.Response) -> str: + try: + error_data = response.json() + if isinstance(error_data, dict): + message = error_data.get("message", "Unknown error") + errors = error_data.get("errors", {}) + if errors: + error_details = "; ".join( + f"{key}: {', '.join(msgs)}" for key, msgs in errors.items() + ) + return f"{message}: {error_details}" + return message + except Exception: + pass + return f"Error {response.status_code}: {response.text}" + + async def close(self) -> None: + """Close the underlying httpx client and release resources.""" + await self._client.aclose() + + async def __aenter__(self) -> "AsyncMailerSendClient": + return self + + async def __aexit__(self, *_: Any) -> None: + await self.close() diff --git a/mailersend/exceptions.py b/mailersend/exceptions.py index 9611bee..cd13753 100644 --- a/mailersend/exceptions.py +++ b/mailersend/exceptions.py @@ -1,11 +1,10 @@ -from typing import Optional -import requests +from typing import Any, Optional class MailerSendError(Exception): """Base exception for all MailerSend API errors.""" - def __init__(self, message: str, response: Optional[requests.Response] = None): + def __init__(self, message: str, response: Optional[Any] = None): self.message = message self.response = response super().__init__(self.message) diff --git a/mailersend/resources/__init__.py b/mailersend/resources/__init__.py index 44e93ee..d51d779 100644 --- a/mailersend/resources/__init__.py +++ b/mailersend/resources/__init__.py @@ -2,32 +2,34 @@ API resource classes for interacting with specific MailerSend API endpoints. """ -from .base import BaseResource -from .email import Email -from .activity import Activity -from .analytics import Analytics -from .domains import Domains -from .identities import IdentitiesResource -from .inbound import InboundResource -from .messages import Messages -from .schedules import Schedules -from .recipients import Recipients -from .templates import Templates -from .tokens import Tokens -from .webhooks import Webhooks -from .email_verification import EmailVerification -from .users import Users -from .sms_messages import SmsMessages -from .sms_numbers import SmsNumbers -from .sms_activity import SmsActivity -from .sms_sending import SmsSending -from .sms_recipients import SmsRecipients -from .sms_webhooks import SmsWebhooks -from .sms_inbounds import SmsInbounds -from .other import Other -from .dmarc_monitoring import DmarcMonitoring +from .base import AsyncBaseResource, BaseResource +from .email import AsyncEmail, Email +from .activity import AsyncActivity, Activity +from .analytics import AsyncAnalytics, Analytics +from .domains import AsyncDomains, Domains +from .identities import AsyncIdentitiesResource, IdentitiesResource +from .inbound import AsyncInboundResource, InboundResource +from .messages import AsyncMessages, Messages +from .schedules import AsyncSchedules, Schedules +from .recipients import AsyncRecipients, Recipients +from .templates import AsyncTemplates, Templates +from .tokens import AsyncTokens, Tokens +from .webhooks import AsyncWebhooks, Webhooks +from .email_verification import AsyncEmailVerification, EmailVerification +from .users import AsyncUsers, Users +from .sms_messages import AsyncSmsMessages, SmsMessages +from .sms_numbers import AsyncSmsNumbers, SmsNumbers +from .sms_activity import AsyncSmsActivity, SmsActivity +from .sms_sending import AsyncSmsSending, SmsSending +from .sms_recipients import AsyncSmsRecipients, SmsRecipients +from .sms_webhooks import AsyncSmsWebhooks, SmsWebhooks +from .sms_inbounds import AsyncSmsInbounds, SmsInbounds +from .other import AsyncOther, Other +from .dmarc_monitoring import AsyncDmarcMonitoring, DmarcMonitoring +from .smtp_users import AsyncSmtpUsers, SmtpUsers __all__ = [ + # Sync resources "BaseResource", "Email", "Activity", @@ -50,6 +52,33 @@ "SmsRecipients", "SmsWebhooks", "SmsInbounds", + "SmtpUsers", "Other", "DmarcMonitoring", + # Async resources + "AsyncBaseResource", + "AsyncEmail", + "AsyncActivity", + "AsyncAnalytics", + "AsyncDomains", + "AsyncIdentitiesResource", + "AsyncInboundResource", + "AsyncMessages", + "AsyncSchedules", + "AsyncRecipients", + "AsyncTemplates", + "AsyncTokens", + "AsyncWebhooks", + "AsyncEmailVerification", + "AsyncUsers", + "AsyncSmsMessages", + "AsyncSmsNumbers", + "AsyncSmsActivity", + "AsyncSmsSending", + "AsyncSmsRecipients", + "AsyncSmsWebhooks", + "AsyncSmsInbounds", + "AsyncSmtpUsers", + "AsyncOther", + "AsyncDmarcMonitoring", ] diff --git a/mailersend/resources/activity.py b/mailersend/resources/activity.py index 45037bd..5752ef1 100644 --- a/mailersend/resources/activity.py +++ b/mailersend/resources/activity.py @@ -1,6 +1,6 @@ """Activity resource""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.activity import ActivityRequest, SingleActivityRequest from ..models.base import APIResponse @@ -52,3 +52,40 @@ def get_single(self, request: SingleActivityRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncActivity(AsyncBaseResource): + """Async client for interacting with the MailerSend Activity API.""" + + async def get(self, request: ActivityRequest) -> APIResponse: + """ + Get activity data for a domain. + + Args: + request: A fully-validated ActivityRequest object + + Returns: + APIResponse with activity data and metadata + """ + self.logger.debug("Preparing to get activity data") + params = request.to_query_params() + response = await self.client.request( + method="GET", path=f"activity/{request.domain_id}", params=params + ) + return self._create_response(response) + + async def get_single(self, request: SingleActivityRequest) -> APIResponse: + """ + Get a single activity by its ID. + + Args: + request: A fully-validated SingleActivityRequest object + + Returns: + APIResponse with single activity data + """ + self.logger.debug("Getting single activity: %s", request.activity_id) + response = await self.client.request( + method="GET", path=f"activities/{request.activity_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/analytics.py b/mailersend/resources/analytics.py index 9745fa2..716b4f3 100644 --- a/mailersend/resources/analytics.py +++ b/mailersend/resources/analytics.py @@ -2,7 +2,7 @@ from typing import Dict, Any, Optional -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.analytics import AnalyticsRequest from ..models.base import APIResponse @@ -129,3 +129,75 @@ def _build_query_params( params.pop(f"{field}[]", None) return params + + +class AsyncAnalytics(AsyncBaseResource): + """Async client for interacting with the MailerSend Analytics API.""" + + async def get_activity_by_date(self, request: AnalyticsRequest) -> APIResponse: + """ + Retrieve analytics data grouped by date. + + Args: + request: AnalyticsRequest with date range and filtering options + + Returns: + APIResponse with activity data grouped by date + """ + params = self._build_query_params(request) + response = await self.client.request("GET", "analytics/date", params=params) + return self._create_response(response) + + async def get_opens_by_country(self, request: AnalyticsRequest) -> APIResponse: + """ + Retrieve analytics data grouped by country. + + Args: + request: AnalyticsRequest with date range and filtering options + + Returns: + APIResponse with opens data grouped by country + """ + params = self._build_query_params(request, exclude_fields=["event", "group_by"]) + response = await self.client.request("GET", "analytics/country", params=params) + return self._create_response(response) + + async def get_opens_by_user_agent(self, request: AnalyticsRequest) -> APIResponse: + """ + Retrieve analytics data grouped by user agent name. + + Args: + request: AnalyticsRequest with date range and filtering options + + Returns: + APIResponse with opens data grouped by user agent + """ + params = self._build_query_params(request, exclude_fields=["event", "group_by"]) + response = await self.client.request("GET", "analytics/ua-name", params=params) + return self._create_response(response) + + async def get_opens_by_reading_environment( + self, request: AnalyticsRequest + ) -> APIResponse: + """ + Retrieve analytics data grouped by reading environment. + + Args: + request: AnalyticsRequest with date range and filtering options + + Returns: + APIResponse with opens data grouped by reading environment + """ + params = self._build_query_params(request, exclude_fields=["event", "group_by"]) + response = await self.client.request("GET", "analytics/ua-type", params=params) + return self._create_response(response) + + def _build_query_params( + self, request: AnalyticsRequest, exclude_fields: Optional[list] = None + ) -> Dict[str, Any]: + exclude_fields = exclude_fields or [] + params = request.model_dump(by_alias=True, exclude_none=True) + for field in exclude_fields: + params.pop(field, None) + params.pop(f"{field}[]", None) + return params diff --git a/mailersend/resources/base.py b/mailersend/resources/base.py index 8ddd0fa..ceecbfb 100644 --- a/mailersend/resources/base.py +++ b/mailersend/resources/base.py @@ -1,8 +1,7 @@ import logging -from typing import Dict, Any, Optional, Union, List, TypeVar, Type, ClassVar +from typing import Any, Dict, Optional, Union, List, TypeVar, Type, ClassVar from ..models.base import BaseModel, ModelList, APIResponse from ..logging import get_logger -import requests T = TypeVar("T", bound=BaseModel) @@ -23,9 +22,7 @@ def __init__(self, client, logger: Optional[logging.Logger] = None): self.client = client self.logger = logger or get_logger() - def _create_response( - self, response: requests.Response, data: Any = None - ) -> APIResponse: + def _create_response(self, response: Any, data: Any = None) -> APIResponse: """ Create unified APIResponse object from HTTP response. @@ -53,9 +50,7 @@ def _create_response( ), ) - def _parse_int_header( - self, response: requests.Response, header: str - ) -> Optional[int]: + def _parse_int_header(self, response: Any, header: str) -> Optional[int]: """ Safely parse integer header value. @@ -110,3 +105,9 @@ def _process_response( return [cls(**item) for item in response_data] return response_data + + +class AsyncBaseResource(BaseResource): + """Base class for all async API resources.""" + + pass diff --git a/mailersend/resources/dmarc_monitoring.py b/mailersend/resources/dmarc_monitoring.py index aa63f3a..2b0a23f 100644 --- a/mailersend/resources/dmarc_monitoring.py +++ b/mailersend/resources/dmarc_monitoring.py @@ -2,7 +2,7 @@ from typing import Optional -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.base import APIResponse from ..models.dmarc_monitoring import ( DmarcMonitoringListRequest, @@ -216,3 +216,177 @@ def remove_ip_favorite( path=f"dmarc-monitoring/{request.monitor_id}/favorite/{request.ip}", ) return self._create_response(response) + + +class AsyncDmarcMonitoring(AsyncBaseResource): + """Async client for the MailerSend DMARC Monitoring API.""" + + async def list_monitors( + self, request: Optional[DmarcMonitoringListRequest] = None + ) -> APIResponse: + """ + Retrieve a list of DMARC monitors. + + Args: + request: Optional DmarcMonitoringListRequest with pagination options + + Returns: + APIResponse with list of monitors + """ + if request is None: + request = DmarcMonitoringListRequest( + query_params=DmarcMonitoringListQueryParams() + ) + params = request.to_query_params() + response = await self.client.request( + method="GET", path="dmarc-monitoring", params=params + ) + return self._create_response(response) + + async def create_monitor( + self, request: DmarcMonitoringCreateRequest + ) -> APIResponse: + """ + Create a new DMARC monitor. + + Args: + request: DmarcMonitoringCreateRequest with domain_id + + Returns: + APIResponse with created monitor information + """ + body = request.model_dump(by_alias=True, exclude_none=True) + response = await self.client.request( + method="POST", path="dmarc-monitoring", body=body + ) + return self._create_response(response) + + async def update_monitor( + self, request: DmarcMonitoringUpdateRequest + ) -> APIResponse: + """ + Update a DMARC monitor. + + Args: + request: DmarcMonitoringUpdateRequest with monitor_id and wanted_dmarc_record + + Returns: + APIResponse with updated monitor information + """ + body = request.model_dump( + by_alias=True, exclude_none=True, exclude={"monitor_id"} + ) + response = await self.client.request( + method="PUT", path=f"dmarc-monitoring/{request.monitor_id}", body=body + ) + return self._create_response(response) + + async def delete_monitor( + self, request: DmarcMonitoringDeleteRequest + ) -> APIResponse: + """ + Delete a DMARC monitor. + + Args: + request: DmarcMonitoringDeleteRequest with monitor_id + + Returns: + APIResponse + """ + response = await self.client.request( + method="DELETE", path=f"dmarc-monitoring/{request.monitor_id}" + ) + return self._create_response(response) + + async def get_aggregated_report( + self, request: DmarcMonitoringReportRequest + ) -> APIResponse: + """ + Get aggregated DMARC reports for a monitor. + + Args: + request: DmarcMonitoringReportRequest with monitor_id and pagination options + + Returns: + APIResponse with aggregated report data + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", + path=f"dmarc-monitoring/{request.monitor_id}/report", + params=params, + ) + return self._create_response(response) + + async def get_ip_report( + self, request: DmarcMonitoringIpReportRequest + ) -> APIResponse: + """ + Get IP-specific DMARC reports for a monitor. + + Args: + request: DmarcMonitoringIpReportRequest with monitor_id, ip, and pagination options + + Returns: + APIResponse with IP-specific report data + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", + path=f"dmarc-monitoring/{request.monitor_id}/report/{request.ip}", + params=params, + ) + return self._create_response(response) + + async def get_report_sources( + self, request: DmarcMonitoringReportSourcesRequest + ) -> APIResponse: + """ + Get report sources for a DMARC monitor. + + Args: + request: DmarcMonitoringReportSourcesRequest with monitor_id + + Returns: + APIResponse with report sources data + """ + response = await self.client.request( + method="GET", path=f"dmarc-monitoring/{request.monitor_id}/report-sources" + ) + return self._create_response(response) + + async def mark_ip_favorite( + self, request: DmarcMonitoringFavoriteRequest + ) -> APIResponse: + """ + Mark an IP address as favorite for a DMARC monitor. + + Args: + request: DmarcMonitoringFavoriteRequest with monitor_id and ip + + Returns: + APIResponse + """ + response = await self.client.request( + method="PUT", + path=f"dmarc-monitoring/{request.monitor_id}/favorite/{request.ip}", + ) + return self._create_response(response) + + async def remove_ip_favorite( + self, request: DmarcMonitoringFavoriteRequest + ) -> APIResponse: + """ + Remove an IP address from favorites for a DMARC monitor. + + Args: + request: DmarcMonitoringFavoriteRequest with monitor_id and ip + + Returns: + APIResponse + """ + response = await self.client.request( + method="DELETE", + path=f"dmarc-monitoring/{request.monitor_id}/favorite/{request.ip}", + ) + return self._create_response(response) diff --git a/mailersend/resources/domains.py b/mailersend/resources/domains.py index db30010..4ae2a35 100644 --- a/mailersend/resources/domains.py +++ b/mailersend/resources/domains.py @@ -2,7 +2,7 @@ from typing import Optional -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.domains import ( DomainListRequest, DomainCreateRequest, @@ -202,3 +202,145 @@ def get_domain_verification_status( ) return self._create_response(response) + + +class AsyncDomains(AsyncBaseResource): + """Async client for interacting with the MailerSend Domains API.""" + + async def list_domains( + self, request: Optional[DomainListRequest] = None + ) -> APIResponse: + """ + Retrieve a list of domains. + + Args: + request: Optional DomainListRequest with filtering and pagination options + + Returns: + APIResponse with list of domains + """ + if not request: + query_params = DomainListQueryParams() + params = query_params.to_query_params() + else: + params = request.to_query_params() + response = await self.client.request( + method="GET", path="domains", params=params + ) + return self._create_response(response) + + async def get_domain(self, request: DomainGetRequest) -> APIResponse: + """ + Retrieve information about a single domain. + + Args: + request: DomainGetRequest with domain ID + + Returns: + APIResponse with domain information + """ + response = await self.client.request( + method="GET", path=f"domains/{request.domain_id}" + ) + return self._create_response(response) + + async def create_domain(self, request: DomainCreateRequest) -> APIResponse: + """ + Create a new domain. + + Args: + request: DomainCreateRequest with domain creation details + + Returns: + APIResponse with created domain information + """ + body = request.model_dump(by_alias=True, exclude_none=True) + response = await self.client.request(method="POST", path="domains", body=body) + return self._create_response(response) + + async def delete_domain(self, request: DomainDeleteRequest) -> APIResponse: + """ + Delete a domain. + + Args: + request: DomainDeleteRequest with domain ID to delete + + Returns: + APIResponse (204 No Content on success) + """ + response = await self.client.request( + method="DELETE", path=f"domains/{request.domain_id}" + ) + return self._create_response(response) + + async def get_domain_recipients( + self, request: DomainRecipientsRequest + ) -> APIResponse: + """ + Retrieve recipients for a domain. + + Args: + request: DomainRecipientsRequest with domain ID and pagination options + + Returns: + APIResponse with list of domain recipients + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path=f"domains/{request.domain_id}/recipients", params=params + ) + return self._create_response(response) + + async def update_domain_settings( + self, request: DomainUpdateSettingsRequest + ) -> APIResponse: + """ + Update domain settings. + + Args: + request: DomainUpdateSettingsRequest with domain ID and settings to update + + Returns: + APIResponse with updated domain information + """ + body = request.model_dump( + by_alias=True, exclude_none=True, exclude={"domain_id"} + ) + response = await self.client.request( + method="PUT", path=f"domains/{request.domain_id}/settings", body=body + ) + return self._create_response(response) + + async def get_domain_dns_records( + self, request: DomainDnsRecordsRequest + ) -> APIResponse: + """ + Retrieve DNS records for a domain. + + Args: + request: DomainDnsRecordsRequest with domain ID + + Returns: + APIResponse with domain DNS records + """ + response = await self.client.request( + method="GET", path=f"domains/{request.domain_id}/dns-records" + ) + return self._create_response(response) + + async def get_domain_verification_status( + self, request: DomainVerificationRequest + ) -> APIResponse: + """ + Retrieve verification status for a domain. + + Args: + request: DomainVerificationRequest with domain ID + + Returns: + APIResponse with domain verification status + """ + response = await self.client.request( + method="GET", path=f"domains/{request.domain_id}/verify" + ) + return self._create_response(response) diff --git a/mailersend/resources/email.py b/mailersend/resources/email.py index b3a1531..bd3a11c 100644 --- a/mailersend/resources/email.py +++ b/mailersend/resources/email.py @@ -2,7 +2,7 @@ from typing import List -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.email import EmailRequest from ..models.base import APIResponse @@ -77,3 +77,58 @@ def get_bulk_status(self, bulk_email_id: str) -> APIResponse: response = self.client.request(method="GET", path=f"bulk-email/{bulk_email_id}") return self._create_response(response) + + +class AsyncEmail(AsyncBaseResource): + """Async client for interacting with the MailerSend Email API.""" + + async def send(self, email: EmailRequest) -> APIResponse: + """ + Send a single email. + + Args: + email: A fully-validated EmailRequest object + + Returns: + APIResponse with email ID and metadata + """ + self.logger.debug("Preparing to send email") + payload = email.model_dump(by_alias=True, exclude_none=True) + self.logger.debug("Sending email request to MailerSend API") + response = await self.client.request(method="POST", path="email", body=payload) + email_data = {"id": response.headers.get("x-message-id")} + return self._create_response(response, email_data) + + async def send_bulk(self, emails: List[EmailRequest]) -> APIResponse: + """ + Send multiple emails in one request. + + Args: + emails: List of EmailRequest objects to send + + Returns: + APIResponse with bulk email information and metadata + """ + self.logger.debug("Preparing to send emails in bulk") + payload = [e.model_dump(by_alias=True, exclude_none=True) for e in emails] + self.logger.debug("Sending bulk email request to MailerSend API") + response = await self.client.request( + method="POST", path="bulk-email", body=payload + ) + return self._create_response(response) + + async def get_bulk_status(self, bulk_email_id: str) -> APIResponse: + """ + Get the status of a bulk email send request. + + Args: + bulk_email_id: The ID of the bulk email request + + Returns: + APIResponse with bulk email status and metadata + """ + self.logger.debug("Getting bulk email status") + response = await self.client.request( + method="GET", path=f"bulk-email/{bulk_email_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/email_verification.py b/mailersend/resources/email_verification.py index d31734c..2a2b5ca 100644 --- a/mailersend/resources/email_verification.py +++ b/mailersend/resources/email_verification.py @@ -1,6 +1,6 @@ """Email Verification resource""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.base import APIResponse from ..models.email_verification import ( EmailVerifyRequest, @@ -225,3 +225,138 @@ def get_results(self, request: EmailVerificationResultsRequest) -> APIResponse: # Create standardized response return self._create_response(response) + + +class AsyncEmailVerification(AsyncBaseResource): + """Async resource for managing email verification.""" + + async def verify_email(self, request: EmailVerifyRequest) -> APIResponse: + """Verify a single email address (synchronous). + + Args: + request: The email verification request data. + + Returns: + APIResponse with verification result + """ + body = request.model_dump(exclude_none=True) + response = await self.client.request( + method="POST", path="email-verification/verify", body=body + ) + return self._create_response(response) + + async def verify_email_async(self, request: EmailVerifyAsyncRequest) -> APIResponse: + """Verify a single email address (asynchronous). + + Args: + request: The async email verification request data. + + Returns: + APIResponse with verification result + """ + body = request.model_dump(exclude_none=True) + response = await self.client.request( + method="POST", path="email-verification/verify-async", body=body + ) + return self._create_response(response) + + async def get_async_status( + self, request: EmailVerificationAsyncStatusRequest + ) -> APIResponse: + """Get the status of an async email verification. + + Args: + request: The async status request data. + + Returns: + APIResponse with EmailVerificationAsyncStatusResponse data + """ + response = await self.client.request( + method="GET", + path=f"email-verification/verify-async/{request.email_verification_id}", + ) + return self._create_response(response) + + async def list_verifications( + self, request: EmailVerificationListsRequest + ) -> APIResponse: + """List all email verification lists. + + Args: + request: The list request data with pagination options. + + Returns: + APIResponse with list of email verification lists + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="email-verification", params=params + ) + return self._create_response(response) + + async def get_verification( + self, request: EmailVerificationGetRequest + ) -> APIResponse: + """Get a single email verification list. + + Args: + request: The get verification request data. + + Returns: + APIResponse with email verification list data + """ + response = await self.client.request( + method="GET", path=f"email-verification/{request.email_verification_id}" + ) + return self._create_response(response) + + async def create_verification( + self, request: EmailVerificationCreateRequest + ) -> APIResponse: + """Create a new email verification list. + + Args: + request: The create verification request data. + + Returns: + APIResponse with email verification list data + """ + body = request.model_dump(exclude_none=True) + response = await self.client.request( + method="POST", path="email-verification", body=body + ) + return self._create_response(response) + + async def verify_list(self, request: EmailVerificationVerifyRequest) -> APIResponse: + """Start verification of an email verification list. + + Args: + request: The verify list request data. + + Returns: + APIResponse with verification result + """ + response = await self.client.request( + method="GET", + path=f"email-verification/{request.email_verification_id}/verify", + ) + return self._create_response(response) + + async def get_results( + self, request: EmailVerificationResultsRequest + ) -> APIResponse: + """Get verification results for an email verification list. + + Args: + request: The results request data with optional filters. + + Returns: + APIResponse with verification results + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", + path=f"email-verification/{request.email_verification_id}/results", + params=params, + ) + return self._create_response(response) diff --git a/mailersend/resources/identities.py b/mailersend/resources/identities.py index 78424ae..0a28f9a 100644 --- a/mailersend/resources/identities.py +++ b/mailersend/resources/identities.py @@ -11,7 +11,7 @@ IdentityDeleteByEmailRequest, ) from ..models.base import APIResponse -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource class IdentitiesResource(BaseResource): @@ -211,3 +211,143 @@ def delete_identity_by_email( ) return self._create_response(response) + + +class AsyncIdentitiesResource(AsyncBaseResource): + """Async resource for managing sender identities.""" + + async def list_identities(self, request: IdentityListRequest) -> APIResponse: + """ + Get a list of sender identities. + + Args: + request: The identity list request containing filtering and pagination parameters + + Returns: + APIResponse containing the identities list response + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="identities", params=params if params else None + ) + return self._create_response(response) + + async def create_identity(self, request: IdentityCreateRequest) -> APIResponse: + """ + Create a new sender identity. + + Args: + request: The identity creation request with all required data + + Returns: + APIResponse containing the created identity response + """ + data = request.model_dump(by_alias=True, exclude_none=True) + response = await self.client.request( + method="POST", path="identities", body=data + ) + return self._create_response(response) + + async def get_identity(self, request: IdentityGetRequest) -> APIResponse: + """ + Get a single sender identity by ID. + + Args: + request: The identity get request with identity ID + + Returns: + APIResponse containing the identity data + """ + response = await self.client.request( + method="GET", path=f"identities/{request.identity_id}" + ) + return self._create_response(response) + + async def get_identity_by_email( + self, request: IdentityGetByEmailRequest + ) -> APIResponse: + """ + Get a single sender identity by email. + + Args: + request: The identity get by email request + + Returns: + APIResponse containing the identity data + """ + response = await self.client.request( + method="GET", path=f"identities/email/{request.email}" + ) + return self._create_response(response) + + async def update_identity(self, request: IdentityUpdateRequest) -> APIResponse: + """ + Update a sender identity by ID. + + Args: + request: The identity update request with identity ID and update data + + Returns: + APIResponse containing the updated identity + """ + data = request.model_dump( + by_alias=True, exclude_none=True, exclude={"identity_id"} + ) + response = await self.client.request( + method="PUT", + path=f"identities/{request.identity_id}", + body=data if data else None, + ) + return self._create_response(response) + + async def update_identity_by_email( + self, request: IdentityUpdateByEmailRequest + ) -> APIResponse: + """ + Update a sender identity by email. + + Args: + request: The identity update by email request + + Returns: + APIResponse containing the updated identity + """ + data = request.model_dump(by_alias=True, exclude_none=True, exclude={"email"}) + response = await self.client.request( + method="PUT", + path=f"identities/email/{request.email}", + body=data if data else None, + ) + return self._create_response(response) + + async def delete_identity(self, request: IdentityDeleteRequest) -> APIResponse: + """ + Delete a sender identity by ID. + + Args: + request: The identity delete request with identity ID + + Returns: + APIResponse containing the deletion result + """ + response = await self.client.request( + method="DELETE", path=f"identities/{request.identity_id}" + ) + return self._create_response(response) + + async def delete_identity_by_email( + self, request: IdentityDeleteByEmailRequest + ) -> APIResponse: + """ + Delete a sender identity by email. + + Args: + request: The identity delete by email request + + Returns: + APIResponse containing the deletion result + """ + response = await self.client.request( + method="DELETE", path=f"identities/email/{request.email}" + ) + return self._create_response(response) diff --git a/mailersend/resources/inbound.py b/mailersend/resources/inbound.py index 0c1a5f1..c0d94cd 100644 --- a/mailersend/resources/inbound.py +++ b/mailersend/resources/inbound.py @@ -8,7 +8,7 @@ InboundDeleteRequest, ) from mailersend.models.base import APIResponse -from mailersend.resources.base import BaseResource +from mailersend.resources.base import AsyncBaseResource, BaseResource class InboundResource(BaseResource): @@ -135,3 +135,83 @@ def delete(self, request: InboundDeleteRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncInboundResource(AsyncBaseResource): + """Async resource for managing inbound routes.""" + + async def list(self, request: InboundListRequest) -> APIResponse: + """ + Get a list of inbound routes. + + Args: + request: The inbound list request containing filtering and pagination parameters + + Returns: + APIResponse containing the inbound routes list response + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="inbound", params=params if params else None + ) + return self._create_response(response) + + async def get(self, request: InboundGetRequest) -> APIResponse: + """ + Get a single inbound route by ID. + + Args: + request: The inbound get request with inbound ID + + Returns: + APIResponse containing the inbound route data + """ + response = await self.client.request( + method="GET", path=f"inbound/{request.inbound_id}" + ) + return self._create_response(response) + + async def create(self, request: InboundCreateRequest) -> APIResponse: + """ + Create a new inbound route. + + Args: + request: The inbound create request with all required data + + Returns: + APIResponse containing the created inbound route response + """ + data = request.to_request_body() + response = await self.client.request(method="POST", path="inbound", body=data) + return self._create_response(response) + + async def update(self, request: InboundUpdateRequest) -> APIResponse: + """ + Update an existing inbound route. + + Args: + request: The inbound update request with inbound ID and update data + + Returns: + APIResponse containing the updated response + """ + data = request.to_request_body() + response = await self.client.request( + method="PUT", path=f"inbound/{request.inbound_id}", body=data + ) + return self._create_response(response) + + async def delete(self, request: InboundDeleteRequest) -> APIResponse: + """ + Delete an inbound route. + + Args: + request: The inbound delete request with inbound ID + + Returns: + APIResponse containing the deletion result + """ + response = await self.client.request( + method="DELETE", path=f"inbound/{request.inbound_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/messages.py b/mailersend/resources/messages.py index 220c1a8..b69aab3 100644 --- a/mailersend/resources/messages.py +++ b/mailersend/resources/messages.py @@ -1,6 +1,6 @@ """Messages resource""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.messages import ( MessagesListRequest, MessageGetRequest, @@ -57,3 +57,38 @@ def get_message(self, request: MessageGetRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncMessages(AsyncBaseResource): + """Async client for interacting with the MailerSend Messages API.""" + + async def list_messages(self, request: MessagesListRequest) -> APIResponse: + """ + Retrieve a list of messages. + + Args: + request: MessagesListRequest with pagination options + + Returns: + APIResponse containing the messages list response + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="messages", params=params if params else None + ) + return self._create_response(response) + + async def get_message(self, request: MessageGetRequest) -> APIResponse: + """ + Retrieve information about a single message. + + Args: + request: MessageGetRequest with message ID + + Returns: + APIResponse containing the message response + """ + response = await self.client.request( + method="GET", path=f"messages/{request.message_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/other.py b/mailersend/resources/other.py index 27fa586..587d8fd 100644 --- a/mailersend/resources/other.py +++ b/mailersend/resources/other.py @@ -1,6 +1,6 @@ """Other endpoints resource""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.base import APIResponse @@ -23,3 +23,17 @@ def get_quota(self) -> APIResponse: response = self.client.request(method="GET", path="api-quota") return self._create_response(response) + + +class AsyncOther(AsyncBaseResource): + """Async client for other MailerSend API endpoints.""" + + async def get_quota(self) -> APIResponse: + """ + Get API quota information. + + Returns: + APIResponse with quota information including remaining requests + """ + response = await self.client.request(method="GET", path="api-quota") + return self._create_response(response) diff --git a/mailersend/resources/recipients.py b/mailersend/resources/recipients.py index f881d4a..f0d6a38 100644 --- a/mailersend/resources/recipients.py +++ b/mailersend/resources/recipients.py @@ -13,7 +13,7 @@ RecipientsListQueryParams, SuppressionListQueryParams, ) -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource class Recipients(BaseResource): @@ -425,3 +425,311 @@ def delete_from_on_hold(self, request: SuppressionDeleteRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncRecipients(AsyncBaseResource): + """Async Recipients API resource.""" + + async def list_recipients( + self, request: Optional[RecipientsListRequest] = None + ) -> APIResponse: + """ + List recipients with optional filtering. + + Args: + request: Request parameters for listing recipients (optional) + + Returns: + APIResponse with recipients list + """ + if request is None: + request = RecipientsListRequest(query_params=RecipientsListQueryParams()) + params = request.to_query_params() + response = await self.client.request( + method="GET", path="recipients", params=params + ) + return self._create_response(response) + + async def get_recipient(self, request: RecipientGetRequest) -> APIResponse: + """ + Get a single recipient by ID. + + Args: + request: Request parameters for getting recipient + + Returns: + APIResponse with recipient data + """ + response = await self.client.request( + method="GET", path=f"recipients/{request.recipient_id}" + ) + return self._create_response(response) + + async def delete_recipient(self, request: RecipientDeleteRequest) -> APIResponse: + """ + Delete a recipient. + + Args: + request: Request parameters for deleting recipient + + Returns: + APIResponse with empty data + """ + response = await self.client.request( + method="DELETE", path=f"recipients/{request.recipient_id}" + ) + return self._create_response(response) + + async def list_blocklist( + self, request: Optional[SuppressionListRequest] = None + ) -> APIResponse: + """ + List blocklist entries. + + Args: + request: Request parameters for listing blocklist entries (optional) + + Returns: + APIResponse with blocklist entries + """ + if request is None: + request = SuppressionListRequest(query_params=SuppressionListQueryParams()) + params = request.to_query_params() + response = await self.client.request( + method="GET", path="suppressions/blocklist", params=params + ) + return self._create_response(response) + + async def list_hard_bounces( + self, request: Optional[SuppressionListRequest] = None + ) -> APIResponse: + """ + List hard bounces. + + Args: + request: Request parameters for listing hard bounces (optional) + + Returns: + APIResponse with hard bounces + """ + if request is None: + request = SuppressionListRequest(query_params=SuppressionListQueryParams()) + params = request.to_query_params() + response = await self.client.request( + method="GET", path="suppressions/hard-bounces", params=params + ) + return self._create_response(response) + + async def list_spam_complaints( + self, request: Optional[SuppressionListRequest] = None + ) -> APIResponse: + """ + List spam complaints. + + Args: + request: Request parameters for listing spam complaints (optional) + + Returns: + APIResponse with spam complaints + """ + if request is None: + request = SuppressionListRequest(query_params=SuppressionListQueryParams()) + params = request.to_query_params() + response = await self.client.request( + method="GET", path="suppressions/spam-complaints", params=params + ) + return self._create_response(response) + + async def list_unsubscribes( + self, request: Optional[SuppressionListRequest] = None + ) -> APIResponse: + """ + List unsubscribes. + + Args: + request: Request parameters for listing unsubscribes (optional) + + Returns: + APIResponse with unsubscribes + """ + if request is None: + request = SuppressionListRequest(query_params=SuppressionListQueryParams()) + params = request.to_query_params() + response = await self.client.request( + method="GET", path="suppressions/unsubscribes", params=params + ) + return self._create_response(response) + + async def list_on_hold( + self, request: Optional[SuppressionListRequest] = None + ) -> APIResponse: + """ + List on-hold entries. + + Args: + request: Request parameters for listing on-hold entries (optional) + + Returns: + APIResponse with on-hold entries + """ + if request is None: + request = SuppressionListRequest(query_params=SuppressionListQueryParams()) + params = request.to_query_params() + response = await self.client.request( + method="GET", path="suppressions/on-hold-list", params=params + ) + return self._create_response(response) + + async def add_to_blocklist(self, request: SuppressionAddRequest) -> APIResponse: + """ + Add entries to blocklist. + + Args: + request: Request parameters for adding to blocklist + + Returns: + APIResponse with added entries + """ + body = request.model_dump(by_alias=True, exclude_none=True) + response = await self.client.request( + method="POST", path="suppressions/blocklist", body=body + ) + return self._create_response(response) + + async def add_hard_bounces(self, request: SuppressionAddRequest) -> APIResponse: + """ + Add hard bounces. + + Args: + request: Request parameters for adding hard bounces + + Returns: + APIResponse with added entries + """ + body = request.model_dump(by_alias=True, exclude_none=True) + response = await self.client.request( + method="POST", path="suppressions/hard-bounces", body=body + ) + return self._create_response(response) + + async def add_spam_complaints(self, request: SuppressionAddRequest) -> APIResponse: + """ + Add spam complaints. + + Args: + request: Request parameters for adding spam complaints + + Returns: + APIResponse with added entries + """ + body = request.model_dump(by_alias=True, exclude_none=True) + response = await self.client.request( + method="POST", path="suppressions/spam-complaints", body=body + ) + return self._create_response(response) + + async def add_unsubscribes(self, request: SuppressionAddRequest) -> APIResponse: + """ + Add unsubscribes. + + Args: + request: Request parameters for adding unsubscribes + + Returns: + APIResponse with added entries + """ + body = request.model_dump(by_alias=True, exclude_none=True) + response = await self.client.request( + method="POST", path="suppressions/unsubscribes", body=body + ) + return self._create_response(response) + + async def delete_from_blocklist( + self, request: SuppressionDeleteRequest + ) -> APIResponse: + """ + Delete entries from blocklist. + + Args: + request: Request parameters for deleting from blocklist + + Returns: + APIResponse with deleted entries + """ + body = request.model_dump(by_alias=True, exclude_none=True) + response = await self.client.request( + method="DELETE", path="suppressions/blocklist", body=body + ) + return self._create_response(response) + + async def delete_hard_bounces( + self, request: SuppressionDeleteRequest + ) -> APIResponse: + """ + Delete hard bounces. + + Args: + request: Request parameters for deleting hard bounces + + Returns: + APIResponse with deleted entries + """ + body = request.model_dump(exclude_none=True, exclude={"domain_id"}) + response = await self.client.request( + method="DELETE", path="suppressions/hard-bounces", body=body + ) + return self._create_response(response) + + async def delete_spam_complaints( + self, request: SuppressionDeleteRequest + ) -> APIResponse: + """ + Delete spam complaints. + + Args: + request: Request parameters for deleting spam complaints + + Returns: + APIResponse with deleted entries + """ + body = request.model_dump(exclude_none=True, exclude={"domain_id"}) + response = await self.client.request( + method="DELETE", path="suppressions/spam-complaints", body=body + ) + return self._create_response(response) + + async def delete_unsubscribes( + self, request: SuppressionDeleteRequest + ) -> APIResponse: + """ + Delete unsubscribes. + + Args: + request: Request parameters for deleting unsubscribes + + Returns: + APIResponse with deleted entries + """ + body = request.model_dump(exclude_none=True, exclude={"domain_id"}) + response = await self.client.request( + method="DELETE", path="suppressions/unsubscribes", body=body + ) + return self._create_response(response) + + async def delete_from_on_hold( + self, request: SuppressionDeleteRequest + ) -> APIResponse: + """ + Delete entries from on-hold list. + + Args: + request: Request parameters for deleting from on-hold + + Returns: + APIResponse with deleted entries + """ + body = request.model_dump(exclude_none=True, exclude={"domain_id"}) + response = await self.client.request( + method="DELETE", path="suppressions/on-hold-list", body=body + ) + return self._create_response(response) diff --git a/mailersend/resources/schedules.py b/mailersend/resources/schedules.py index d3dd405..90815e6 100644 --- a/mailersend/resources/schedules.py +++ b/mailersend/resources/schedules.py @@ -1,6 +1,6 @@ """Schedules resource""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.schedules import ( SchedulesListRequest, ScheduleGetRequest, @@ -85,3 +85,53 @@ def delete_schedule(self, request: ScheduleDeleteRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncSchedules(AsyncBaseResource): + """Async client for interacting with the MailerSend Schedules API.""" + + async def list_schedules(self, request: SchedulesListRequest) -> APIResponse: + """ + Retrieve a list of scheduled messages. + + Args: + request: SchedulesListRequest with filtering and pagination options + + Returns: + APIResponse containing the schedules list response + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="message-schedules", params=params if params else None + ) + return self._create_response(response) + + async def get_schedule(self, request: ScheduleGetRequest) -> APIResponse: + """ + Retrieve information about a single scheduled message. + + Args: + request: ScheduleGetRequest with message ID + + Returns: + APIResponse containing the schedule response + """ + response = await self.client.request( + method="GET", path=f"message-schedules/{request.message_id}" + ) + return self._create_response(response) + + async def delete_schedule(self, request: ScheduleDeleteRequest) -> APIResponse: + """ + Delete a scheduled message. + + Args: + request: ScheduleDeleteRequest with message ID to delete + + Returns: + APIResponse (204 No Content on success) + """ + response = await self.client.request( + method="DELETE", path=f"message-schedules/{request.message_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/sms_activity.py b/mailersend/resources/sms_activity.py index a078fc5..cb18980 100644 --- a/mailersend/resources/sms_activity.py +++ b/mailersend/resources/sms_activity.py @@ -2,7 +2,7 @@ SMS Activity API resource. """ -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.sms_activity import SmsActivityListRequest, SmsMessageGetRequest from ..models.base import APIResponse @@ -53,3 +53,38 @@ def get(self, request: SmsMessageGetRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncSmsActivity(AsyncBaseResource): + """Async resource for SMS Activity API endpoints.""" + + async def list(self, request: SmsActivityListRequest) -> APIResponse: + """ + Get a list of SMS activities. + + Args: + request: SMS activity list request + + Returns: + API response with SMS activities + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="sms-activity", params=params + ) + return self._create_response(response) + + async def get(self, request: SmsMessageGetRequest) -> APIResponse: + """ + Get activity of a single SMS message. + + Args: + request: SMS message get request + + Returns: + API response with SMS message activity + """ + response = await self.client.request( + method="GET", path=f"sms-messages/{request.sms_message_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/sms_inbounds.py b/mailersend/resources/sms_inbounds.py index 9d22afb..15881d6 100644 --- a/mailersend/resources/sms_inbounds.py +++ b/mailersend/resources/sms_inbounds.py @@ -1,6 +1,6 @@ """SMS Inbounds resource.""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.sms_inbounds import ( SmsInboundsListRequest, SmsInboundGetRequest, @@ -103,3 +103,80 @@ def delete_sms_inbound(self, request: SmsInboundDeleteRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncSmsInbounds(AsyncBaseResource): + """Async SMS Inbounds resource.""" + + async def list_sms_inbounds(self, request: SmsInboundsListRequest) -> APIResponse: + """List SMS inbound routes. + + Args: + request: SmsInboundsListRequest with query parameters + + Returns: + APIResponse: Response containing list of SMS inbound routes + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="sms-inbounds", params=params + ) + return self._create_response(response) + + async def get_sms_inbound(self, request: SmsInboundGetRequest) -> APIResponse: + """Get a single SMS inbound route. + + Args: + request: SmsInboundGetRequest with inbound ID + + Returns: + APIResponse: Response containing SMS inbound route details + """ + response = await self.client.request( + method="GET", path=f"sms-inbounds/{request.sms_inbound_id}" + ) + return self._create_response(response) + + async def create_sms_inbound(self, request: SmsInboundCreateRequest) -> APIResponse: + """Create a new SMS inbound route. + + Args: + request: SmsInboundCreateRequest with inbound route details + + Returns: + APIResponse: Response containing created SMS inbound route + """ + response = await self.client.request( + method="POST", path="sms-inbounds", body=request.to_request_body() + ) + return self._create_response(response) + + async def update_sms_inbound(self, request: SmsInboundUpdateRequest) -> APIResponse: + """Update an existing SMS inbound route. + + Args: + request: SmsInboundUpdateRequest with inbound ID and updated fields + + Returns: + APIResponse: Response containing updated SMS inbound route + """ + response = await self.client.request( + method="PUT", + path=f"sms-inbounds/{request.sms_inbound_id}", + body=request.to_request_body(), + ) + return self._create_response(response) + + async def delete_sms_inbound(self, request: SmsInboundDeleteRequest) -> APIResponse: + """Delete an SMS inbound route. + + Args: + request: SmsInboundDeleteRequest with inbound ID + + Returns: + APIResponse: Response confirming deletion + """ + response = await self.client.request( + method="DELETE", path=f"sms-inbounds/{request.sms_inbound_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/sms_messages.py b/mailersend/resources/sms_messages.py index 71fdac1..766283a 100644 --- a/mailersend/resources/sms_messages.py +++ b/mailersend/resources/sms_messages.py @@ -1,6 +1,6 @@ """SMS Messages resource.""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.sms_messages import SmsMessagesListRequest, SmsMessageGetRequest from ..models.base import APIResponse @@ -47,3 +47,38 @@ def get_sms_message(self, request: SmsMessageGetRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncSmsMessages(AsyncBaseResource): + """Async SMS Messages resource.""" + + async def list_sms_messages(self, request: SmsMessagesListRequest) -> APIResponse: + """ + List SMS messages. + + Args: + request: SmsMessagesListRequest object containing query parameters + + Returns: + APIResponse: Response containing list of SMS messages + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="sms-messages", params=params + ) + return self._create_response(response) + + async def get_sms_message(self, request: SmsMessageGetRequest) -> APIResponse: + """ + Get a single SMS message. + + Args: + request: SmsMessageGetRequest object containing SMS message ID + + Returns: + APIResponse: Response containing SMS message details + """ + response = await self.client.request( + method="GET", path=f"sms-messages/{request.sms_message_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/sms_numbers.py b/mailersend/resources/sms_numbers.py index 3bf0410..f7c1153 100644 --- a/mailersend/resources/sms_numbers.py +++ b/mailersend/resources/sms_numbers.py @@ -1,6 +1,6 @@ """SMS Numbers resource""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.sms_numbers import ( SmsNumbersListRequest, SmsNumberGetRequest, @@ -94,3 +94,70 @@ def delete(self, request: SmsNumberDeleteRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncSmsNumbers(AsyncBaseResource): + """Async client for the MailerSend SMS Phone Numbers API.""" + + async def list(self, request: SmsNumbersListRequest) -> APIResponse: + """ + Get a list of SMS phone numbers. + + Args: + request: SmsNumbersListRequest with query parameters + + Returns: + APIResponse with SMS phone numbers list and metadata + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="sms-numbers", params=params + ) + return self._create_response(response) + + async def get(self, request: SmsNumberGetRequest) -> APIResponse: + """ + Get a specific SMS phone number. + + Args: + request: SmsNumberGetRequest with SMS number ID + + Returns: + APIResponse with SMS phone number data and metadata + """ + response = await self.client.request( + method="GET", path=f"sms-numbers/{request.sms_number_id}" + ) + return self._create_response(response) + + async def update(self, request: SmsNumberUpdateRequest) -> APIResponse: + """ + Update a specific SMS phone number. + + Args: + request: SmsNumberUpdateRequest with SMS number ID and update data + + Returns: + APIResponse with updated SMS phone number data and metadata + """ + response = await self.client.request( + method="PUT", + path=f"sms-numbers/{request.sms_number_id}", + body=request.to_json(), + ) + return self._create_response(response) + + async def delete(self, request: SmsNumberDeleteRequest) -> APIResponse: + """ + Delete a specific SMS phone number. + + Args: + request: SmsNumberDeleteRequest with SMS number ID + + Returns: + APIResponse with deletion confirmation and metadata + """ + response = await self.client.request( + method="DELETE", path=f"sms-numbers/{request.sms_number_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/sms_recipients.py b/mailersend/resources/sms_recipients.py index a155675..b716679 100644 --- a/mailersend/resources/sms_recipients.py +++ b/mailersend/resources/sms_recipients.py @@ -1,6 +1,6 @@ """SMS Recipients resource.""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.sms_recipients import ( SmsRecipientsListRequest, SmsRecipientGetRequest, @@ -75,3 +75,59 @@ def update_sms_recipient(self, request: SmsRecipientUpdateRequest) -> APIRespons ) return self._create_response(response) + + +class AsyncSmsRecipients(AsyncBaseResource): + """Async SMS Recipients resource.""" + + async def list_sms_recipients( + self, request: SmsRecipientsListRequest + ) -> APIResponse: + """ + List SMS recipients. + + Args: + request: SmsRecipientsListRequest object containing query parameters + + Returns: + APIResponse: Response containing list of SMS recipients + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="sms-recipients", params=params + ) + return self._create_response(response) + + async def get_sms_recipient(self, request: SmsRecipientGetRequest) -> APIResponse: + """ + Get a single SMS recipient. + + Args: + request: SmsRecipientGetRequest object containing SMS recipient ID + + Returns: + APIResponse: Response containing SMS recipient details + """ + response = await self.client.request( + method="GET", path=f"sms-recipients/{request.sms_recipient_id}" + ) + return self._create_response(response) + + async def update_sms_recipient( + self, request: SmsRecipientUpdateRequest + ) -> APIResponse: + """ + Update a single SMS recipient. + + Args: + request: SmsRecipientUpdateRequest object containing SMS recipient ID and new status + + Returns: + APIResponse: Response containing updated SMS recipient + """ + response = await self.client.request( + method="PUT", + path=f"sms-recipients/{request.sms_recipient_id}", + body=request.to_request_body(), + ) + return self._create_response(response) diff --git a/mailersend/resources/sms_sending.py b/mailersend/resources/sms_sending.py index 9a1998c..fc97f63 100644 --- a/mailersend/resources/sms_sending.py +++ b/mailersend/resources/sms_sending.py @@ -1,6 +1,6 @@ """SMS Sending resource""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.sms_sending import SmsSendRequest from ..models.base import APIResponse @@ -30,3 +30,21 @@ def send(self, request: SmsSendRequest) -> APIResponse: response = self.client.request(method="POST", path="sms", body=payload) return self._create_response(response) + + +class AsyncSmsSending(AsyncBaseResource): + """Async client for the MailerSend SMS Sending API.""" + + async def send(self, request: SmsSendRequest) -> APIResponse: + """ + Send an SMS message. + + Args: + request: SmsSendRequest with SMS details + + Returns: + APIResponse with SMS sending response and metadata + """ + payload = request.to_json() + response = await self.client.request(method="POST", path="sms", body=payload) + return self._create_response(response) diff --git a/mailersend/resources/sms_webhooks.py b/mailersend/resources/sms_webhooks.py index 63dceb0..219f4d2 100644 --- a/mailersend/resources/sms_webhooks.py +++ b/mailersend/resources/sms_webhooks.py @@ -1,6 +1,6 @@ """SMS Webhooks resource.""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.sms_webhooks import ( SmsWebhooksListRequest, SmsWebhookGetRequest, @@ -111,3 +111,83 @@ def delete_sms_webhook(self, request: SmsWebhookDeleteRequest) -> APIResponse: ) return self._create_response(response) + + +class AsyncSmsWebhooks(AsyncBaseResource): + """Async SMS Webhooks resource.""" + + async def list_sms_webhooks(self, request: SmsWebhooksListRequest) -> APIResponse: + """List SMS webhooks. + + Args: + request: SmsWebhooksListRequest object containing query parameters + + Returns: + APIResponse: Response containing list of SMS webhooks + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="sms-webhooks", params=params + ) + return self._create_response(response) + + async def get_sms_webhook(self, request: SmsWebhookGetRequest) -> APIResponse: + """Get a single SMS webhook. + + Args: + request: SmsWebhookGetRequest object containing SMS webhook ID + + Returns: + APIResponse: Response containing SMS webhook details + """ + response = await self.client.request( + method="GET", path=f"sms-webhooks/{request.sms_webhook_id}" + ) + return self._create_response(response) + + async def create_sms_webhook(self, request: SmsWebhookCreateRequest) -> APIResponse: + """ + Create an SMS webhook. + + Args: + request: SmsWebhookCreateRequest object containing webhook data + + Returns: + APIResponse: Response containing created SMS webhook + """ + response = await self.client.request( + method="POST", path="sms-webhooks", body=request.to_request_body() + ) + return self._create_response(response) + + async def update_sms_webhook(self, request: SmsWebhookUpdateRequest) -> APIResponse: + """ + Update an SMS webhook. + + Args: + request: SmsWebhookUpdateRequest object containing SMS webhook ID and update data + + Returns: + APIResponse: Response containing updated SMS webhook + """ + response = await self.client.request( + method="PUT", + path=f"sms-webhooks/{request.sms_webhook_id}", + body=request.to_request_body(), + ) + return self._create_response(response) + + async def delete_sms_webhook(self, request: SmsWebhookDeleteRequest) -> APIResponse: + """ + Delete an SMS webhook. + + Args: + request: SmsWebhookDeleteRequest object containing SMS webhook ID + + Returns: + APIResponse: Response confirming deletion + """ + response = await self.client.request( + method="DELETE", path=f"sms-webhooks/{request.sms_webhook_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/smtp_users.py b/mailersend/resources/smtp_users.py index 46727b8..a5de7f4 100644 --- a/mailersend/resources/smtp_users.py +++ b/mailersend/resources/smtp_users.py @@ -1,6 +1,6 @@ """SMTP Users API resource.""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.base import APIResponse from ..models.smtp_users import ( SmtpUsersListRequest, @@ -137,3 +137,84 @@ def delete_smtp_user(self, request: SmtpUserDeleteRequest) -> APIResponse: # Create standardized response return self._create_response(response) + + +class AsyncSmtpUsers(AsyncBaseResource): + """Async SMTP Users API resource.""" + + async def list_smtp_users(self, request: SmtpUsersListRequest) -> APIResponse: + """List SMTP users for a domain. + + Args: + request: The list SMTP users request + + Returns: + APIResponse: API response with SMTP users list data + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path=f"domains/{request.domain_id}/smtp-users", params=params + ) + return self._create_response(response) + + async def get_smtp_user(self, request: SmtpUserGetRequest) -> APIResponse: + """Get a single SMTP user. + + Args: + request: The get SMTP user request + + Returns: + APIResponse: API response with SMTP user data + """ + response = await self.client.request( + method="GET", + path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", + ) + return self._create_response(response) + + async def create_smtp_user(self, request: SmtpUserCreateRequest) -> APIResponse: + """Create an SMTP user. + + Args: + request: The create SMTP user request + + Returns: + APIResponse: API response with SMTP user creation data + """ + response = await self.client.request( + method="POST", + path=f"domains/{request.domain_id}/smtp-users", + body=request.to_json(), + ) + return self._create_response(response) + + async def update_smtp_user(self, request: SmtpUserUpdateRequest) -> APIResponse: + """Update an SMTP user. + + Args: + request: The update SMTP user request + + Returns: + APIResponse: API response with updated SMTP user data + """ + response = await self.client.request( + method="PUT", + path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", + body=request.to_json(), + ) + return self._create_response(response) + + async def delete_smtp_user(self, request: SmtpUserDeleteRequest) -> APIResponse: + """Delete an SMTP user. + + Args: + request: The delete SMTP user request + + Returns: + APIResponse: API response with delete confirmation + """ + response = await self.client.request( + method="DELETE", + path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", + ) + return self._create_response(response) diff --git a/mailersend/resources/templates.py b/mailersend/resources/templates.py index f26123d..a3c9f41 100644 --- a/mailersend/resources/templates.py +++ b/mailersend/resources/templates.py @@ -2,7 +2,7 @@ from typing import Optional -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.base import APIResponse from ..models.templates import ( TemplatesListRequest, @@ -90,3 +90,57 @@ def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: # Create standardized response return self._create_response(response) + + +class AsyncTemplates(AsyncBaseResource): + """Async client for interacting with the MailerSend Templates API.""" + + async def list_templates( + self, request: Optional[TemplatesListRequest] = None + ) -> APIResponse: + """ + Retrieve a list of templates. + + Args: + request: Optional TemplatesListRequest with filtering and pagination options + + Returns: + APIResponse with TemplatesListResponse data + """ + if request is None: + request = TemplatesListRequest() + params = request.to_query_params() + response = await self.client.request( + method="GET", path="templates", params=params + ) + return self._create_response(response) + + async def get_template(self, request: TemplateGetRequest) -> APIResponse: + """ + Retrieve information about a single template. + + Args: + request: TemplateGetRequest with template ID + + Returns: + APIResponse with TemplateResponse data + """ + response = await self.client.request( + method="GET", path=f"templates/{request.template_id}" + ) + return self._create_response(response) + + async def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: + """ + Delete a template. + + Args: + request: TemplateDeleteRequest with template ID to delete + + Returns: + APIResponse with empty data + """ + response = await self.client.request( + method="DELETE", path=f"templates/{request.template_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/tokens.py b/mailersend/resources/tokens.py index 08d07ff..b2bf362 100644 --- a/mailersend/resources/tokens.py +++ b/mailersend/resources/tokens.py @@ -1,6 +1,6 @@ """Tokens API resource.""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.base import APIResponse from ..models.tokens import ( TokensListRequest, @@ -135,3 +135,92 @@ def delete_token(self, request: TokenDeleteRequest) -> APIResponse: # Create standardized response return self._create_response(response) + + +class AsyncTokens(AsyncBaseResource): + """Async Tokens API resource.""" + + async def list_tokens(self, request: TokensListRequest) -> APIResponse: + """List API tokens. + + Args: + request: The list tokens request + + Returns: + APIResponse: API response with tokens list data + """ + params = request.to_query_params() + response = await self.client.request(method="GET", path="token", params=params) + return self._create_response(response) + + async def get_token(self, request: TokenGetRequest) -> APIResponse: + """Get a single API token. + + Args: + request: The get token request + + Returns: + APIResponse: API response with token data + """ + response = await self.client.request( + method="GET", path=f"token/{request.token_id}" + ) + return self._create_response(response) + + async def create_token(self, request: TokenCreateRequest) -> APIResponse: + """Create an API token. + + Args: + request: The create token request + + Returns: + APIResponse: API response with token creation data + """ + response = await self.client.request( + method="POST", path="token", body=request.to_json() + ) + return self._create_response(response) + + async def update_token(self, request: TokenUpdateRequest) -> APIResponse: + """Update an API token status. + + Args: + request: The update token request + + Returns: + APIResponse: API response with update confirmation + """ + response = await self.client.request( + method="PUT", + path=f"token/{request.token_id}/settings", + body=request.to_json(), + ) + return self._create_response(response) + + async def update_token_name(self, request: TokenUpdateNameRequest) -> APIResponse: + """Update an API token name. + + Args: + request: The update token name request + + Returns: + APIResponse: API response with update confirmation + """ + response = await self.client.request( + method="PUT", path=f"token/{request.token_id}", body=request.to_json() + ) + return self._create_response(response) + + async def delete_token(self, request: TokenDeleteRequest) -> APIResponse: + """Delete an API token. + + Args: + request: The delete token request + + Returns: + APIResponse: API response with delete confirmation + """ + response = await self.client.request( + method="DELETE", path=f"token/{request.token_id}" + ) + return self._create_response(response) diff --git a/mailersend/resources/users.py b/mailersend/resources/users.py index c58fc31..4d34c3c 100644 --- a/mailersend/resources/users.py +++ b/mailersend/resources/users.py @@ -1,6 +1,6 @@ """Users API resource.""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.base import APIResponse from ..models.users import ( UsersListRequest, @@ -198,3 +198,133 @@ def cancel_invite(self, request: InviteCancelRequest) -> APIResponse: # Create standardized response return self._create_response(response, None) + + +class AsyncUsers(AsyncBaseResource): + """Async Users API resource.""" + + async def list_users(self, request: UsersListRequest) -> APIResponse: + """Get a list of account users. + + Args: + request: The list users request + + Returns: + APIResponse: API response with users list data + """ + params = request.to_query_params() + response = await self.client.request(method="GET", path="users", params=params) + return self._create_response(response) + + async def get_user(self, request: UserGetRequest) -> APIResponse: + """Get a single account user. + + Args: + request: The get user request + + Returns: + APIResponse: API response with user data + """ + response = await self.client.request( + method="GET", path=f"users/{request.user_id}" + ) + return self._create_response(response) + + async def invite_user(self, request: UserInviteRequest) -> APIResponse: + """Invite a user to account. + + Args: + request: The user invite request + + Returns: + APIResponse: API response with invite data + """ + response = await self.client.request( + method="POST", path="users", body=request.to_json() + ) + return self._create_response(response) + + async def update_user(self, request: UserUpdateRequest) -> APIResponse: + """Update account user. + + Args: + request: The user update request + + Returns: + APIResponse: API response with updated user data + """ + response = await self.client.request( + method="PUT", path=f"users/{request.user_id}", body=request.to_json() + ) + return self._create_response(response) + + async def delete_user(self, request: UserDeleteRequest) -> APIResponse: + """Delete account user. + + Args: + request: The user delete request + + Returns: + APIResponse: API response with delete confirmation + """ + response = await self.client.request( + method="DELETE", path=f"users/{request.user_id}" + ) + return self._create_response(response, None) + + async def list_invites(self, request: InvitesListRequest) -> APIResponse: + """Get a list of invites. + + Args: + request: The list invites request + + Returns: + APIResponse: API response with invites list data + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="invites", params=params + ) + return self._create_response(response) + + async def get_invite(self, request: InviteGetRequest) -> APIResponse: + """Get a single invite. + + Args: + request: The get invite request + + Returns: + APIResponse: API response with invite data + """ + response = await self.client.request( + method="GET", path=f"invites/{request.invite_id}" + ) + return self._create_response(response) + + async def resend_invite(self, request: InviteResendRequest) -> APIResponse: + """Resend an invite. + + Args: + request: The invite resend request + + Returns: + APIResponse: API response with resent invite data + """ + response = await self.client.request( + method="POST", path=f"invites/{request.invite_id}/resend" + ) + return self._create_response(response) + + async def cancel_invite(self, request: InviteCancelRequest) -> APIResponse: + """Cancel an invite. + + Args: + request: The invite cancel request + + Returns: + APIResponse: API response with cancel confirmation + """ + response = await self.client.request( + method="DELETE", path=f"invites/{request.invite_id}" + ) + return self._create_response(response, None) diff --git a/mailersend/resources/webhooks.py b/mailersend/resources/webhooks.py index 031c1ff..418c2ea 100644 --- a/mailersend/resources/webhooks.py +++ b/mailersend/resources/webhooks.py @@ -1,6 +1,6 @@ """Webhooks resource for MailerSend SDK.""" -from .base import BaseResource +from .base import AsyncBaseResource, BaseResource from ..models.base import APIResponse from ..models.webhooks import ( WebhooksListRequest, @@ -123,3 +123,78 @@ def delete_webhook(self, request: WebhookDeleteRequest) -> APIResponse: # Create standardized response return self._create_response(response) + + +class AsyncWebhooks(AsyncBaseResource): + """Async Webhooks API resource.""" + + async def list_webhooks(self, request: WebhooksListRequest) -> APIResponse: + """List webhooks for a domain. + + Args: + request: The webhooks list request + + Returns: + APIResponse with WebhooksListResponse data + """ + params = request.to_query_params() + response = await self.client.request( + method="GET", path="webhooks", params=params + ) + return self._create_response(response) + + async def get_webhook(self, request: WebhookGetRequest) -> APIResponse: + """Get a single webhook by ID. + + Args: + request: The webhook get request + + Returns: + APIResponse with WebhookResponse data + """ + response = await self.client.request( + method="GET", path=f"webhooks/{request.webhook_id}" + ) + return self._create_response(response) + + async def create_webhook(self, request: WebhookCreateRequest) -> APIResponse: + """Create a new webhook. + + Args: + request: The webhook create request + + Returns: + APIResponse with WebhookResponse data + """ + data = request.model_dump(exclude_none=True) + response = await self.client.request(method="POST", path="webhooks", body=data) + return self._create_response(response) + + async def update_webhook(self, request: WebhookUpdateRequest) -> APIResponse: + """Update an existing webhook. + + Args: + request: The webhook update request + + Returns: + APIResponse with WebhookResponse data + """ + data = request.model_dump(exclude_none=True, exclude={"webhook_id"}) + response = await self.client.request( + method="PUT", path=f"webhooks/{request.webhook_id}", body=data + ) + return self._create_response(response) + + async def delete_webhook(self, request: WebhookDeleteRequest) -> APIResponse: + """Delete a webhook. + + Args: + request: The webhook delete request + + Returns: + APIResponse with empty data + """ + response = await self.client.request( + method="DELETE", path=f"webhooks/{request.webhook_id}" + ) + return self._create_response(response) diff --git a/poetry.lock b/poetry.lock index 28b05fd..4f6613d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.2.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.4.1 and should not be changed by hand. [[package]] name = "annotated-types" @@ -12,6 +12,39 @@ files = [ {file = "annotated_types-0.7.0.tar.gz", hash = "sha256:aff07c09a53a08bc8cfccb9c85b05f1aa9a2a6f23728d790723543408344ce89"}, ] +[[package]] +name = "anyio" +version = "4.13.0" +description = "High-level concurrency and networking framework on top of asyncio or Trio" +optional = false +python-versions = ">=3.10" +groups = ["main"] +files = [ + {file = "anyio-4.13.0-py3-none-any.whl", hash = "sha256:08b310f9e24a9594186fd75b4f73f4a4152069e3853f1ed8bfbf58369f4ad708"}, + {file = "anyio-4.13.0.tar.gz", hash = "sha256:334b70e641fd2221c1505b3890c69882fe4a2df910cba14d97019b90b24439dc"}, +] + +[package.dependencies] +exceptiongroup = {version = ">=1.0.2", markers = "python_version < \"3.11\""} +idna = ">=2.8" +typing_extensions = {version = ">=4.5", markers = "python_version < \"3.13\""} + +[package.extras] +trio = ["trio (>=0.32.0)"] + +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +description = "Backport of asyncio.Runner, a context manager that controls event loop life cycle." +optional = false +python-versions = "<3.11,>=3.8" +groups = ["dev"] +markers = "python_version == \"3.10\"" +files = [ + {file = "backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5"}, + {file = "backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162"}, +] + [[package]] name = "backports-tarfile" version = "1.2.0" @@ -646,7 +679,7 @@ version = "1.3.1" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" -groups = ["dev"] +groups = ["main", "dev"] markers = "python_version == \"3.10\"" files = [ {file = "exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598"}, @@ -705,6 +738,65 @@ gitdb = ">=4.0.1,<5" doc = ["sphinx (>=7.1.2,<7.2)", "sphinx-autodoc-typehints", "sphinx_rtd_theme"] test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock ; python_version < \"3.8\"", "mypy (==1.18.2) ; python_version >= \"3.9\"", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions ; python_version < \"3.11\""] +[[package]] +name = "h11" +version = "0.16.0" +description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86"}, + {file = "h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1"}, +] + +[[package]] +name = "httpcore" +version = "1.0.9" +description = "A minimal low-level HTTP client." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55"}, + {file = "httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8"}, +] + +[package.dependencies] +certifi = "*" +h11 = ">=0.16" + +[package.extras] +asyncio = ["anyio (>=4.0,<5.0)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +trio = ["trio (>=0.22.0,<1.0)"] + +[[package]] +name = "httpx" +version = "0.28.1" +description = "The next generation HTTP client." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad"}, + {file = "httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc"}, +] + +[package.dependencies] +anyio = "*" +certifi = "*" +httpcore = "==1.*" +idna = "*" + +[package.extras] +brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] +http2 = ["h2 (>=3,<5)"] +socks = ["socksio (==1.*)"] +zstd = ["zstandard (>=0.18.0)"] + [[package]] name = "identify" version = "2.6.15" @@ -1273,6 +1365,27 @@ tomli = {version = ">=1", markers = "python_version < \"3.11\""} [package.extras] dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "requests", "setuptools", "xmlschema"] +[[package]] +name = "pytest-asyncio" +version = "1.3.0" +description = "Pytest support for asyncio" +optional = false +python-versions = ">=3.10" +groups = ["dev"] +files = [ + {file = "pytest_asyncio-1.3.0-py3-none-any.whl", hash = "sha256:611e26147c7f77640e6d0a92a38ed17c3e9848063698d5c93d5aa7aa11cebff5"}, + {file = "pytest_asyncio-1.3.0.tar.gz", hash = "sha256:d7f52f36d231b80ee124cd216ffb19369aa168fc10095013c6b014a34d3ee9e5"}, +] + +[package.dependencies] +backports-asyncio-runner = {version = ">=1.1,<2", markers = "python_version < \"3.11\""} +pytest = ">=8.2,<10" +typing-extensions = {version = ">=4.12", markers = "python_version < \"3.13\""} + +[package.extras] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1)"] +testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] + [[package]] name = "pytest-mock" version = "3.15.1" @@ -1744,7 +1857,7 @@ files = [ {file = "typing_extensions-4.15.0-py3-none-any.whl", hash = "sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548"}, {file = "typing_extensions-4.15.0.tar.gz", hash = "sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466"}, ] -markers = {dev = "python_version == \"3.10\""} +markers = {dev = "python_version < \"3.13\""} [[package]] name = "typing-inspection" @@ -1978,4 +2091,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = "^3.10" -content-hash = "45c6d161702f919e8ca9cdcf32dc4bdba0bfe0581079a17f01db0e96c4bde21b" +content-hash = "6b4448a03cd02dc5c953328a65283eeb8c408ad2ea4691d356733c3ef0ef12a2" diff --git a/pyproject.toml b/pyproject.toml index 5b6dc5e..89f17ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,17 +8,23 @@ version = "2.0.3" python = "^3.10" requests = "^2.28.1" pydantic = {extras = ["email"], version = "^2.11.0"} +httpx = "^0.28.1" [tool.poetry.dev-dependencies] black = "^26.0.0" coverage = "^7.0.0" pytest = "^9.0.0" +pytest-asyncio = "^1.3.0" pytest-mock = "^3.10.0" python-dotenv = "^0.21.0" python-semantic-release = "^7.32.2" vcrpy = "^8.0.0" pre-commit = "^2.12.1" +[tool.pytest.ini_options] +asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" + [build-system] build-backend = "poetry.core.masonry.api" requires = ["poetry-core>=1.0.0"] diff --git a/tests/unit/test_async_activity_resource.py b/tests/unit/test_async_activity_resource.py new file mode 100644 index 0000000..0ddc8bc --- /dev/null +++ b/tests/unit/test_async_activity_resource.py @@ -0,0 +1,67 @@ +"""Tests for AsyncActivity resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.activity import AsyncActivity +from mailersend.models.activity import ( + ActivityRequest, + ActivityQueryParams, + SingleActivityRequest, +) +from mailersend.models.base import APIResponse + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncActivity: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncActivity(self.mock_client) + + async def test_get_returns_api_response(self): + request = ActivityRequest( + domain_id="domain123", + query_params=ActivityQueryParams(date_from=1443651141, date_to=1443661141), + ) + result = await self.resource.get(request) + assert isinstance(result, APIResponse) + + async def test_get_calls_correct_endpoint(self): + request = ActivityRequest( + domain_id="domain123", + query_params=ActivityQueryParams(date_from=1443651141, date_to=1443661141), + ) + await self.resource.get(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert "activity/domain123" in call.kwargs["path"] + + async def test_get_passes_query_params(self): + request = ActivityRequest( + domain_id="domain123", + query_params=ActivityQueryParams(date_from=1443651141, date_to=1443661141), + ) + await self.resource.get(request) + call = self.mock_client.request.call_args + assert "params" in call.kwargs + assert call.kwargs["params"] is not None + + async def test_get_single_returns_api_response(self): + request = SingleActivityRequest(activity_id="activity123") + result = await self.resource.get_single(request) + assert isinstance(result, APIResponse) + + async def test_get_single_calls_correct_endpoint(self): + request = SingleActivityRequest(activity_id="activity123") + await self.resource.get_single(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "activities/activity123" diff --git a/tests/unit/test_async_analytics_resource.py b/tests/unit/test_async_analytics_resource.py new file mode 100644 index 0000000..cff82ab --- /dev/null +++ b/tests/unit/test_async_analytics_resource.py @@ -0,0 +1,83 @@ +"""Tests for AsyncAnalytics resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.analytics import AsyncAnalytics +from mailersend.models.analytics import AnalyticsRequest +from mailersend.models.base import APIResponse + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +def _make_request(): + return AnalyticsRequest( + date_from=1443651141, + date_to=1443661141, + tags=["newsletter"], + event=["sent", "delivered"], + ) + + +class TestAsyncAnalytics: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncAnalytics(self.mock_client) + + async def test_get_activity_by_date_returns_api_response(self): + result = await self.resource.get_activity_by_date(_make_request()) + assert isinstance(result, APIResponse) + + async def test_get_activity_by_date_calls_correct_endpoint(self): + await self.resource.get_activity_by_date(_make_request()) + call = self.mock_client.request.call_args + assert call.args == ("GET", "analytics/date") + + async def test_get_activity_by_date_passes_params(self): + await self.resource.get_activity_by_date(_make_request()) + call = self.mock_client.request.call_args + params = call.kwargs["params"] + assert "date_from" in params + assert "date_to" in params + + async def test_get_opens_by_country_returns_api_response(self): + result = await self.resource.get_opens_by_country(_make_request()) + assert isinstance(result, APIResponse) + + async def test_get_opens_by_country_calls_correct_endpoint(self): + await self.resource.get_opens_by_country(_make_request()) + call = self.mock_client.request.call_args + assert call.args == ("GET", "analytics/country") + + async def test_get_opens_by_country_excludes_event_and_group_by(self): + await self.resource.get_opens_by_country(_make_request()) + call = self.mock_client.request.call_args + params = call.kwargs["params"] + assert "event" not in params + assert "event[]" not in params + assert "group_by" not in params + + async def test_get_opens_by_user_agent_returns_api_response(self): + result = await self.resource.get_opens_by_user_agent(_make_request()) + assert isinstance(result, APIResponse) + + async def test_get_opens_by_user_agent_calls_correct_endpoint(self): + await self.resource.get_opens_by_user_agent(_make_request()) + call = self.mock_client.request.call_args + assert call.args == ("GET", "analytics/ua-name") + + async def test_get_opens_by_reading_environment_returns_api_response(self): + result = await self.resource.get_opens_by_reading_environment(_make_request()) + assert isinstance(result, APIResponse) + + async def test_get_opens_by_reading_environment_calls_correct_endpoint(self): + await self.resource.get_opens_by_reading_environment(_make_request()) + call = self.mock_client.request.call_args + assert call.args == ("GET", "analytics/ua-type") diff --git a/tests/unit/test_async_client.py b/tests/unit/test_async_client.py new file mode 100644 index 0000000..fa454d7 --- /dev/null +++ b/tests/unit/test_async_client.py @@ -0,0 +1,311 @@ +"""Tests for AsyncMailerSendClient initialization and behaviour.""" + +import os +import pytest +import httpx +from unittest.mock import AsyncMock, MagicMock, patch + +from mailersend.async_client import AsyncMailerSendClient +from mailersend.exceptions import ( + AuthenticationError, + BadRequestError, + MailerSendError, + RateLimitExceeded, + ResourceNotFoundError, + ServerError, +) + + +class TestAsyncMailerSendClientInit: + def test_init_with_explicit_api_key(self): + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key") + assert client.api_key == "test-key" + + def test_init_reads_env_var(self): + with patch.dict(os.environ, {"MAILERSEND_API_KEY": "env-key"}), patch( + "mailersend.async_client.httpx.AsyncClient" + ): + client = AsyncMailerSendClient() + assert client.api_key == "env-key" + + def test_init_explicit_key_overrides_env(self): + with patch.dict(os.environ, {"MAILERSEND_API_KEY": "env-key"}), patch( + "mailersend.async_client.httpx.AsyncClient" + ): + client = AsyncMailerSendClient(api_key="param-key") + assert client.api_key == "param-key" + + def test_init_raises_without_api_key(self): + with patch.dict(os.environ, {}, clear=True), patch( + "mailersend.async_client.httpx.AsyncClient" + ): + with pytest.raises(ValueError, match="API key is required"): + AsyncMailerSendClient() + + def test_init_sets_all_properties(self): + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient( + api_key="test-key", + base_url="https://custom.api.com/v1/", + timeout=60, + max_retries=5, + debug=True, + ) + assert client.base_url == "https://custom.api.com/v1/" + assert client.timeout == 60 + assert client.max_retries == 5 + assert client.debug is True + + def test_init_exposes_all_resources(self): + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key") + assert hasattr(client, "emails") + assert hasattr(client, "domains") + assert hasattr(client, "activities") + assert hasattr(client, "analytics") + assert hasattr(client, "webhooks") + assert hasattr(client, "templates") + assert hasattr(client, "recipients") + assert hasattr(client, "sms_sending") + assert hasattr(client, "dmarc_monitoring") + + +class TestAsyncMailerSendClientRequest: + def _make_mock_response(self, status_code=200, json_data=None, headers=None): + response = MagicMock() + response.status_code = status_code + response.headers = headers or {"x-request-id": "req-123"} + response.json.return_value = json_data or {} + response.text = "" + response.content = b"{}" + return response + + async def test_successful_get_request(self): + mock_response = self._make_mock_response(200, {"data": "value"}) + + with patch("mailersend.async_client.httpx.AsyncClient") as MockClient: + mock_http = AsyncMock() + mock_http.request = AsyncMock(return_value=mock_response) + MockClient.return_value = mock_http + + client = AsyncMailerSendClient(api_key="test-key") + client._client = mock_http + + result = await client.request("GET", "some-endpoint") + assert result.status_code == 200 + + async def test_raises_authentication_error_on_401(self): + mock_response = self._make_mock_response(401, {"message": "Unauthorized"}) + + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key") + client._client = AsyncMock() + client._client.request = AsyncMock(return_value=mock_response) + + with pytest.raises(AuthenticationError): + await client.request("GET", "some-endpoint") + + async def test_raises_not_found_on_404(self): + mock_response = self._make_mock_response(404, {"message": "Not found"}) + + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key") + client._client = AsyncMock() + client._client.request = AsyncMock(return_value=mock_response) + + with pytest.raises(ResourceNotFoundError): + await client.request("GET", "some-endpoint") + + async def test_raises_rate_limit_on_429(self): + mock_response = self._make_mock_response(429, {"message": "Too many requests"}) + mock_response.headers = {"retry-after": "60", "x-apiquota-remaining": "0"} + + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key", max_retries=0) + client._client = AsyncMock() + client._client.request = AsyncMock(return_value=mock_response) + + with pytest.raises(RateLimitExceeded): + await client.request("GET", "some-endpoint") + + async def test_raises_bad_request_on_400(self): + mock_response = self._make_mock_response(400, {"message": "Bad request"}) + + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key") + client._client = AsyncMock() + client._client.request = AsyncMock(return_value=mock_response) + + with pytest.raises(BadRequestError): + await client.request("GET", "some-endpoint") + + async def test_raises_server_error_on_500(self): + mock_response = self._make_mock_response(500, {"message": "Server error"}) + + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key", max_retries=0) + client._client = AsyncMock() + client._client.request = AsyncMock(return_value=mock_response) + + with pytest.raises(ServerError): + await client.request("GET", "some-endpoint") + + async def test_retries_on_500_then_succeeds(self): + error_response = self._make_mock_response(500, {"message": "Server error"}) + ok_response = self._make_mock_response(200, {"data": "ok"}) + + with patch("mailersend.async_client.httpx.AsyncClient"), patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ): + client = AsyncMailerSendClient(api_key="test-key", max_retries=2) + client._client = AsyncMock() + client._client.request = AsyncMock( + side_effect=[error_response, ok_response] + ) + + result = await client.request("GET", "some-endpoint") + assert result.status_code == 200 + assert client._client.request.call_count == 2 + + async def test_exhausting_retries_raises_server_error(self): + error_response = self._make_mock_response(500, {"message": "Server error"}) + + with patch("mailersend.async_client.httpx.AsyncClient"), patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ): + client = AsyncMailerSendClient(api_key="test-key", max_retries=2) + client._client = AsyncMock() + client._client.request = AsyncMock(return_value=error_response) + + with pytest.raises(ServerError): + await client.request("GET", "some-endpoint") + + assert client._client.request.call_count == 3 # initial + 2 retries + + async def test_retry_uses_backoff_delay(self): + error_response = self._make_mock_response(500, {"message": "Server error"}) + ok_response = self._make_mock_response(200, {}) + + with patch("mailersend.async_client.httpx.AsyncClient"), patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ) as mock_sleep: + client = AsyncMailerSendClient(api_key="test-key", max_retries=2) + client._client = AsyncMock() + client._client.request = AsyncMock( + side_effect=[error_response, error_response, ok_response] + ) + + await client.request("GET", "some-endpoint") + + assert mock_sleep.call_count == 2 + assert mock_sleep.call_args_list[0].args[0] == pytest.approx( + 0.3 + ) # 0.3 * 2^0 + assert mock_sleep.call_args_list[1].args[0] == pytest.approx( + 0.6 + ) # 0.3 * 2^1 + + async def test_429_retry_uses_retry_after_header(self): + rate_limit_response = self._make_mock_response( + 429, {"message": "Too many requests"} + ) + rate_limit_response.headers = {"retry-after": "30", "x-apiquota-remaining": "0"} + ok_response = self._make_mock_response(200, {}) + + with patch("mailersend.async_client.httpx.AsyncClient"), patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ) as mock_sleep: + client = AsyncMailerSendClient(api_key="test-key", max_retries=1) + client._client = AsyncMock() + client._client.request = AsyncMock( + side_effect=[rate_limit_response, ok_response] + ) + + await client.request("GET", "some-endpoint") + + mock_sleep.assert_called_once_with(30.0) + + async def test_429_retry_falls_back_to_backoff_without_retry_after(self): + rate_limit_response = self._make_mock_response( + 429, {"message": "Too many requests"} + ) + rate_limit_response.headers = {} + ok_response = self._make_mock_response(200, {}) + + with patch("mailersend.async_client.httpx.AsyncClient"), patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ) as mock_sleep: + client = AsyncMailerSendClient(api_key="test-key", max_retries=1) + client._client = AsyncMock() + client._client.request = AsyncMock( + side_effect=[rate_limit_response, ok_response] + ) + + await client.request("GET", "some-endpoint") + + mock_sleep.assert_called_once_with(pytest.approx(0.3)) + + async def test_raises_mailer_send_error_on_unexpected_status(self): + mock_response = self._make_mock_response(418, {"message": "I'm a teapot"}) + + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key") + client._client = AsyncMock() + client._client.request = AsyncMock(return_value=mock_response) + + with pytest.raises(MailerSendError): + await client.request("GET", "some-endpoint") + + async def test_retries_on_network_error_then_succeeds(self): + ok_response = self._make_mock_response(200, {"data": "ok"}) + + with patch("mailersend.async_client.httpx.AsyncClient"), patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ): + client = AsyncMailerSendClient(api_key="test-key", max_retries=2) + client._client = AsyncMock() + client._client.request = AsyncMock( + side_effect=[httpx.ConnectError("Connection refused"), ok_response] + ) + + result = await client.request("GET", "some-endpoint") + assert result.status_code == 200 + assert client._client.request.call_count == 2 + + async def test_exhausting_retries_on_network_error_raises(self): + with patch("mailersend.async_client.httpx.AsyncClient"), patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ): + client = AsyncMailerSendClient(api_key="test-key", max_retries=2) + client._client = AsyncMock() + client._client.request = AsyncMock( + side_effect=httpx.ConnectError("Connection refused") + ) + + with pytest.raises(MailerSendError, match="Request failed"): + await client.request("GET", "some-endpoint") + + assert client._client.request.call_count == 3 + + +class TestAsyncMailerSendClientContextManager: + async def test_context_manager_calls_close(self): + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key") + client._client = AsyncMock() + client._client.aclose = AsyncMock() + + async with client as c: + assert c is client + + client._client.aclose.assert_called_once() + + async def test_close_method(self): + with patch("mailersend.async_client.httpx.AsyncClient"): + client = AsyncMailerSendClient(api_key="test-key") + client._client = AsyncMock() + client._client.aclose = AsyncMock() + + await client.close() + client._client.aclose.assert_called_once() diff --git a/tests/unit/test_async_dmarc_monitoring_resource.py b/tests/unit/test_async_dmarc_monitoring_resource.py new file mode 100644 index 0000000..84cfb40 --- /dev/null +++ b/tests/unit/test_async_dmarc_monitoring_resource.py @@ -0,0 +1,153 @@ +"""Tests for AsyncDmarcMonitoring resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.dmarc_monitoring import AsyncDmarcMonitoring +from mailersend.models.base import APIResponse +from mailersend.models.dmarc_monitoring import ( + DmarcMonitoringListRequest, + DmarcMonitoringListQueryParams, + DmarcMonitoringCreateRequest, + DmarcMonitoringUpdateRequest, + DmarcMonitoringDeleteRequest, + DmarcMonitoringReportRequest, + DmarcMonitoringReportQueryParams, + DmarcMonitoringIpReportRequest, + DmarcMonitoringReportSourcesRequest, + DmarcMonitoringFavoriteRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncDmarcMonitoring: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncDmarcMonitoring(self.mock_client) + + async def test_list_monitors_returns_api_response(self): + result = await self.resource.list_monitors() + assert isinstance(result, APIResponse) + + async def test_list_monitors_calls_correct_endpoint(self): + await self.resource.list_monitors() + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "dmarc-monitoring" + + async def test_list_monitors_with_request(self): + request = DmarcMonitoringListRequest( + query_params=DmarcMonitoringListQueryParams(page=2, limit=10) + ) + await self.resource.list_monitors(request) + call = self.mock_client.request.call_args + assert call.kwargs["params"]["page"] == 2 + + async def test_create_monitor_returns_api_response(self): + request = DmarcMonitoringCreateRequest(domain_id="dom123") + result = await self.resource.create_monitor(request) + assert isinstance(result, APIResponse) + + async def test_create_monitor_calls_correct_endpoint(self): + request = DmarcMonitoringCreateRequest(domain_id="dom123") + await self.resource.create_monitor(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "dmarc-monitoring" + + async def test_update_monitor_returns_api_response(self): + request = DmarcMonitoringUpdateRequest( + monitor_id="mon123", wanted_dmarc_record="v=DMARC1; p=none;" + ) + result = await self.resource.update_monitor(request) + assert isinstance(result, APIResponse) + + async def test_update_monitor_calls_correct_endpoint(self): + request = DmarcMonitoringUpdateRequest( + monitor_id="mon123", wanted_dmarc_record="v=DMARC1; p=none;" + ) + await self.resource.update_monitor(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "dmarc-monitoring/mon123" + + async def test_delete_monitor_returns_api_response(self): + request = DmarcMonitoringDeleteRequest(monitor_id="mon123") + result = await self.resource.delete_monitor(request) + assert isinstance(result, APIResponse) + + async def test_delete_monitor_calls_correct_endpoint(self): + await self.resource.delete_monitor( + DmarcMonitoringDeleteRequest(monitor_id="mon123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "dmarc-monitoring/mon123" + + async def test_get_aggregated_report_returns_api_response(self): + request = DmarcMonitoringReportRequest(monitor_id="mon123") + result = await self.resource.get_aggregated_report(request) + assert isinstance(result, APIResponse) + + async def test_get_aggregated_report_calls_correct_endpoint(self): + request = DmarcMonitoringReportRequest(monitor_id="mon123") + await self.resource.get_aggregated_report(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "dmarc-monitoring/mon123/report" + + async def test_get_ip_report_returns_api_response(self): + request = DmarcMonitoringIpReportRequest(monitor_id="mon123", ip="1.2.3.4") + result = await self.resource.get_ip_report(request) + assert isinstance(result, APIResponse) + + async def test_get_ip_report_calls_correct_endpoint(self): + request = DmarcMonitoringIpReportRequest(monitor_id="mon123", ip="1.2.3.4") + await self.resource.get_ip_report(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "dmarc-monitoring/mon123/report/1.2.3.4" + + async def test_get_report_sources_returns_api_response(self): + request = DmarcMonitoringReportSourcesRequest(monitor_id="mon123") + result = await self.resource.get_report_sources(request) + assert isinstance(result, APIResponse) + + async def test_get_report_sources_calls_correct_endpoint(self): + request = DmarcMonitoringReportSourcesRequest(monitor_id="mon123") + await self.resource.get_report_sources(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "dmarc-monitoring/mon123/report-sources" + + async def test_mark_ip_favorite_returns_api_response(self): + request = DmarcMonitoringFavoriteRequest(monitor_id="mon123", ip="1.2.3.4") + result = await self.resource.mark_ip_favorite(request) + assert isinstance(result, APIResponse) + + async def test_mark_ip_favorite_calls_correct_endpoint(self): + request = DmarcMonitoringFavoriteRequest(monitor_id="mon123", ip="1.2.3.4") + await self.resource.mark_ip_favorite(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "dmarc-monitoring/mon123/favorite/1.2.3.4" + + async def test_remove_ip_favorite_returns_api_response(self): + request = DmarcMonitoringFavoriteRequest(monitor_id="mon123", ip="1.2.3.4") + result = await self.resource.remove_ip_favorite(request) + assert isinstance(result, APIResponse) + + async def test_remove_ip_favorite_calls_correct_endpoint(self): + request = DmarcMonitoringFavoriteRequest(monitor_id="mon123", ip="1.2.3.4") + await self.resource.remove_ip_favorite(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "dmarc-monitoring/mon123/favorite/1.2.3.4" diff --git a/tests/unit/test_async_domains_resource.py b/tests/unit/test_async_domains_resource.py new file mode 100644 index 0000000..0313fd3 --- /dev/null +++ b/tests/unit/test_async_domains_resource.py @@ -0,0 +1,148 @@ +"""Tests for AsyncDomains resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.domains import AsyncDomains +from mailersend.models.domains import ( + DomainListRequest, + DomainListQueryParams, + DomainCreateRequest, + DomainGetRequest, + DomainDeleteRequest, + DomainUpdateSettingsRequest, + DomainRecipientsRequest, + DomainRecipientsQueryParams, + DomainDnsRecordsRequest, + DomainVerificationRequest, +) +from mailersend.models.base import APIResponse + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncDomains: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncDomains(self.mock_client) + + async def test_list_domains_returns_api_response(self): + result = await self.resource.list_domains() + assert isinstance(result, APIResponse) + + async def test_list_domains_uses_default_params(self): + await self.resource.list_domains() + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "domains" + assert call.kwargs["params"] == {"page": 1, "limit": 25} + + async def test_list_domains_with_custom_params(self): + request = DomainListRequest( + query_params=DomainListQueryParams(page=2, limit=50, verified=True) + ) + await self.resource.list_domains(request) + call = self.mock_client.request.call_args + assert call.kwargs["params"]["page"] == 2 + assert call.kwargs["params"]["limit"] == 50 + + async def test_get_domain_returns_api_response(self): + result = await self.resource.get_domain(DomainGetRequest(domain_id="dom123")) + assert isinstance(result, APIResponse) + + async def test_get_domain_calls_correct_endpoint(self): + await self.resource.get_domain(DomainGetRequest(domain_id="dom123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "domains/dom123" + + async def test_create_domain_returns_api_response(self): + result = await self.resource.create_domain( + DomainCreateRequest(name="example.com") + ) + assert isinstance(result, APIResponse) + + async def test_create_domain_calls_correct_endpoint(self): + await self.resource.create_domain(DomainCreateRequest(name="example.com")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "domains" + assert call.kwargs["body"]["name"] == "example.com" + + async def test_delete_domain_returns_api_response(self): + result = await self.resource.delete_domain( + DomainDeleteRequest(domain_id="dom123") + ) + assert isinstance(result, APIResponse) + + async def test_delete_domain_calls_correct_endpoint(self): + await self.resource.delete_domain(DomainDeleteRequest(domain_id="dom123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "domains/dom123" + + async def test_get_domain_recipients_returns_api_response(self): + request = DomainRecipientsRequest( + domain_id="dom123", + query_params=DomainRecipientsQueryParams(), + ) + result = await self.resource.get_domain_recipients(request) + assert isinstance(result, APIResponse) + + async def test_get_domain_recipients_calls_correct_endpoint(self): + request = DomainRecipientsRequest( + domain_id="dom123", query_params=DomainRecipientsQueryParams() + ) + await self.resource.get_domain_recipients(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "domains/dom123/recipients" + + async def test_update_domain_settings_returns_api_response(self): + request = DomainUpdateSettingsRequest(domain_id="dom123", track_opens=True) + result = await self.resource.update_domain_settings(request) + assert isinstance(result, APIResponse) + + async def test_update_domain_settings_excludes_domain_id_from_body(self): + request = DomainUpdateSettingsRequest(domain_id="dom123", track_opens=True) + await self.resource.update_domain_settings(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "domains/dom123/settings" + assert "domain_id" not in call.kwargs["body"] + assert call.kwargs["body"]["track_opens"] is True + + async def test_get_domain_dns_records_returns_api_response(self): + result = await self.resource.get_domain_dns_records( + DomainDnsRecordsRequest(domain_id="dom123") + ) + assert isinstance(result, APIResponse) + + async def test_get_domain_dns_records_calls_correct_endpoint(self): + await self.resource.get_domain_dns_records( + DomainDnsRecordsRequest(domain_id="dom123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "domains/dom123/dns-records" + + async def test_get_domain_verification_status_returns_api_response(self): + result = await self.resource.get_domain_verification_status( + DomainVerificationRequest(domain_id="dom123") + ) + assert isinstance(result, APIResponse) + + async def test_get_domain_verification_status_calls_correct_endpoint(self): + await self.resource.get_domain_verification_status( + DomainVerificationRequest(domain_id="dom123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "domains/dom123/verify" diff --git a/tests/unit/test_async_email_resource.py b/tests/unit/test_async_email_resource.py new file mode 100644 index 0000000..73e199c --- /dev/null +++ b/tests/unit/test_async_email_resource.py @@ -0,0 +1,89 @@ +"""Tests for AsyncEmail resource.""" + +import pytest +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.email import AsyncEmail +from mailersend.models.base import APIResponse +from mailersend.models.email import EmailRequest, EmailContact + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock() + return client + + +def _make_mock_response(status_code=200, json_data=None, headers=None): + response = MagicMock() + response.status_code = status_code + response.headers = headers or {"x-request-id": "req-123", "x-message-id": "msg-456"} + response.json.return_value = json_data or {} + response.content = b"{}" + return response + + +def _make_email_request(): + return EmailRequest( + from_email=EmailContact(email="sender@example.com", name="Sender"), + to=[EmailContact(email="recipient@example.com", name="Recipient")], + subject="Test Subject", + text="Test body", + ) + + +class TestAsyncEmail: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncEmail(self.mock_client) + + async def test_send_returns_api_response(self): + self.mock_client.request.return_value = _make_mock_response() + email = _make_email_request() + + result = await self.resource.send(email) + + assert isinstance(result, APIResponse) + + async def test_send_calls_correct_endpoint(self): + self.mock_client.request.return_value = _make_mock_response() + email = _make_email_request() + + await self.resource.send(email) + + self.mock_client.request.assert_called_once() + call_kwargs = self.mock_client.request.call_args + assert call_kwargs.kwargs["method"] == "POST" + assert call_kwargs.kwargs["path"] == "email" + + async def test_send_includes_message_id_in_response(self): + mock_response = _make_mock_response( + headers={"x-request-id": "req-123", "x-message-id": "msg-789"} + ) + self.mock_client.request.return_value = mock_response + email = _make_email_request() + + result = await self.resource.send(email) + + assert result.data.get("id") == "msg-789" + + async def test_send_bulk_calls_correct_endpoint(self): + self.mock_client.request.return_value = _make_mock_response() + emails = [_make_email_request(), _make_email_request()] + + result = await self.resource.send_bulk(emails) + + assert isinstance(result, APIResponse) + call_kwargs = self.mock_client.request.call_args + assert call_kwargs.kwargs["method"] == "POST" + assert call_kwargs.kwargs["path"] == "bulk-email" + + async def test_get_bulk_status_calls_correct_endpoint(self): + self.mock_client.request.return_value = _make_mock_response() + + result = await self.resource.get_bulk_status("bulk-id-123") + + assert isinstance(result, APIResponse) + call_kwargs = self.mock_client.request.call_args + assert call_kwargs.kwargs["method"] == "GET" + assert "bulk-id-123" in call_kwargs.kwargs["path"] diff --git a/tests/unit/test_async_email_verification_resource.py b/tests/unit/test_async_email_verification_resource.py new file mode 100644 index 0000000..491ac52 --- /dev/null +++ b/tests/unit/test_async_email_verification_resource.py @@ -0,0 +1,155 @@ +"""Tests for AsyncEmailVerification resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.email_verification import AsyncEmailVerification +from mailersend.models.base import APIResponse +from mailersend.models.email_verification import ( + EmailVerifyRequest, + EmailVerifyAsyncRequest, + EmailVerificationAsyncStatusRequest, + EmailVerificationListsRequest, + EmailVerificationListsQueryParams, + EmailVerificationGetRequest, + EmailVerificationCreateRequest, + EmailVerificationVerifyRequest, + EmailVerificationResultsRequest, + EmailVerificationResultsQueryParams, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncEmailVerification: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncEmailVerification(self.mock_client) + + async def test_verify_email_returns_api_response(self): + result = await self.resource.verify_email( + EmailVerifyRequest(email="test@example.com") + ) + assert isinstance(result, APIResponse) + + async def test_verify_email_calls_correct_endpoint(self): + await self.resource.verify_email(EmailVerifyRequest(email="test@example.com")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "email-verification/verify" + assert call.kwargs["body"]["email"] == "test@example.com" + + async def test_verify_email_async_returns_api_response(self): + result = await self.resource.verify_email_async( + EmailVerifyAsyncRequest(email="test@example.com") + ) + assert isinstance(result, APIResponse) + + async def test_verify_email_async_calls_correct_endpoint(self): + await self.resource.verify_email_async( + EmailVerifyAsyncRequest(email="test@example.com") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "email-verification/verify-async" + + async def test_get_async_status_returns_api_response(self): + result = await self.resource.get_async_status( + EmailVerificationAsyncStatusRequest(email_verification_id="abc123") + ) + assert isinstance(result, APIResponse) + + async def test_get_async_status_calls_correct_endpoint(self): + await self.resource.get_async_status( + EmailVerificationAsyncStatusRequest(email_verification_id="abc123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "email-verification/verify-async/abc123" + + async def test_list_verifications_returns_api_response(self): + request = EmailVerificationListsRequest( + query_params=EmailVerificationListsQueryParams() + ) + result = await self.resource.list_verifications(request) + assert isinstance(result, APIResponse) + + async def test_list_verifications_calls_correct_endpoint(self): + request = EmailVerificationListsRequest( + query_params=EmailVerificationListsQueryParams() + ) + await self.resource.list_verifications(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "email-verification" + assert call.kwargs["params"] == {"page": 1, "limit": 25} + + async def test_get_verification_returns_api_response(self): + result = await self.resource.get_verification( + EmailVerificationGetRequest(email_verification_id="abc123") + ) + assert isinstance(result, APIResponse) + + async def test_get_verification_calls_correct_endpoint(self): + await self.resource.get_verification( + EmailVerificationGetRequest(email_verification_id="abc123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "email-verification/abc123" + + async def test_create_verification_returns_api_response(self): + request = EmailVerificationCreateRequest( + name="Test List", emails=["a@example.com", "b@example.com"] + ) + result = await self.resource.create_verification(request) + assert isinstance(result, APIResponse) + + async def test_create_verification_calls_correct_endpoint(self): + request = EmailVerificationCreateRequest( + name="Test List", emails=["a@example.com"] + ) + await self.resource.create_verification(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "email-verification" + assert call.kwargs["body"]["name"] == "Test List" + + async def test_verify_list_returns_api_response(self): + result = await self.resource.verify_list( + EmailVerificationVerifyRequest(email_verification_id="abc123") + ) + assert isinstance(result, APIResponse) + + async def test_verify_list_calls_correct_endpoint(self): + await self.resource.verify_list( + EmailVerificationVerifyRequest(email_verification_id="abc123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "email-verification/abc123/verify" + + async def test_get_results_returns_api_response(self): + request = EmailVerificationResultsRequest( + email_verification_id="abc123", + query_params=EmailVerificationResultsQueryParams(), + ) + result = await self.resource.get_results(request) + assert isinstance(result, APIResponse) + + async def test_get_results_calls_correct_endpoint(self): + request = EmailVerificationResultsRequest( + email_verification_id="abc123", + query_params=EmailVerificationResultsQueryParams(), + ) + await self.resource.get_results(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "email-verification/abc123/results" diff --git a/tests/unit/test_async_identities_resource.py b/tests/unit/test_async_identities_resource.py new file mode 100644 index 0000000..875301d --- /dev/null +++ b/tests/unit/test_async_identities_resource.py @@ -0,0 +1,141 @@ +"""Tests for AsyncIdentitiesResource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.identities import AsyncIdentitiesResource +from mailersend.models.base import APIResponse +from mailersend.models.identities import ( + IdentityListRequest, + IdentityListQueryParams, + IdentityCreateRequest, + IdentityGetRequest, + IdentityGetByEmailRequest, + IdentityUpdateRequest, + IdentityUpdateByEmailRequest, + IdentityDeleteRequest, + IdentityDeleteByEmailRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncIdentitiesResource: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncIdentitiesResource(self.mock_client) + + async def test_list_identities_returns_api_response(self): + request = IdentityListRequest(query_params=IdentityListQueryParams()) + result = await self.resource.list_identities(request) + assert isinstance(result, APIResponse) + + async def test_list_identities_calls_correct_endpoint(self): + request = IdentityListRequest(query_params=IdentityListQueryParams()) + await self.resource.list_identities(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "identities" + assert call.kwargs["params"] == {"page": 1, "limit": 25} + + async def test_create_identity_returns_api_response(self): + request = IdentityCreateRequest( + domain_id="dom123", name="John", email="john@example.com" + ) + result = await self.resource.create_identity(request) + assert isinstance(result, APIResponse) + + async def test_create_identity_calls_correct_endpoint(self): + request = IdentityCreateRequest( + domain_id="dom123", name="John", email="john@example.com" + ) + await self.resource.create_identity(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "identities" + assert call.kwargs["body"]["email"] == "john@example.com" + + async def test_get_identity_returns_api_response(self): + result = await self.resource.get_identity( + IdentityGetRequest(identity_id="id123") + ) + assert isinstance(result, APIResponse) + + async def test_get_identity_calls_correct_endpoint(self): + await self.resource.get_identity(IdentityGetRequest(identity_id="id123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "identities/id123" + + async def test_get_identity_by_email_returns_api_response(self): + result = await self.resource.get_identity_by_email( + IdentityGetByEmailRequest(email="john@example.com") + ) + assert isinstance(result, APIResponse) + + async def test_get_identity_by_email_calls_correct_endpoint(self): + await self.resource.get_identity_by_email( + IdentityGetByEmailRequest(email="john@example.com") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "identities/email/john@example.com" + + async def test_update_identity_returns_api_response(self): + request = IdentityUpdateRequest(identity_id="id123", name="Updated") + result = await self.resource.update_identity(request) + assert isinstance(result, APIResponse) + + async def test_update_identity_excludes_id_from_body(self): + request = IdentityUpdateRequest(identity_id="id123", name="Updated") + await self.resource.update_identity(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "identities/id123" + assert "identity_id" not in (call.kwargs.get("body") or {}) + + async def test_update_identity_by_email_returns_api_response(self): + request = IdentityUpdateByEmailRequest(email="john@example.com", name="Updated") + result = await self.resource.update_identity_by_email(request) + assert isinstance(result, APIResponse) + + async def test_update_identity_by_email_excludes_email_from_body(self): + request = IdentityUpdateByEmailRequest(email="john@example.com", name="Updated") + await self.resource.update_identity_by_email(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "identities/email/john@example.com" + assert "email" not in (call.kwargs.get("body") or {}) + + async def test_delete_identity_returns_api_response(self): + result = await self.resource.delete_identity( + IdentityDeleteRequest(identity_id="id123") + ) + assert isinstance(result, APIResponse) + + async def test_delete_identity_calls_correct_endpoint(self): + await self.resource.delete_identity(IdentityDeleteRequest(identity_id="id123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "identities/id123" + + async def test_delete_identity_by_email_returns_api_response(self): + result = await self.resource.delete_identity_by_email( + IdentityDeleteByEmailRequest(email="john@example.com") + ) + assert isinstance(result, APIResponse) + + async def test_delete_identity_by_email_calls_correct_endpoint(self): + await self.resource.delete_identity_by_email( + IdentityDeleteByEmailRequest(email="john@example.com") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "identities/email/john@example.com" diff --git a/tests/unit/test_async_inbound_resource.py b/tests/unit/test_async_inbound_resource.py new file mode 100644 index 0000000..b8a679c --- /dev/null +++ b/tests/unit/test_async_inbound_resource.py @@ -0,0 +1,124 @@ +"""Tests for AsyncInboundResource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.inbound import AsyncInboundResource +from mailersend.models.base import APIResponse +from mailersend.models.inbound import ( + InboundListRequest, + InboundListQueryParams, + InboundGetRequest, + InboundCreateRequest, + InboundUpdateRequest, + InboundDeleteRequest, + InboundFilterGroup, + InboundForward, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +def _make_filter_group(): + return InboundFilterGroup(type="catch_all") + + +def _make_forward(): + return InboundForward(type="email", value="forward@example.com") + + +class TestAsyncInboundResource: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncInboundResource(self.mock_client) + + async def test_list_returns_api_response(self): + request = InboundListRequest(query_params=InboundListQueryParams()) + result = await self.resource.list(request) + assert isinstance(result, APIResponse) + + async def test_list_calls_correct_endpoint(self): + request = InboundListRequest(query_params=InboundListQueryParams()) + await self.resource.list(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "inbound" + + async def test_get_returns_api_response(self): + result = await self.resource.get(InboundGetRequest(inbound_id="inb123")) + assert isinstance(result, APIResponse) + + async def test_get_calls_correct_endpoint(self): + await self.resource.get(InboundGetRequest(inbound_id="inb123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "inbound/inb123" + + async def test_create_returns_api_response(self): + request = InboundCreateRequest( + domain_id="dom123", + name="Test Route", + domain_enabled=False, + catch_filter=_make_filter_group(), + match_filter=_make_filter_group(), + forwards=[_make_forward()], + ) + result = await self.resource.create(request) + assert isinstance(result, APIResponse) + + async def test_create_calls_correct_endpoint(self): + request = InboundCreateRequest( + domain_id="dom123", + name="Test Route", + domain_enabled=False, + catch_filter=_make_filter_group(), + match_filter=_make_filter_group(), + forwards=[_make_forward()], + ) + await self.resource.create(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "inbound" + + async def test_update_returns_api_response(self): + request = InboundUpdateRequest( + inbound_id="inb123", + name="Updated Route", + domain_enabled=False, + catch_filter=_make_filter_group(), + match_filter=_make_filter_group(), + forwards=[_make_forward()], + ) + result = await self.resource.update(request) + assert isinstance(result, APIResponse) + + async def test_update_calls_correct_endpoint(self): + request = InboundUpdateRequest( + inbound_id="inb123", + name="Updated Route", + domain_enabled=False, + catch_filter=_make_filter_group(), + match_filter=_make_filter_group(), + forwards=[_make_forward()], + ) + await self.resource.update(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "inbound/inb123" + + async def test_delete_returns_api_response(self): + result = await self.resource.delete(InboundDeleteRequest(inbound_id="inb123")) + assert isinstance(result, APIResponse) + + async def test_delete_calls_correct_endpoint(self): + await self.resource.delete(InboundDeleteRequest(inbound_id="inb123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "inbound/inb123" diff --git a/tests/unit/test_async_messages_resource.py b/tests/unit/test_async_messages_resource.py new file mode 100644 index 0000000..29820b2 --- /dev/null +++ b/tests/unit/test_async_messages_resource.py @@ -0,0 +1,58 @@ +"""Tests for AsyncMessages resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.messages import AsyncMessages +from mailersend.models.base import APIResponse +from mailersend.models.messages import ( + MessagesListRequest, + MessagesListQueryParams, + MessageGetRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncMessages: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncMessages(self.mock_client) + + async def test_list_messages_returns_api_response(self): + request = MessagesListRequest(query_params=MessagesListQueryParams()) + result = await self.resource.list_messages(request) + assert isinstance(result, APIResponse) + + async def test_list_messages_calls_correct_endpoint(self): + request = MessagesListRequest(query_params=MessagesListQueryParams()) + await self.resource.list_messages(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "messages" + + async def test_list_messages_passes_query_params(self): + request = MessagesListRequest( + query_params=MessagesListQueryParams(page=2, limit=10) + ) + await self.resource.list_messages(request) + call = self.mock_client.request.call_args + assert call.kwargs["params"]["page"] == 2 + assert call.kwargs["params"]["limit"] == 10 + + async def test_get_message_returns_api_response(self): + result = await self.resource.get_message(MessageGetRequest(message_id="msg123")) + assert isinstance(result, APIResponse) + + async def test_get_message_calls_correct_endpoint(self): + await self.resource.get_message(MessageGetRequest(message_id="msg123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "messages/msg123" diff --git a/tests/unit/test_async_other_resource.py b/tests/unit/test_async_other_resource.py new file mode 100644 index 0000000..a00f5db --- /dev/null +++ b/tests/unit/test_async_other_resource.py @@ -0,0 +1,32 @@ +"""Tests for AsyncOther resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.other import AsyncOther +from mailersend.models.base import APIResponse + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncOther: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncOther(self.mock_client) + + async def test_get_quota_returns_api_response(self): + result = await self.resource.get_quota() + assert isinstance(result, APIResponse) + + async def test_get_quota_calls_correct_endpoint(self): + await self.resource.get_quota() + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "api-quota" diff --git a/tests/unit/test_async_recipients_resource.py b/tests/unit/test_async_recipients_resource.py new file mode 100644 index 0000000..e0785e5 --- /dev/null +++ b/tests/unit/test_async_recipients_resource.py @@ -0,0 +1,282 @@ +"""Tests for AsyncRecipients resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.recipients import AsyncRecipients +from mailersend.models.base import APIResponse +from mailersend.models.recipients import ( + RecipientsListRequest, + RecipientsListQueryParams, + RecipientGetRequest, + RecipientDeleteRequest, + SuppressionListRequest, + SuppressionListQueryParams, + SuppressionAddRequest, + SuppressionDeleteRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncRecipients: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncRecipients(self.mock_client) + + async def test_list_recipients_returns_api_response(self): + result = await self.resource.list_recipients() + assert isinstance(result, APIResponse) + + async def test_list_recipients_calls_correct_endpoint(self): + await self.resource.list_recipients() + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "recipients" + + async def test_list_recipients_with_request(self): + request = RecipientsListRequest( + query_params=RecipientsListQueryParams(page=2, limit=10) + ) + await self.resource.list_recipients(request) + call = self.mock_client.request.call_args + assert call.kwargs["params"]["page"] == 2 + + async def test_get_recipient_returns_api_response(self): + result = await self.resource.get_recipient( + RecipientGetRequest(recipient_id="rec123") + ) + assert isinstance(result, APIResponse) + + async def test_get_recipient_calls_correct_endpoint(self): + await self.resource.get_recipient(RecipientGetRequest(recipient_id="rec123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "recipients/rec123" + + async def test_delete_recipient_returns_api_response(self): + result = await self.resource.delete_recipient( + RecipientDeleteRequest(recipient_id="rec123") + ) + assert isinstance(result, APIResponse) + + async def test_delete_recipient_calls_correct_endpoint(self): + await self.resource.delete_recipient( + RecipientDeleteRequest(recipient_id="rec123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "recipients/rec123" + + async def test_list_blocklist_returns_api_response(self): + result = await self.resource.list_blocklist() + assert isinstance(result, APIResponse) + + async def test_list_blocklist_calls_correct_endpoint(self): + await self.resource.list_blocklist() + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "suppressions/blocklist" + + async def test_list_hard_bounces_returns_api_response(self): + result = await self.resource.list_hard_bounces() + assert isinstance(result, APIResponse) + + async def test_list_hard_bounces_calls_correct_endpoint(self): + await self.resource.list_hard_bounces() + call = self.mock_client.request.call_args + assert call.kwargs["path"] == "suppressions/hard-bounces" + + async def test_list_spam_complaints_returns_api_response(self): + result = await self.resource.list_spam_complaints() + assert isinstance(result, APIResponse) + + async def test_list_spam_complaints_calls_correct_endpoint(self): + await self.resource.list_spam_complaints() + call = self.mock_client.request.call_args + assert call.kwargs["path"] == "suppressions/spam-complaints" + + async def test_list_unsubscribes_returns_api_response(self): + result = await self.resource.list_unsubscribes() + assert isinstance(result, APIResponse) + + async def test_list_unsubscribes_calls_correct_endpoint(self): + await self.resource.list_unsubscribes() + call = self.mock_client.request.call_args + assert call.kwargs["path"] == "suppressions/unsubscribes" + + async def test_list_on_hold_returns_api_response(self): + result = await self.resource.list_on_hold() + assert isinstance(result, APIResponse) + + async def test_list_on_hold_calls_correct_endpoint(self): + await self.resource.list_on_hold() + call = self.mock_client.request.call_args + assert call.kwargs["path"] == "suppressions/on-hold-list" + + async def test_add_to_blocklist_returns_api_response(self): + request = SuppressionAddRequest( + domain_id="dom123", recipients=["a@example.com"] + ) + result = await self.resource.add_to_blocklist(request) + assert isinstance(result, APIResponse) + + async def test_add_to_blocklist_calls_correct_endpoint(self): + request = SuppressionAddRequest( + domain_id="dom123", recipients=["a@example.com"] + ) + await self.resource.add_to_blocklist(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "suppressions/blocklist" + + async def test_add_hard_bounces_returns_api_response(self): + request = SuppressionAddRequest( + domain_id="dom123", recipients=["a@example.com"] + ) + result = await self.resource.add_hard_bounces(request) + assert isinstance(result, APIResponse) + + async def test_add_hard_bounces_calls_correct_endpoint(self): + request = SuppressionAddRequest( + domain_id="dom123", recipients=["a@example.com"] + ) + await self.resource.add_hard_bounces(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "suppressions/hard-bounces" + + async def test_add_spam_complaints_returns_api_response(self): + request = SuppressionAddRequest( + domain_id="dom123", recipients=["a@example.com"] + ) + result = await self.resource.add_spam_complaints(request) + assert isinstance(result, APIResponse) + + async def test_add_spam_complaints_calls_correct_endpoint(self): + request = SuppressionAddRequest( + domain_id="dom123", recipients=["a@example.com"] + ) + await self.resource.add_spam_complaints(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "suppressions/spam-complaints" + + async def test_add_unsubscribes_returns_api_response(self): + request = SuppressionAddRequest( + domain_id="dom123", recipients=["a@example.com"] + ) + result = await self.resource.add_unsubscribes(request) + assert isinstance(result, APIResponse) + + async def test_add_unsubscribes_calls_correct_endpoint(self): + request = SuppressionAddRequest( + domain_id="dom123", recipients=["a@example.com"] + ) + await self.resource.add_unsubscribes(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "suppressions/unsubscribes" + + async def test_delete_from_blocklist_returns_api_response(self): + request = SuppressionDeleteRequest(ids=["id1"]) + result = await self.resource.delete_from_blocklist(request) + assert isinstance(result, APIResponse) + + async def test_delete_from_blocklist_calls_correct_endpoint(self): + request = SuppressionDeleteRequest(ids=["id1"]) + await self.resource.delete_from_blocklist(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "suppressions/blocklist" + + async def test_delete_hard_bounces_returns_api_response(self): + result = await self.resource.delete_hard_bounces( + SuppressionDeleteRequest(ids=["id1"]) + ) + assert isinstance(result, APIResponse) + + async def test_delete_hard_bounces_calls_correct_endpoint(self): + await self.resource.delete_hard_bounces(SuppressionDeleteRequest(ids=["id1"])) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "suppressions/hard-bounces" + + async def test_delete_spam_complaints_returns_api_response(self): + result = await self.resource.delete_spam_complaints( + SuppressionDeleteRequest(ids=["id1"]) + ) + assert isinstance(result, APIResponse) + + async def test_delete_spam_complaints_calls_correct_endpoint(self): + await self.resource.delete_spam_complaints( + SuppressionDeleteRequest(ids=["id1"]) + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "suppressions/spam-complaints" + + async def test_delete_unsubscribes_returns_api_response(self): + result = await self.resource.delete_unsubscribes( + SuppressionDeleteRequest(ids=["id1"]) + ) + assert isinstance(result, APIResponse) + + async def test_delete_unsubscribes_calls_correct_endpoint(self): + await self.resource.delete_unsubscribes(SuppressionDeleteRequest(ids=["id1"])) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "suppressions/unsubscribes" + + async def test_delete_from_on_hold_returns_api_response(self): + result = await self.resource.delete_from_on_hold( + SuppressionDeleteRequest(ids=["id1"]) + ) + assert isinstance(result, APIResponse) + + async def test_delete_from_on_hold_calls_correct_endpoint(self): + await self.resource.delete_from_on_hold(SuppressionDeleteRequest(ids=["id1"])) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "suppressions/on-hold-list" + + async def test_delete_hard_bounces_excludes_domain_id_from_body(self): + request = SuppressionDeleteRequest(domain_id="dom123", ids=["id1"]) + await self.resource.delete_hard_bounces(request) + body = self.mock_client.request.call_args.kwargs.get("body") or {} + assert "domain_id" not in body + assert body.get("ids") == ["id1"] + + async def test_delete_spam_complaints_excludes_domain_id_from_body(self): + request = SuppressionDeleteRequest(domain_id="dom123", ids=["id1"]) + await self.resource.delete_spam_complaints(request) + body = self.mock_client.request.call_args.kwargs.get("body") or {} + assert "domain_id" not in body + assert body.get("ids") == ["id1"] + + async def test_delete_unsubscribes_excludes_domain_id_from_body(self): + request = SuppressionDeleteRequest(domain_id="dom123", ids=["id1"]) + await self.resource.delete_unsubscribes(request) + body = self.mock_client.request.call_args.kwargs.get("body") or {} + assert "domain_id" not in body + assert body.get("ids") == ["id1"] + + async def test_delete_from_on_hold_excludes_domain_id_from_body(self): + request = SuppressionDeleteRequest(domain_id="dom123", ids=["id1"]) + await self.resource.delete_from_on_hold(request) + body = self.mock_client.request.call_args.kwargs.get("body") or {} + assert "domain_id" not in body + assert body.get("ids") == ["id1"] + + async def test_delete_from_blocklist_includes_domain_id_in_body(self): + request = SuppressionDeleteRequest(domain_id="dom123", ids=["id1"]) + await self.resource.delete_from_blocklist(request) + body = self.mock_client.request.call_args.kwargs.get("body") or {} + assert body.get("domain_id") == "dom123" diff --git a/tests/unit/test_async_schedules_resource.py b/tests/unit/test_async_schedules_resource.py new file mode 100644 index 0000000..23c30be --- /dev/null +++ b/tests/unit/test_async_schedules_resource.py @@ -0,0 +1,64 @@ +"""Tests for AsyncSchedules resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.schedules import AsyncSchedules +from mailersend.models.base import APIResponse +from mailersend.models.schedules import ( + SchedulesListRequest, + SchedulesListQueryParams, + ScheduleGetRequest, + ScheduleDeleteRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncSchedules: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncSchedules(self.mock_client) + + async def test_list_schedules_returns_api_response(self): + request = SchedulesListRequest(query_params=SchedulesListQueryParams()) + result = await self.resource.list_schedules(request) + assert isinstance(result, APIResponse) + + async def test_list_schedules_calls_correct_endpoint(self): + request = SchedulesListRequest(query_params=SchedulesListQueryParams()) + await self.resource.list_schedules(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "message-schedules" + + async def test_get_schedule_returns_api_response(self): + result = await self.resource.get_schedule( + ScheduleGetRequest(message_id="msg123") + ) + assert isinstance(result, APIResponse) + + async def test_get_schedule_calls_correct_endpoint(self): + await self.resource.get_schedule(ScheduleGetRequest(message_id="msg123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "message-schedules/msg123" + + async def test_delete_schedule_returns_api_response(self): + result = await self.resource.delete_schedule( + ScheduleDeleteRequest(message_id="msg123") + ) + assert isinstance(result, APIResponse) + + async def test_delete_schedule_calls_correct_endpoint(self): + await self.resource.delete_schedule(ScheduleDeleteRequest(message_id="msg123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "message-schedules/msg123" diff --git a/tests/unit/test_async_sms_activity_resource.py b/tests/unit/test_async_sms_activity_resource.py new file mode 100644 index 0000000..7cf6ca9 --- /dev/null +++ b/tests/unit/test_async_sms_activity_resource.py @@ -0,0 +1,46 @@ +"""Tests for AsyncSmsActivity resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.sms_activity import AsyncSmsActivity +from mailersend.models.base import APIResponse +from mailersend.models.sms_activity import ( + SmsActivityListRequest, + SmsMessageGetRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncSmsActivity: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncSmsActivity(self.mock_client) + + async def test_list_returns_api_response(self): + result = await self.resource.list(SmsActivityListRequest()) + assert isinstance(result, APIResponse) + + async def test_list_calls_correct_endpoint(self): + await self.resource.list(SmsActivityListRequest()) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-activity" + + async def test_get_returns_api_response(self): + result = await self.resource.get(SmsMessageGetRequest(sms_message_id="msg123")) + assert isinstance(result, APIResponse) + + async def test_get_calls_correct_endpoint(self): + await self.resource.get(SmsMessageGetRequest(sms_message_id="msg123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-messages/msg123" diff --git a/tests/unit/test_async_sms_inbounds_resource.py b/tests/unit/test_async_sms_inbounds_resource.py new file mode 100644 index 0000000..801a720 --- /dev/null +++ b/tests/unit/test_async_sms_inbounds_resource.py @@ -0,0 +1,100 @@ +"""Tests for AsyncSmsInbounds resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.sms_inbounds import AsyncSmsInbounds +from mailersend.models.base import APIResponse +from mailersend.models.sms_inbounds import ( + SmsInboundsListRequest, + SmsInboundsListQueryParams, + SmsInboundGetRequest, + SmsInboundCreateRequest, + SmsInboundUpdateRequest, + SmsInboundDeleteRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncSmsInbounds: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncSmsInbounds(self.mock_client) + + async def test_list_sms_inbounds_returns_api_response(self): + result = await self.resource.list_sms_inbounds(SmsInboundsListRequest()) + assert isinstance(result, APIResponse) + + async def test_list_sms_inbounds_calls_correct_endpoint(self): + await self.resource.list_sms_inbounds(SmsInboundsListRequest()) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-inbounds" + + async def test_get_sms_inbound_returns_api_response(self): + result = await self.resource.get_sms_inbound( + SmsInboundGetRequest(sms_inbound_id="inb123") + ) + assert isinstance(result, APIResponse) + + async def test_get_sms_inbound_calls_correct_endpoint(self): + await self.resource.get_sms_inbound( + SmsInboundGetRequest(sms_inbound_id="inb123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-inbounds/inb123" + + async def test_create_sms_inbound_returns_api_response(self): + request = SmsInboundCreateRequest( + sms_number_id="num123", + name="My Inbound", + forward_url="https://example.com/webhook", + ) + result = await self.resource.create_sms_inbound(request) + assert isinstance(result, APIResponse) + + async def test_create_sms_inbound_calls_correct_endpoint(self): + request = SmsInboundCreateRequest( + sms_number_id="num123", + name="My Inbound", + forward_url="https://example.com/webhook", + ) + await self.resource.create_sms_inbound(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "sms-inbounds" + + async def test_update_sms_inbound_returns_api_response(self): + request = SmsInboundUpdateRequest(sms_inbound_id="inb123", name="Updated") + result = await self.resource.update_sms_inbound(request) + assert isinstance(result, APIResponse) + + async def test_update_sms_inbound_calls_correct_endpoint(self): + request = SmsInboundUpdateRequest(sms_inbound_id="inb123", name="Updated") + await self.resource.update_sms_inbound(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "sms-inbounds/inb123" + + async def test_delete_sms_inbound_returns_api_response(self): + result = await self.resource.delete_sms_inbound( + SmsInboundDeleteRequest(sms_inbound_id="inb123") + ) + assert isinstance(result, APIResponse) + + async def test_delete_sms_inbound_calls_correct_endpoint(self): + await self.resource.delete_sms_inbound( + SmsInboundDeleteRequest(sms_inbound_id="inb123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "sms-inbounds/inb123" diff --git a/tests/unit/test_async_sms_messages_resource.py b/tests/unit/test_async_sms_messages_resource.py new file mode 100644 index 0000000..488c0b4 --- /dev/null +++ b/tests/unit/test_async_sms_messages_resource.py @@ -0,0 +1,60 @@ +"""Tests for AsyncSmsMessages resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.sms_messages import AsyncSmsMessages +from mailersend.models.base import APIResponse +from mailersend.models.sms_messages import ( + SmsMessagesListRequest, + SmsMessagesListQueryParams, + SmsMessageGetRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncSmsMessages: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncSmsMessages(self.mock_client) + + async def test_list_sms_messages_returns_api_response(self): + result = await self.resource.list_sms_messages(SmsMessagesListRequest()) + assert isinstance(result, APIResponse) + + async def test_list_sms_messages_calls_correct_endpoint(self): + await self.resource.list_sms_messages(SmsMessagesListRequest()) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-messages" + + async def test_list_sms_messages_passes_query_params(self): + request = SmsMessagesListRequest( + query_params=SmsMessagesListQueryParams(page=2, limit=10) + ) + await self.resource.list_sms_messages(request) + call = self.mock_client.request.call_args + assert call.kwargs["params"]["page"] == 2 + assert call.kwargs["params"]["limit"] == 10 + + async def test_get_sms_message_returns_api_response(self): + result = await self.resource.get_sms_message( + SmsMessageGetRequest(sms_message_id="msg123") + ) + assert isinstance(result, APIResponse) + + async def test_get_sms_message_calls_correct_endpoint(self): + await self.resource.get_sms_message( + SmsMessageGetRequest(sms_message_id="msg123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-messages/msg123" diff --git a/tests/unit/test_async_sms_numbers_resource.py b/tests/unit/test_async_sms_numbers_resource.py new file mode 100644 index 0000000..5cffa9c --- /dev/null +++ b/tests/unit/test_async_sms_numbers_resource.py @@ -0,0 +1,74 @@ +"""Tests for AsyncSmsNumbers resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.sms_numbers import AsyncSmsNumbers +from mailersend.models.base import APIResponse +from mailersend.models.sms_numbers import ( + SmsNumbersListRequest, + SmsNumberGetRequest, + SmsNumberUpdateRequest, + SmsNumberDeleteRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncSmsNumbers: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncSmsNumbers(self.mock_client) + + async def test_list_returns_api_response(self): + result = await self.resource.list(SmsNumbersListRequest()) + assert isinstance(result, APIResponse) + + async def test_list_calls_correct_endpoint(self): + await self.resource.list(SmsNumbersListRequest()) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-numbers" + + async def test_get_returns_api_response(self): + result = await self.resource.get(SmsNumberGetRequest(sms_number_id="num123")) + assert isinstance(result, APIResponse) + + async def test_get_calls_correct_endpoint(self): + await self.resource.get(SmsNumberGetRequest(sms_number_id="num123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-numbers/num123" + + async def test_update_returns_api_response(self): + result = await self.resource.update( + SmsNumberUpdateRequest(sms_number_id="num123", paused=True) + ) + assert isinstance(result, APIResponse) + + async def test_update_calls_correct_endpoint(self): + await self.resource.update( + SmsNumberUpdateRequest(sms_number_id="num123", paused=True) + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "sms-numbers/num123" + + async def test_delete_returns_api_response(self): + result = await self.resource.delete( + SmsNumberDeleteRequest(sms_number_id="num123") + ) + assert isinstance(result, APIResponse) + + async def test_delete_calls_correct_endpoint(self): + await self.resource.delete(SmsNumberDeleteRequest(sms_number_id="num123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "sms-numbers/num123" diff --git a/tests/unit/test_async_sms_recipients_resource.py b/tests/unit/test_async_sms_recipients_resource.py new file mode 100644 index 0000000..42d4608 --- /dev/null +++ b/tests/unit/test_async_sms_recipients_resource.py @@ -0,0 +1,77 @@ +"""Tests for AsyncSmsRecipients resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.sms_recipients import AsyncSmsRecipients +from mailersend.models.base import APIResponse +from mailersend.models.sms_recipients import ( + SmsRecipientsListRequest, + SmsRecipientsListQueryParams, + SmsRecipientGetRequest, + SmsRecipientUpdateRequest, + SmsRecipientStatus, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncSmsRecipients: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncSmsRecipients(self.mock_client) + + async def test_list_sms_recipients_returns_api_response(self): + result = await self.resource.list_sms_recipients(SmsRecipientsListRequest()) + assert isinstance(result, APIResponse) + + async def test_list_sms_recipients_calls_correct_endpoint(self): + await self.resource.list_sms_recipients(SmsRecipientsListRequest()) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-recipients" + + async def test_list_sms_recipients_with_custom_params(self): + request = SmsRecipientsListRequest( + query_params=SmsRecipientsListQueryParams(page=2) + ) + await self.resource.list_sms_recipients(request) + call = self.mock_client.request.call_args + assert call.kwargs["params"]["page"] == 2 + + async def test_get_sms_recipient_returns_api_response(self): + result = await self.resource.get_sms_recipient( + SmsRecipientGetRequest(sms_recipient_id="rec123") + ) + assert isinstance(result, APIResponse) + + async def test_get_sms_recipient_calls_correct_endpoint(self): + await self.resource.get_sms_recipient( + SmsRecipientGetRequest(sms_recipient_id="rec123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-recipients/rec123" + + async def test_update_sms_recipient_returns_api_response(self): + request = SmsRecipientUpdateRequest( + sms_recipient_id="rec123", status=SmsRecipientStatus.ACTIVE + ) + result = await self.resource.update_sms_recipient(request) + assert isinstance(result, APIResponse) + + async def test_update_sms_recipient_calls_correct_endpoint(self): + request = SmsRecipientUpdateRequest( + sms_recipient_id="rec123", status=SmsRecipientStatus.ACTIVE + ) + await self.resource.update_sms_recipient(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "sms-recipients/rec123" diff --git a/tests/unit/test_async_sms_sending_resource.py b/tests/unit/test_async_sms_sending_resource.py new file mode 100644 index 0000000..2ae313c --- /dev/null +++ b/tests/unit/test_async_sms_sending_resource.py @@ -0,0 +1,43 @@ +"""Tests for AsyncSmsSending resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.sms_sending import AsyncSmsSending +from mailersend.models.base import APIResponse +from mailersend.models.sms_sending import SmsSendRequest + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncSmsSending: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncSmsSending(self.mock_client) + + async def test_send_returns_api_response(self): + request = SmsSendRequest( + from_number="+15551234567", + to=["+15559876543"], + text="Hello from tests", + ) + result = await self.resource.send(request) + assert isinstance(result, APIResponse) + + async def test_send_calls_correct_endpoint(self): + request = SmsSendRequest( + from_number="+15551234567", + to=["+15559876543"], + text="Hello from tests", + ) + await self.resource.send(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "sms" diff --git a/tests/unit/test_async_sms_webhooks_resource.py b/tests/unit/test_async_sms_webhooks_resource.py new file mode 100644 index 0000000..8004c71 --- /dev/null +++ b/tests/unit/test_async_sms_webhooks_resource.py @@ -0,0 +1,109 @@ +"""Tests for AsyncSmsWebhooks resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.sms_webhooks import AsyncSmsWebhooks +from mailersend.models.base import APIResponse +from mailersend.models.sms_webhooks import ( + SmsWebhooksListRequest, + SmsWebhooksListQueryParams, + SmsWebhookGetRequest, + SmsWebhookCreateRequest, + SmsWebhookUpdateRequest, + SmsWebhookDeleteRequest, + SmsWebhookEvent, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncSmsWebhooks: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncSmsWebhooks(self.mock_client) + + async def test_list_sms_webhooks_returns_api_response(self): + request = SmsWebhooksListRequest( + query_params=SmsWebhooksListQueryParams(sms_number_id="num123") + ) + result = await self.resource.list_sms_webhooks(request) + assert isinstance(result, APIResponse) + + async def test_list_sms_webhooks_calls_correct_endpoint(self): + request = SmsWebhooksListRequest( + query_params=SmsWebhooksListQueryParams(sms_number_id="num123") + ) + await self.resource.list_sms_webhooks(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-webhooks" + + async def test_get_sms_webhook_returns_api_response(self): + result = await self.resource.get_sms_webhook( + SmsWebhookGetRequest(sms_webhook_id="wh123") + ) + assert isinstance(result, APIResponse) + + async def test_get_sms_webhook_calls_correct_endpoint(self): + await self.resource.get_sms_webhook( + SmsWebhookGetRequest(sms_webhook_id="wh123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "sms-webhooks/wh123" + + async def test_create_sms_webhook_returns_api_response(self): + request = SmsWebhookCreateRequest( + url="https://example.com/webhook", + name="My Webhook", + events=[SmsWebhookEvent.SMS_SENT], + sms_number_id="num123", + ) + result = await self.resource.create_sms_webhook(request) + assert isinstance(result, APIResponse) + + async def test_create_sms_webhook_calls_correct_endpoint(self): + request = SmsWebhookCreateRequest( + url="https://example.com/webhook", + name="My Webhook", + events=[SmsWebhookEvent.SMS_SENT], + sms_number_id="num123", + ) + await self.resource.create_sms_webhook(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "sms-webhooks" + + async def test_update_sms_webhook_returns_api_response(self): + request = SmsWebhookUpdateRequest(sms_webhook_id="wh123", name="Updated") + result = await self.resource.update_sms_webhook(request) + assert isinstance(result, APIResponse) + + async def test_update_sms_webhook_calls_correct_endpoint(self): + request = SmsWebhookUpdateRequest(sms_webhook_id="wh123", name="Updated") + await self.resource.update_sms_webhook(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "sms-webhooks/wh123" + + async def test_delete_sms_webhook_returns_api_response(self): + result = await self.resource.delete_sms_webhook( + SmsWebhookDeleteRequest(sms_webhook_id="wh123") + ) + assert isinstance(result, APIResponse) + + async def test_delete_sms_webhook_calls_correct_endpoint(self): + await self.resource.delete_sms_webhook( + SmsWebhookDeleteRequest(sms_webhook_id="wh123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "sms-webhooks/wh123" diff --git a/tests/unit/test_async_smtp_users_resource.py b/tests/unit/test_async_smtp_users_resource.py new file mode 100644 index 0000000..5502678 --- /dev/null +++ b/tests/unit/test_async_smtp_users_resource.py @@ -0,0 +1,94 @@ +"""Tests for AsyncSmtpUsers resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.smtp_users import AsyncSmtpUsers +from mailersend.models.base import APIResponse +from mailersend.models.smtp_users import ( + SmtpUsersListRequest, + SmtpUsersListQueryParams, + SmtpUserGetRequest, + SmtpUserCreateRequest, + SmtpUserUpdateRequest, + SmtpUserDeleteRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncSmtpUsers: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncSmtpUsers(self.mock_client) + + async def test_list_smtp_users_returns_api_response(self): + request = SmtpUsersListRequest(domain_id="dom123") + result = await self.resource.list_smtp_users(request) + assert isinstance(result, APIResponse) + + async def test_list_smtp_users_calls_correct_endpoint(self): + request = SmtpUsersListRequest(domain_id="dom123") + await self.resource.list_smtp_users(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "domains/dom123/smtp-users" + + async def test_get_smtp_user_returns_api_response(self): + request = SmtpUserGetRequest(domain_id="dom123", smtp_user_id="user456") + result = await self.resource.get_smtp_user(request) + assert isinstance(result, APIResponse) + + async def test_get_smtp_user_calls_correct_endpoint(self): + request = SmtpUserGetRequest(domain_id="dom123", smtp_user_id="user456") + await self.resource.get_smtp_user(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "domains/dom123/smtp-users/user456" + + async def test_create_smtp_user_returns_api_response(self): + request = SmtpUserCreateRequest(domain_id="dom123", name="My SMTP User") + result = await self.resource.create_smtp_user(request) + assert isinstance(result, APIResponse) + + async def test_create_smtp_user_calls_correct_endpoint(self): + request = SmtpUserCreateRequest(domain_id="dom123", name="My SMTP User") + await self.resource.create_smtp_user(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "domains/dom123/smtp-users" + + async def test_update_smtp_user_returns_api_response(self): + request = SmtpUserUpdateRequest( + domain_id="dom123", smtp_user_id="user456", name="Updated" + ) + result = await self.resource.update_smtp_user(request) + assert isinstance(result, APIResponse) + + async def test_update_smtp_user_calls_correct_endpoint(self): + request = SmtpUserUpdateRequest( + domain_id="dom123", smtp_user_id="user456", name="Updated" + ) + await self.resource.update_smtp_user(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "domains/dom123/smtp-users/user456" + + async def test_delete_smtp_user_returns_api_response(self): + request = SmtpUserDeleteRequest(domain_id="dom123", smtp_user_id="user456") + result = await self.resource.delete_smtp_user(request) + assert isinstance(result, APIResponse) + + async def test_delete_smtp_user_calls_correct_endpoint(self): + request = SmtpUserDeleteRequest(domain_id="dom123", smtp_user_id="user456") + await self.resource.delete_smtp_user(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "domains/dom123/smtp-users/user456" diff --git a/tests/unit/test_async_templates_resource.py b/tests/unit/test_async_templates_resource.py new file mode 100644 index 0000000..2680bfa --- /dev/null +++ b/tests/unit/test_async_templates_resource.py @@ -0,0 +1,72 @@ +"""Tests for AsyncTemplates resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.templates import AsyncTemplates +from mailersend.models.base import APIResponse +from mailersend.models.templates import ( + TemplatesListRequest, + TemplatesListQueryParams, + TemplateGetRequest, + TemplateDeleteRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncTemplates: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncTemplates(self.mock_client) + + async def test_list_templates_returns_api_response(self): + result = await self.resource.list_templates() + assert isinstance(result, APIResponse) + + async def test_list_templates_calls_correct_endpoint(self): + await self.resource.list_templates() + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "templates" + + async def test_list_templates_with_request(self): + request = TemplatesListRequest( + query_params=TemplatesListQueryParams(page=2, limit=10) + ) + await self.resource.list_templates(request) + call = self.mock_client.request.call_args + assert call.kwargs["params"]["page"] == 2 + + async def test_get_template_returns_api_response(self): + result = await self.resource.get_template( + TemplateGetRequest(template_id="tmpl123") + ) + assert isinstance(result, APIResponse) + + async def test_get_template_calls_correct_endpoint(self): + await self.resource.get_template(TemplateGetRequest(template_id="tmpl123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "templates/tmpl123" + + async def test_delete_template_returns_api_response(self): + result = await self.resource.delete_template( + TemplateDeleteRequest(template_id="tmpl123") + ) + assert isinstance(result, APIResponse) + + async def test_delete_template_calls_correct_endpoint(self): + await self.resource.delete_template( + TemplateDeleteRequest(template_id="tmpl123") + ) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "templates/tmpl123" diff --git a/tests/unit/test_async_tokens_resource.py b/tests/unit/test_async_tokens_resource.py new file mode 100644 index 0000000..7ff5ba3 --- /dev/null +++ b/tests/unit/test_async_tokens_resource.py @@ -0,0 +1,105 @@ +"""Tests for AsyncTokens resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.tokens import AsyncTokens +from mailersend.models.base import APIResponse +from mailersend.models.tokens import ( + TokensListRequest, + TokensListQueryParams, + TokenGetRequest, + TokenCreateRequest, + TokenUpdateRequest, + TokenUpdateNameRequest, + TokenDeleteRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncTokens: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncTokens(self.mock_client) + + async def test_list_tokens_returns_api_response(self): + result = await self.resource.list_tokens(TokensListRequest()) + assert isinstance(result, APIResponse) + + async def test_list_tokens_calls_correct_endpoint(self): + await self.resource.list_tokens(TokensListRequest()) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "token" + + async def test_get_token_returns_api_response(self): + result = await self.resource.get_token(TokenGetRequest(token_id="tok123")) + assert isinstance(result, APIResponse) + + async def test_get_token_calls_correct_endpoint(self): + await self.resource.get_token(TokenGetRequest(token_id="tok123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "token/tok123" + + async def test_create_token_returns_api_response(self): + request = TokenCreateRequest( + name="My Token", + domain_id="dom123", + scopes=["email_full"], + ) + result = await self.resource.create_token(request) + assert isinstance(result, APIResponse) + + async def test_create_token_calls_correct_endpoint(self): + request = TokenCreateRequest( + name="My Token", + domain_id="dom123", + scopes=["email_full"], + ) + await self.resource.create_token(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "token" + + async def test_update_token_returns_api_response(self): + request = TokenUpdateRequest(token_id="tok123", status="pause") + result = await self.resource.update_token(request) + assert isinstance(result, APIResponse) + + async def test_update_token_calls_correct_endpoint(self): + request = TokenUpdateRequest(token_id="tok123", status="pause") + await self.resource.update_token(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "token/tok123/settings" + + async def test_update_token_name_returns_api_response(self): + request = TokenUpdateNameRequest(token_id="tok123", name="New Name") + result = await self.resource.update_token_name(request) + assert isinstance(result, APIResponse) + + async def test_update_token_name_calls_correct_endpoint(self): + request = TokenUpdateNameRequest(token_id="tok123", name="New Name") + await self.resource.update_token_name(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "token/tok123" + + async def test_delete_token_returns_api_response(self): + result = await self.resource.delete_token(TokenDeleteRequest(token_id="tok123")) + assert isinstance(result, APIResponse) + + async def test_delete_token_calls_correct_endpoint(self): + await self.resource.delete_token(TokenDeleteRequest(token_id="tok123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "token/tok123" diff --git a/tests/unit/test_async_users_resource.py b/tests/unit/test_async_users_resource.py new file mode 100644 index 0000000..5e77a2b --- /dev/null +++ b/tests/unit/test_async_users_resource.py @@ -0,0 +1,133 @@ +"""Tests for AsyncUsers resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.users import AsyncUsers +from mailersend.models.base import APIResponse +from mailersend.models.users import ( + UsersListRequest, + UsersListQueryParams, + UserGetRequest, + UserInviteRequest, + UserUpdateRequest, + UserDeleteRequest, + InvitesListRequest, + InvitesListQueryParams, + InviteGetRequest, + InviteResendRequest, + InviteCancelRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncUsers: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncUsers(self.mock_client) + + async def test_list_users_returns_api_response(self): + result = await self.resource.list_users(UsersListRequest()) + assert isinstance(result, APIResponse) + + async def test_list_users_calls_correct_endpoint(self): + await self.resource.list_users(UsersListRequest()) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "users" + + async def test_get_user_returns_api_response(self): + result = await self.resource.get_user(UserGetRequest(user_id="usr123")) + assert isinstance(result, APIResponse) + + async def test_get_user_calls_correct_endpoint(self): + await self.resource.get_user(UserGetRequest(user_id="usr123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "users/usr123" + + async def test_invite_user_returns_api_response(self): + request = UserInviteRequest(email="newuser@example.com", role="admin") + result = await self.resource.invite_user(request) + assert isinstance(result, APIResponse) + + async def test_invite_user_calls_correct_endpoint(self): + request = UserInviteRequest(email="newuser@example.com", role="admin") + await self.resource.invite_user(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "users" + + async def test_update_user_returns_api_response(self): + request = UserUpdateRequest(user_id="usr123", role="viewer") + result = await self.resource.update_user(request) + assert isinstance(result, APIResponse) + + async def test_update_user_calls_correct_endpoint(self): + request = UserUpdateRequest(user_id="usr123", role="viewer") + await self.resource.update_user(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "users/usr123" + + async def test_delete_user_returns_api_response(self): + result = await self.resource.delete_user(UserDeleteRequest(user_id="usr123")) + assert isinstance(result, APIResponse) + + async def test_delete_user_calls_correct_endpoint(self): + await self.resource.delete_user(UserDeleteRequest(user_id="usr123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "users/usr123" + + async def test_list_invites_returns_api_response(self): + result = await self.resource.list_invites(InvitesListRequest()) + assert isinstance(result, APIResponse) + + async def test_list_invites_calls_correct_endpoint(self): + await self.resource.list_invites(InvitesListRequest()) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "invites" + + async def test_get_invite_returns_api_response(self): + result = await self.resource.get_invite(InviteGetRequest(invite_id="inv123")) + assert isinstance(result, APIResponse) + + async def test_get_invite_calls_correct_endpoint(self): + await self.resource.get_invite(InviteGetRequest(invite_id="inv123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "invites/inv123" + + async def test_resend_invite_returns_api_response(self): + result = await self.resource.resend_invite( + InviteResendRequest(invite_id="inv123") + ) + assert isinstance(result, APIResponse) + + async def test_resend_invite_calls_correct_endpoint(self): + await self.resource.resend_invite(InviteResendRequest(invite_id="inv123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "invites/inv123/resend" + + async def test_cancel_invite_returns_api_response(self): + result = await self.resource.cancel_invite( + InviteCancelRequest(invite_id="inv123") + ) + assert isinstance(result, APIResponse) + + async def test_cancel_invite_calls_correct_endpoint(self): + await self.resource.cancel_invite(InviteCancelRequest(invite_id="inv123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "invites/inv123" diff --git a/tests/unit/test_async_webhooks_resource.py b/tests/unit/test_async_webhooks_resource.py new file mode 100644 index 0000000..da82238 --- /dev/null +++ b/tests/unit/test_async_webhooks_resource.py @@ -0,0 +1,103 @@ +"""Tests for AsyncWebhooks resource.""" + +from unittest.mock import AsyncMock, MagicMock + +from mailersend.resources.webhooks import AsyncWebhooks +from mailersend.models.base import APIResponse +from mailersend.models.webhooks import ( + WebhooksListRequest, + WebhooksListQueryParams, + WebhookGetRequest, + WebhookCreateRequest, + WebhookUpdateRequest, + WebhookDeleteRequest, +) + + +def _make_mock_client(): + client = MagicMock() + client.request = AsyncMock( + return_value=MagicMock( + status_code=200, headers={}, json=MagicMock(return_value={}), content=b"{}" + ) + ) + return client + + +class TestAsyncWebhooks: + def setup_method(self): + self.mock_client = _make_mock_client() + self.resource = AsyncWebhooks(self.mock_client) + + async def test_list_webhooks_returns_api_response(self): + request = WebhooksListRequest( + query_params=WebhooksListQueryParams(domain_id="dom123") + ) + result = await self.resource.list_webhooks(request) + assert isinstance(result, APIResponse) + + async def test_list_webhooks_calls_correct_endpoint(self): + request = WebhooksListRequest( + query_params=WebhooksListQueryParams(domain_id="dom123") + ) + await self.resource.list_webhooks(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "webhooks" + + async def test_get_webhook_returns_api_response(self): + result = await self.resource.get_webhook(WebhookGetRequest(webhook_id="wh123")) + assert isinstance(result, APIResponse) + + async def test_get_webhook_calls_correct_endpoint(self): + await self.resource.get_webhook(WebhookGetRequest(webhook_id="wh123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "webhooks/wh123" + + async def test_create_webhook_returns_api_response(self): + request = WebhookCreateRequest( + url="https://example.com/hook", + name="My Webhook", + events=["activity.sent"], + domain_id="dom123", + ) + result = await self.resource.create_webhook(request) + assert isinstance(result, APIResponse) + + async def test_create_webhook_calls_correct_endpoint(self): + request = WebhookCreateRequest( + url="https://example.com/hook", + name="My Webhook", + events=["activity.sent"], + domain_id="dom123", + ) + await self.resource.create_webhook(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "POST" + assert call.kwargs["path"] == "webhooks" + + async def test_update_webhook_returns_api_response(self): + request = WebhookUpdateRequest(webhook_id="wh123", name="Updated") + result = await self.resource.update_webhook(request) + assert isinstance(result, APIResponse) + + async def test_update_webhook_excludes_id_from_body(self): + request = WebhookUpdateRequest(webhook_id="wh123", name="Updated") + await self.resource.update_webhook(request) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "PUT" + assert call.kwargs["path"] == "webhooks/wh123" + assert "webhook_id" not in (call.kwargs.get("body") or {}) + + async def test_delete_webhook_returns_api_response(self): + result = await self.resource.delete_webhook( + WebhookDeleteRequest(webhook_id="wh123") + ) + assert isinstance(result, APIResponse) + + async def test_delete_webhook_calls_correct_endpoint(self): + await self.resource.delete_webhook(WebhookDeleteRequest(webhook_id="wh123")) + call = self.mock_client.request.call_args + assert call.kwargs["method"] == "DELETE" + assert call.kwargs["path"] == "webhooks/wh123" diff --git a/tests/unit/test_webhooks_builder.py b/tests/unit/test_webhooks_builder.py index a0dcf61..1b427cf 100644 --- a/tests/unit/test_webhooks_builder.py +++ b/tests/unit/test_webhooks_builder.py @@ -175,7 +175,11 @@ def test_all_events(self): "recipient.on_hold_added", "recipient.on_hold_removed", ] - expected_all_events = expected_activity_events + expected_system_events + expected_recipient_events + expected_all_events = ( + expected_activity_events + + expected_system_events + + expected_recipient_events + ) assert builder._events == expected_all_events def test_method_chaining(self): From 5f96c66aa2b5ea0f052c309fe35fbbff4b814c77 Mon Sep 17 00:00:00 2001 From: rocribera Date: Tue, 26 May 2026 15:11:23 +0200 Subject: [PATCH 02/10] feat: remove deduplicated code for async --- README.md | 224 +----------- mailersend/resources/activity.py | 48 +-- mailersend/resources/analytics.py | 89 +---- mailersend/resources/base.py | 23 +- mailersend/resources/dmarc_monitoring.py | 206 +---------- mailersend/resources/domains.py | 183 +--------- mailersend/resources/email.py | 76 +--- mailersend/resources/email_verification.py | 177 +-------- mailersend/resources/identities.py | 173 +-------- mailersend/resources/inbound.py | 105 +----- mailersend/resources/messages.py | 46 +-- mailersend/resources/other.py | 19 +- mailersend/resources/recipients.py | 380 +------------------- mailersend/resources/schedules.py | 63 +--- mailersend/resources/sms_activity.py | 44 +-- mailersend/resources/sms_inbounds.py | 97 +---- mailersend/resources/sms_messages.py | 44 +-- mailersend/resources/sms_numbers.py | 84 +---- mailersend/resources/sms_recipients.py | 71 +--- mailersend/resources/sms_sending.py | 23 +- mailersend/resources/sms_webhooks.py | 101 +----- mailersend/resources/smtp_users.py | 107 +----- mailersend/resources/templates.py | 70 +--- mailersend/resources/tokens.py | 124 +------ mailersend/resources/users.py | 184 +--------- mailersend/resources/webhooks.py | 101 +----- tests/unit/test_analytics_resource.py | 18 +- tests/unit/test_async_analytics_resource.py | 12 +- 28 files changed, 224 insertions(+), 2668 deletions(-) diff --git a/README.md b/README.md index 0d31354..5d0881d 100644 --- a/README.md +++ b/README.md @@ -120,20 +120,6 @@ MailerSend Python SDK - [Create an email verification list](#create-an-email-verification-list) - [Verify a list](#verify-a-list) - [Get list results](#get-list-results) - - [Webhooks](#webhooks-1) - - [Get a list of webhooks](#get-a-list-of-webhooks-1) - - [Get a single webhook](#get-a-single-webhook-1) - - [Create a Webhook](#create-a-webhook-1) - - [Create a disabled webhook](#create-a-disabled-webhook-1) - - [Update a Webhook](#update-a-webhook-1) - - [Disable/Enable a Webhook](#disableenable-a-webhook-1) - - [Delete a Webhook](#delete-a-webhook-1) - - [Email Verification](#email-verification-1) - - [Get all email verification lists](#get-all-email-verification-lists-1) - - [Get a single email verification list](#get-a-single-email-verification-list-1) - - [Create an email verification list](#create-an-email-verification-list-1) - - [Verify a list](#verify-a-list-1) - - [Get list results](#get-list-results-1) - [SMS](#sms) - [Sending SMS messages](#sending-sms-messages) - [SMS Activity](#sms-activity) @@ -1840,204 +1826,6 @@ request = (EmailVerificationBuilder() response = ms.email_verification.get_results(request) ``` -## Webhooks - -### Get a list of webhooks - -```python -from mailersend import MailerSendClient -from mailersend import WebhooksBuilder - -ms = MailerSendClient() - -request = (WebhooksBuilder() - .domain_id("domain-id") - .build_webhooks_list_request()) - -response = ms.webhooks.list_webhooks(request) -``` - -### Get a single webhook - -```python -from mailersend import MailerSendClient -from mailersend import WebhooksBuilder - -ms = MailerSendClient() - -request = (WebhooksBuilder() - .webhook_id("webhook-id") - .build_webhook_get_request()) - -response = ms.webhooks.get_webhook(request) -``` - -### Create a Webhook - -```python -from mailersend import MailerSendClient -from mailersend import WebhooksBuilder - -ms = MailerSendClient() - -request = (WebhooksBuilder() - .domain_id("domain-id") - .url("https://webhook.example.com") - .name("My Webhook") - .events(["activity.sent", "activity.delivered", "activity.opened"]) - .enabled(True) - .build_webhook_create_request()) - -response = ms.webhooks.create_webhook(request) -``` - -### Create a disabled webhook - -```python -from mailersend import MailerSendClient -from mailersend import WebhooksBuilder - -ms = MailerSendClient() - -request = (WebhooksBuilder() - .domain_id("domain-id") - .url("https://webhook.example.com") - .name("Disabled Webhook") - .events(["activity.sent", "activity.delivered"]) - .enabled(False) # Create disabled - .build_webhook_create_request()) - -response = ms.webhooks.create_webhook(request) -``` - -### Update a Webhook - -```python -from mailersend import MailerSendClient -from mailersend import WebhooksBuilder - -ms = MailerSendClient() - -request = (WebhooksBuilder() - .webhook_id("webhook-id") - .name("Updated Webhook Name") - .url("https://new-webhook.example.com") - .enabled(True) - .build_webhook_update_request()) - -response = ms.webhooks.update_webhook(request) -``` - -### Disable/Enable a Webhook - -```python -from mailersend import MailerSendClient -from mailersend import WebhooksBuilder - -ms = MailerSendClient() - -# Disable webhook -request = (WebhooksBuilder() - .webhook_id("webhook-id") - .enabled(False) - .build_webhook_update_request()) - -response = ms.webhooks.update_webhook(request) - -# Enable webhook -request = (WebhooksBuilder() - .webhook_id("webhook-id") - .enabled(True) - .build_webhook_update_request()) - -response = ms.webhooks.update_webhook(request) -``` - -### Delete a Webhook - -```python -from mailersend import MailerSendClient -from mailersend import WebhooksBuilder - -ms = MailerSendClient() - -request = (WebhooksBuilder() - .webhook_id("webhook-id") - .build_webhook_delete_request()) - -response = ms.webhooks.delete_webhook(request) -``` - -## Email Verification - -### Get all email verification lists - -```python -from mailersend import MailerSendClient, EmailVerificationBuilder - -ms = MailerSendClient() - -request = EmailVerificationBuilder().build_list_request() -response = ms.email_verification.list_verification_lists(request) -``` - -### Get a single email verification list - -```python -from mailersend import MailerSendClient, EmailVerificationBuilder - -ms = MailerSendClient() - -request = (EmailVerificationBuilder() - .verification_list_id("list-id") - .build_get_request()) - -response = ms.email_verification.get_verification_list(request) -``` - -### Create an email verification list - -```python -from mailersend import MailerSendClient, EmailVerificationBuilder - -ms = MailerSendClient() - -request = (EmailVerificationBuilder() - .name("My Verification List") - .emails(["test1@example.com", "test2@example.com"]) - .build_create_request()) - -response = ms.email_verification.create_verification_list(request) -``` - -### Verify a list - -```python -from mailersend import MailerSendClient, EmailVerificationBuilder - -ms = MailerSendClient() - -request = (EmailVerificationBuilder() - .verification_list_id("list-id") - .build_verify_request()) - -response = ms.email_verification.verify_list(request) -``` - -### Get list results - -```python -from mailersend import MailerSendClient, EmailVerificationBuilder - -ms = MailerSendClient() - -request = (EmailVerificationBuilder() - .verification_list_id("list-id") - .build_results_request()) - -response = ms.email_verification.get_verification_results(request) -``` - ## SMS ### Sending SMS messages @@ -2941,7 +2729,7 @@ from mailersend import AsyncMailerSendClient, DomainsBuilder, TemplatesBuilder async def main(): async with AsyncMailerSendClient() as client: domains_request = DomainsBuilder().build_list_request() - templates_request = TemplatesBuilder().build_list_request() + templates_request = TemplatesBuilder().build_templates_list_request() # Both requests run concurrently domains_response, templates_response = await asyncio.gather( @@ -3050,10 +2838,12 @@ except Exception as e: Common error types: - **ValidationError**: Invalid data in request models (handled by Pydantic) -- **AuthenticationError**: Invalid or missing API key -- **RateLimitError**: API rate limit exceeded -- **APIError**: General API errors (4xx, 5xx responses) -- **NetworkError**: Network connectivity issues +- **AuthenticationError**: Invalid or missing API key (401) +- **RateLimitExceeded**: API rate limit exceeded (429) +- **BadRequestError**: Malformed or invalid request (400) +- **ResourceNotFoundError**: Requested resource not found (404) +- **ServerError**: Server-side error (5xx) +- **MailerSendError**: Base exception; also raised for network connectivity failures # Testing diff --git a/mailersend/resources/activity.py b/mailersend/resources/activity.py index 5752ef1..1a5ce63 100644 --- a/mailersend/resources/activity.py +++ b/mailersend/resources/activity.py @@ -1,6 +1,6 @@ """Activity resource""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.activity import ActivityRequest, SingleActivityRequest from ..models.base import APIResponse @@ -28,12 +28,10 @@ def get(self, request: ActivityRequest) -> APIResponse: self.logger.debug("Getting activity data for domain: %s", request.domain_id) self.logger.debug("Query params: %s", params) - response = self.client.request( + return self._request( method="GET", path=f"activity/{request.domain_id}", params=params ) - return self._create_response(response) - def get_single(self, request: SingleActivityRequest) -> APIResponse: """ Get a single activity by its ID. @@ -47,45 +45,7 @@ def get_single(self, request: SingleActivityRequest) -> APIResponse: self.logger.debug("Preparing to get single activity") self.logger.debug("Getting single activity: %s", request.activity_id) - response = self.client.request( - method="GET", path=f"activities/{request.activity_id}" - ) - - return self._create_response(response) - + return self._request(method="GET", path=f"activities/{request.activity_id}") -class AsyncActivity(AsyncBaseResource): - """Async client for interacting with the MailerSend Activity API.""" - async def get(self, request: ActivityRequest) -> APIResponse: - """ - Get activity data for a domain. - - Args: - request: A fully-validated ActivityRequest object - - Returns: - APIResponse with activity data and metadata - """ - self.logger.debug("Preparing to get activity data") - params = request.to_query_params() - response = await self.client.request( - method="GET", path=f"activity/{request.domain_id}", params=params - ) - return self._create_response(response) - - async def get_single(self, request: SingleActivityRequest) -> APIResponse: - """ - Get a single activity by its ID. - - Args: - request: A fully-validated SingleActivityRequest object - - Returns: - APIResponse with single activity data - """ - self.logger.debug("Getting single activity: %s", request.activity_id) - response = await self.client.request( - method="GET", path=f"activities/{request.activity_id}" - ) - return self._create_response(response) +AsyncActivity = Activity diff --git a/mailersend/resources/analytics.py b/mailersend/resources/analytics.py index 716b4f3..ed93dde 100644 --- a/mailersend/resources/analytics.py +++ b/mailersend/resources/analytics.py @@ -2,7 +2,7 @@ from typing import Dict, Any, Optional -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.analytics import AnalyticsRequest from ..models.base import APIResponse @@ -33,9 +33,7 @@ def get_activity_by_date(self, request: AnalyticsRequest) -> APIResponse: self.logger.info("Requesting analytics data by date") self.logger.debug("Query params: %s", params) - response = self.client.request("GET", "analytics/date", params=params) - - return self._create_response(response) + return self._request("GET", "analytics/date", params=params) def get_opens_by_country(self, request: AnalyticsRequest) -> APIResponse: """ @@ -55,9 +53,7 @@ def get_opens_by_country(self, request: AnalyticsRequest) -> APIResponse: self.logger.info("Requesting analytics data by country") self.logger.debug("Query params: %s", params) - response = self.client.request("GET", "analytics/country", params=params) - - return self._create_response(response) + return self._request("GET", "analytics/country", params=params) def get_opens_by_user_agent(self, request: AnalyticsRequest) -> APIResponse: """ @@ -77,9 +73,7 @@ def get_opens_by_user_agent(self, request: AnalyticsRequest) -> APIResponse: self.logger.info("Requesting analytics data by user agent") self.logger.debug("Query params: %s", params) - response = self.client.request("GET", "analytics/ua-name", params=params) - - return self._create_response(response) + return self._request("GET", "analytics/ua-name", params=params) def get_opens_by_reading_environment( self, request: AnalyticsRequest @@ -101,9 +95,7 @@ def get_opens_by_reading_environment( self.logger.info("Requesting analytics data by reading environment") self.logger.debug("Query params: %s", params) - response = self.client.request("GET", "analytics/ua-type", params=params) - - return self._create_response(response) + return self._request("GET", "analytics/ua-type", params=params) def _build_query_params( self, request: AnalyticsRequest, exclude_fields: Optional[list] = None @@ -131,73 +123,4 @@ def _build_query_params( return params -class AsyncAnalytics(AsyncBaseResource): - """Async client for interacting with the MailerSend Analytics API.""" - - async def get_activity_by_date(self, request: AnalyticsRequest) -> APIResponse: - """ - Retrieve analytics data grouped by date. - - Args: - request: AnalyticsRequest with date range and filtering options - - Returns: - APIResponse with activity data grouped by date - """ - params = self._build_query_params(request) - response = await self.client.request("GET", "analytics/date", params=params) - return self._create_response(response) - - async def get_opens_by_country(self, request: AnalyticsRequest) -> APIResponse: - """ - Retrieve analytics data grouped by country. - - Args: - request: AnalyticsRequest with date range and filtering options - - Returns: - APIResponse with opens data grouped by country - """ - params = self._build_query_params(request, exclude_fields=["event", "group_by"]) - response = await self.client.request("GET", "analytics/country", params=params) - return self._create_response(response) - - async def get_opens_by_user_agent(self, request: AnalyticsRequest) -> APIResponse: - """ - Retrieve analytics data grouped by user agent name. - - Args: - request: AnalyticsRequest with date range and filtering options - - Returns: - APIResponse with opens data grouped by user agent - """ - params = self._build_query_params(request, exclude_fields=["event", "group_by"]) - response = await self.client.request("GET", "analytics/ua-name", params=params) - return self._create_response(response) - - async def get_opens_by_reading_environment( - self, request: AnalyticsRequest - ) -> APIResponse: - """ - Retrieve analytics data grouped by reading environment. - - Args: - request: AnalyticsRequest with date range and filtering options - - Returns: - APIResponse with opens data grouped by reading environment - """ - params = self._build_query_params(request, exclude_fields=["event", "group_by"]) - response = await self.client.request("GET", "analytics/ua-type", params=params) - return self._create_response(response) - - def _build_query_params( - self, request: AnalyticsRequest, exclude_fields: Optional[list] = None - ) -> Dict[str, Any]: - exclude_fields = exclude_fields or [] - params = request.model_dump(by_alias=True, exclude_none=True) - for field in exclude_fields: - params.pop(field, None) - params.pop(f"{field}[]", None) - return params +AsyncAnalytics = Analytics diff --git a/mailersend/resources/base.py b/mailersend/resources/base.py index ceecbfb..6d6d871 100644 --- a/mailersend/resources/base.py +++ b/mailersend/resources/base.py @@ -1,5 +1,6 @@ +import inspect import logging -from typing import Any, Dict, Optional, Union, List, TypeVar, Type, ClassVar +from typing import Any, Dict, Optional, Union, TypeVar, Type, ClassVar from ..models.base import BaseModel, ModelList, APIResponse from ..logging import get_logger @@ -50,6 +51,26 @@ def _create_response(self, response: Any, data: Any = None) -> APIResponse: ), ) + def _request(self, method, path, params=None, body=None, data=None) -> Any: + kwargs = {"method": method, "path": path} + if params is not None: + kwargs["params"] = params + if body is not None: + kwargs["body"] = body + result = self.client.request(**kwargs) + + if inspect.isawaitable(result): + async def resolve(): + response = await result + if data is not None: + return self._create_response(response, data(response)) + return self._create_response(response) + return resolve() + + if data is not None: + return self._create_response(result, data(result)) + return self._create_response(result) + def _parse_int_header(self, response: Any, header: str) -> Optional[int]: """ Safely parse integer header value. diff --git a/mailersend/resources/dmarc_monitoring.py b/mailersend/resources/dmarc_monitoring.py index 2b0a23f..0333d28 100644 --- a/mailersend/resources/dmarc_monitoring.py +++ b/mailersend/resources/dmarc_monitoring.py @@ -2,7 +2,7 @@ from typing import Optional -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.base import APIResponse from ..models.dmarc_monitoring import ( DmarcMonitoringListRequest, @@ -40,10 +40,7 @@ def list_monitors( params = request.to_query_params() self.logger.debug("Listing DMARC monitors with params: %s", params) - response = self.client.request( - method="GET", path="dmarc-monitoring", params=params - ) - return self._create_response(response) + return self._request(method="GET", path="dmarc-monitoring", params=params) def create_monitor(self, request: DmarcMonitoringCreateRequest) -> APIResponse: """ @@ -58,10 +55,7 @@ def create_monitor(self, request: DmarcMonitoringCreateRequest) -> APIResponse: body = request.model_dump(by_alias=True, exclude_none=True) self.logger.debug("Creating DMARC monitor with body: %s", body) - response = self.client.request( - method="POST", path="dmarc-monitoring", body=body - ) - return self._create_response(response) + return self._request(method="POST", path="dmarc-monitoring", body=body) def update_monitor(self, request: DmarcMonitoringUpdateRequest) -> APIResponse: """ @@ -80,10 +74,9 @@ def update_monitor(self, request: DmarcMonitoringUpdateRequest) -> APIResponse: "Updating DMARC monitor %s with body: %s", request.monitor_id, body ) - response = self.client.request( + return self._request( method="PUT", path=f"dmarc-monitoring/{request.monitor_id}", body=body ) - return self._create_response(response) def delete_monitor(self, request: DmarcMonitoringDeleteRequest) -> APIResponse: """ @@ -97,10 +90,9 @@ def delete_monitor(self, request: DmarcMonitoringDeleteRequest) -> APIResponse: """ self.logger.debug("Deleting DMARC monitor: %s", request.monitor_id) - response = self.client.request( + return self._request( method="DELETE", path=f"dmarc-monitoring/{request.monitor_id}" ) - return self._create_response(response) def get_aggregated_report( self, request: DmarcMonitoringReportRequest @@ -121,12 +113,11 @@ def get_aggregated_report( params, ) - response = self.client.request( + return self._request( method="GET", path=f"dmarc-monitoring/{request.monitor_id}/report", params=params, ) - return self._create_response(response) def get_ip_report(self, request: DmarcMonitoringIpReportRequest) -> APIResponse: """ @@ -146,12 +137,11 @@ def get_ip_report(self, request: DmarcMonitoringIpReportRequest) -> APIResponse: params, ) - response = self.client.request( + return self._request( method="GET", path=f"dmarc-monitoring/{request.monitor_id}/report/{request.ip}", params=params, ) - return self._create_response(response) def get_report_sources( self, request: DmarcMonitoringReportSourcesRequest @@ -167,11 +157,10 @@ def get_report_sources( """ self.logger.debug("Getting report sources for monitor: %s", request.monitor_id) - response = self.client.request( + return self._request( method="GET", path=f"dmarc-monitoring/{request.monitor_id}/report-sources", ) - return self._create_response(response) def mark_ip_favorite(self, request: DmarcMonitoringFavoriteRequest) -> APIResponse: """ @@ -187,11 +176,10 @@ def mark_ip_favorite(self, request: DmarcMonitoringFavoriteRequest) -> APIRespon "Marking IP %s as favorite for monitor: %s", request.ip, request.monitor_id ) - response = self.client.request( + return self._request( method="PUT", path=f"dmarc-monitoring/{request.monitor_id}/favorite/{request.ip}", ) - return self._create_response(response) def remove_ip_favorite( self, request: DmarcMonitoringFavoriteRequest @@ -211,182 +199,10 @@ def remove_ip_favorite( request.monitor_id, ) - response = self.client.request( + return self._request( method="DELETE", path=f"dmarc-monitoring/{request.monitor_id}/favorite/{request.ip}", ) - return self._create_response(response) - - -class AsyncDmarcMonitoring(AsyncBaseResource): - """Async client for the MailerSend DMARC Monitoring API.""" - - async def list_monitors( - self, request: Optional[DmarcMonitoringListRequest] = None - ) -> APIResponse: - """ - Retrieve a list of DMARC monitors. - - Args: - request: Optional DmarcMonitoringListRequest with pagination options - - Returns: - APIResponse with list of monitors - """ - if request is None: - request = DmarcMonitoringListRequest( - query_params=DmarcMonitoringListQueryParams() - ) - params = request.to_query_params() - response = await self.client.request( - method="GET", path="dmarc-monitoring", params=params - ) - return self._create_response(response) - - async def create_monitor( - self, request: DmarcMonitoringCreateRequest - ) -> APIResponse: - """ - Create a new DMARC monitor. - - Args: - request: DmarcMonitoringCreateRequest with domain_id - - Returns: - APIResponse with created monitor information - """ - body = request.model_dump(by_alias=True, exclude_none=True) - response = await self.client.request( - method="POST", path="dmarc-monitoring", body=body - ) - return self._create_response(response) - - async def update_monitor( - self, request: DmarcMonitoringUpdateRequest - ) -> APIResponse: - """ - Update a DMARC monitor. - - Args: - request: DmarcMonitoringUpdateRequest with monitor_id and wanted_dmarc_record - - Returns: - APIResponse with updated monitor information - """ - body = request.model_dump( - by_alias=True, exclude_none=True, exclude={"monitor_id"} - ) - response = await self.client.request( - method="PUT", path=f"dmarc-monitoring/{request.monitor_id}", body=body - ) - return self._create_response(response) - - async def delete_monitor( - self, request: DmarcMonitoringDeleteRequest - ) -> APIResponse: - """ - Delete a DMARC monitor. - - Args: - request: DmarcMonitoringDeleteRequest with monitor_id - - Returns: - APIResponse - """ - response = await self.client.request( - method="DELETE", path=f"dmarc-monitoring/{request.monitor_id}" - ) - return self._create_response(response) - - async def get_aggregated_report( - self, request: DmarcMonitoringReportRequest - ) -> APIResponse: - """ - Get aggregated DMARC reports for a monitor. - Args: - request: DmarcMonitoringReportRequest with monitor_id and pagination options - Returns: - APIResponse with aggregated report data - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", - path=f"dmarc-monitoring/{request.monitor_id}/report", - params=params, - ) - return self._create_response(response) - - async def get_ip_report( - self, request: DmarcMonitoringIpReportRequest - ) -> APIResponse: - """ - Get IP-specific DMARC reports for a monitor. - - Args: - request: DmarcMonitoringIpReportRequest with monitor_id, ip, and pagination options - - Returns: - APIResponse with IP-specific report data - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", - path=f"dmarc-monitoring/{request.monitor_id}/report/{request.ip}", - params=params, - ) - return self._create_response(response) - - async def get_report_sources( - self, request: DmarcMonitoringReportSourcesRequest - ) -> APIResponse: - """ - Get report sources for a DMARC monitor. - - Args: - request: DmarcMonitoringReportSourcesRequest with monitor_id - - Returns: - APIResponse with report sources data - """ - response = await self.client.request( - method="GET", path=f"dmarc-monitoring/{request.monitor_id}/report-sources" - ) - return self._create_response(response) - - async def mark_ip_favorite( - self, request: DmarcMonitoringFavoriteRequest - ) -> APIResponse: - """ - Mark an IP address as favorite for a DMARC monitor. - - Args: - request: DmarcMonitoringFavoriteRequest with monitor_id and ip - - Returns: - APIResponse - """ - response = await self.client.request( - method="PUT", - path=f"dmarc-monitoring/{request.monitor_id}/favorite/{request.ip}", - ) - return self._create_response(response) - - async def remove_ip_favorite( - self, request: DmarcMonitoringFavoriteRequest - ) -> APIResponse: - """ - Remove an IP address from favorites for a DMARC monitor. - - Args: - request: DmarcMonitoringFavoriteRequest with monitor_id and ip - - Returns: - APIResponse - """ - response = await self.client.request( - method="DELETE", - path=f"dmarc-monitoring/{request.monitor_id}/favorite/{request.ip}", - ) - return self._create_response(response) +AsyncDmarcMonitoring = DmarcMonitoring diff --git a/mailersend/resources/domains.py b/mailersend/resources/domains.py index 4ae2a35..23a4ee8 100644 --- a/mailersend/resources/domains.py +++ b/mailersend/resources/domains.py @@ -2,7 +2,7 @@ from typing import Optional -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.domains import ( DomainListRequest, DomainCreateRequest, @@ -46,9 +46,7 @@ def list_domains(self, request: Optional[DomainListRequest] = None) -> APIRespon self.logger.debug("Query params: %s", params) - response = self.client.request(method="GET", path="domains", params=params) - - return self._create_response(response) + return self._request(method="GET", path="domains", params=params) def get_domain(self, request: DomainGetRequest) -> APIResponse: """ @@ -63,11 +61,7 @@ def get_domain(self, request: DomainGetRequest) -> APIResponse: self.logger.debug("Preparing to get domain") self.logger.debug("Requesting domain information for: %s", request.domain_id) - response = self.client.request( - method="GET", path=f"domains/{request.domain_id}" - ) - - return self._create_response(response) + return self._request(method="GET", path=f"domains/{request.domain_id}") def create_domain(self, request: DomainCreateRequest) -> APIResponse: """ @@ -86,9 +80,7 @@ def create_domain(self, request: DomainCreateRequest) -> APIResponse: self.logger.debug("Request body: %s", body) - response = self.client.request(method="POST", path="domains", body=body) - - return self._create_response(response) + return self._request(method="POST", path="domains", body=body) def delete_domain(self, request: DomainDeleteRequest) -> APIResponse: """ @@ -103,11 +95,7 @@ def delete_domain(self, request: DomainDeleteRequest) -> APIResponse: self.logger.debug("Preparing to delete domain") self.logger.debug("Deleting domain: %s", request.domain_id) - response = self.client.request( - method="DELETE", path=f"domains/{request.domain_id}" - ) - - return self._create_response(response) + return self._request(method="DELETE", path=f"domains/{request.domain_id}") def get_domain_recipients(self, request: DomainRecipientsRequest) -> APIResponse: """ @@ -127,12 +115,12 @@ def get_domain_recipients(self, request: DomainRecipientsRequest) -> APIResponse self.logger.debug("Query params: %s", params) - response = self.client.request( - method="GET", path=f"domains/{request.domain_id}/recipients", params=params + return self._request( + method="GET", + path=f"domains/{request.domain_id}/recipients", + params=params, ) - return self._create_response(response) - def update_domain_settings( self, request: DomainUpdateSettingsRequest ) -> APIResponse: @@ -155,12 +143,10 @@ def update_domain_settings( self.logger.debug("Request body: %s", body) - response = self.client.request( + return self._request( method="PUT", path=f"domains/{request.domain_id}/settings", body=body ) - return self._create_response(response) - def get_domain_dns_records(self, request: DomainDnsRecordsRequest) -> APIResponse: """ Retrieve DNS records for a domain. @@ -174,12 +160,10 @@ def get_domain_dns_records(self, request: DomainDnsRecordsRequest) -> APIRespons self.logger.debug("Preparing to get domain DNS records") self.logger.debug("Retrieving DNS records for domain: %s", request.domain_id) - response = self.client.request( + return self._request( method="GET", path=f"domains/{request.domain_id}/dns-records" ) - return self._create_response(response) - def get_domain_verification_status( self, request: DomainVerificationRequest ) -> APIResponse: @@ -197,150 +181,9 @@ def get_domain_verification_status( "Retrieving verification status for domain: %s", request.domain_id ) - response = self.client.request( + return self._request( method="GET", path=f"domains/{request.domain_id}/verify" ) - return self._create_response(response) - - -class AsyncDomains(AsyncBaseResource): - """Async client for interacting with the MailerSend Domains API.""" - - async def list_domains( - self, request: Optional[DomainListRequest] = None - ) -> APIResponse: - """ - Retrieve a list of domains. - - Args: - request: Optional DomainListRequest with filtering and pagination options - Returns: - APIResponse with list of domains - """ - if not request: - query_params = DomainListQueryParams() - params = query_params.to_query_params() - else: - params = request.to_query_params() - response = await self.client.request( - method="GET", path="domains", params=params - ) - return self._create_response(response) - - async def get_domain(self, request: DomainGetRequest) -> APIResponse: - """ - Retrieve information about a single domain. - - Args: - request: DomainGetRequest with domain ID - - Returns: - APIResponse with domain information - """ - response = await self.client.request( - method="GET", path=f"domains/{request.domain_id}" - ) - return self._create_response(response) - - async def create_domain(self, request: DomainCreateRequest) -> APIResponse: - """ - Create a new domain. - - Args: - request: DomainCreateRequest with domain creation details - - Returns: - APIResponse with created domain information - """ - body = request.model_dump(by_alias=True, exclude_none=True) - response = await self.client.request(method="POST", path="domains", body=body) - return self._create_response(response) - - async def delete_domain(self, request: DomainDeleteRequest) -> APIResponse: - """ - Delete a domain. - - Args: - request: DomainDeleteRequest with domain ID to delete - - Returns: - APIResponse (204 No Content on success) - """ - response = await self.client.request( - method="DELETE", path=f"domains/{request.domain_id}" - ) - return self._create_response(response) - - async def get_domain_recipients( - self, request: DomainRecipientsRequest - ) -> APIResponse: - """ - Retrieve recipients for a domain. - - Args: - request: DomainRecipientsRequest with domain ID and pagination options - - Returns: - APIResponse with list of domain recipients - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path=f"domains/{request.domain_id}/recipients", params=params - ) - return self._create_response(response) - - async def update_domain_settings( - self, request: DomainUpdateSettingsRequest - ) -> APIResponse: - """ - Update domain settings. - - Args: - request: DomainUpdateSettingsRequest with domain ID and settings to update - - Returns: - APIResponse with updated domain information - """ - body = request.model_dump( - by_alias=True, exclude_none=True, exclude={"domain_id"} - ) - response = await self.client.request( - method="PUT", path=f"domains/{request.domain_id}/settings", body=body - ) - return self._create_response(response) - - async def get_domain_dns_records( - self, request: DomainDnsRecordsRequest - ) -> APIResponse: - """ - Retrieve DNS records for a domain. - - Args: - request: DomainDnsRecordsRequest with domain ID - - Returns: - APIResponse with domain DNS records - """ - response = await self.client.request( - method="GET", path=f"domains/{request.domain_id}/dns-records" - ) - return self._create_response(response) - - async def get_domain_verification_status( - self, request: DomainVerificationRequest - ) -> APIResponse: - """ - Retrieve verification status for a domain. - - Args: - request: DomainVerificationRequest with domain ID - - Returns: - APIResponse with domain verification status - """ - response = await self.client.request( - method="GET", path=f"domains/{request.domain_id}/verify" - ) - return self._create_response(response) +AsyncDomains = Domains diff --git a/mailersend/resources/email.py b/mailersend/resources/email.py index bd3a11c..949c614 100644 --- a/mailersend/resources/email.py +++ b/mailersend/resources/email.py @@ -2,7 +2,7 @@ from typing import List -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.email import EmailRequest from ..models.base import APIResponse @@ -30,12 +30,12 @@ def send(self, email: EmailRequest) -> APIResponse: self.logger.debug("Sending email request to MailerSend API") self.logger.debug("Payload: %s", payload) - response = self.client.request(method="POST", path="email", body=payload) - - # Create custom data with email ID from headers - email_data = {"id": response.headers.get("x-message-id")} - - return self._create_response(response, email_data) + return self._request( + method="POST", + path="email", + body=payload, + data=lambda r: {"id": r.headers.get("x-message-id")}, + ) def send_bulk(self, emails: List[EmailRequest]) -> APIResponse: """ @@ -58,9 +58,7 @@ def send_bulk(self, emails: List[EmailRequest]) -> APIResponse: self.logger.debug("Sending bulk email request to MailerSend API") self.logger.debug("Payload: %s", payload) - response = self.client.request(method="POST", path="bulk-email", body=payload) - - return self._create_response(response) + return self._request(method="POST", path="bulk-email", body=payload) def get_bulk_status(self, bulk_email_id: str) -> APIResponse: """ @@ -74,61 +72,7 @@ def get_bulk_status(self, bulk_email_id: str) -> APIResponse: """ self.logger.debug("Getting bulk email status") - response = self.client.request(method="GET", path=f"bulk-email/{bulk_email_id}") - - return self._create_response(response) - - -class AsyncEmail(AsyncBaseResource): - """Async client for interacting with the MailerSend Email API.""" - - async def send(self, email: EmailRequest) -> APIResponse: - """ - Send a single email. - - Args: - email: A fully-validated EmailRequest object + return self._request(method="GET", path=f"bulk-email/{bulk_email_id}") - Returns: - APIResponse with email ID and metadata - """ - self.logger.debug("Preparing to send email") - payload = email.model_dump(by_alias=True, exclude_none=True) - self.logger.debug("Sending email request to MailerSend API") - response = await self.client.request(method="POST", path="email", body=payload) - email_data = {"id": response.headers.get("x-message-id")} - return self._create_response(response, email_data) - - async def send_bulk(self, emails: List[EmailRequest]) -> APIResponse: - """ - Send multiple emails in one request. - Args: - emails: List of EmailRequest objects to send - - Returns: - APIResponse with bulk email information and metadata - """ - self.logger.debug("Preparing to send emails in bulk") - payload = [e.model_dump(by_alias=True, exclude_none=True) for e in emails] - self.logger.debug("Sending bulk email request to MailerSend API") - response = await self.client.request( - method="POST", path="bulk-email", body=payload - ) - return self._create_response(response) - - async def get_bulk_status(self, bulk_email_id: str) -> APIResponse: - """ - Get the status of a bulk email send request. - - Args: - bulk_email_id: The ID of the bulk email request - - Returns: - APIResponse with bulk email status and metadata - """ - self.logger.debug("Getting bulk email status") - response = await self.client.request( - method="GET", path=f"bulk-email/{bulk_email_id}" - ) - return self._create_response(response) +AsyncEmail = Email diff --git a/mailersend/resources/email_verification.py b/mailersend/resources/email_verification.py index 2a2b5ca..28f9585 100644 --- a/mailersend/resources/email_verification.py +++ b/mailersend/resources/email_verification.py @@ -1,6 +1,6 @@ """Email Verification resource""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.base import APIResponse from ..models.email_verification import ( EmailVerifyRequest, @@ -12,7 +12,6 @@ EmailVerificationVerifyRequest, EmailVerificationResultsRequest, ) -from ..exceptions import ValidationError class EmailVerification(BaseResource): @@ -35,13 +34,10 @@ def verify_email(self, request: EmailVerifyRequest) -> APIResponse: self.logger.debug("Verifying email address: %s", body) # Make API call - response = self.client.request( + return self._request( method="POST", path="email-verification/verify", body=body ) - # Create standardized response - return self._create_response(response) - def verify_email_async(self, request: EmailVerifyAsyncRequest) -> APIResponse: """Verify a single email address (asynchronous). @@ -60,13 +56,10 @@ def verify_email_async(self, request: EmailVerifyAsyncRequest) -> APIResponse: self.logger.debug("Starting async verification for email: %s", body) # Make API call - response = self.client.request( + return self._request( method="POST", path="email-verification/verify-async", body=body ) - # Create standardized response - return self._create_response(response) - def get_async_status( self, request: EmailVerificationAsyncStatusRequest ) -> APIResponse: @@ -87,14 +80,11 @@ def get_async_status( ) # Make API call - response = self.client.request( + return self._request( method="GET", path=f"email-verification/verify-async/{request.email_verification_id}", ) - # Create standardized response - return self._create_response(response) - def list_verifications(self, request: EmailVerificationListsRequest) -> APIResponse: """List all email verification lists. @@ -112,13 +102,10 @@ def list_verifications(self, request: EmailVerificationListsRequest) -> APIRespo self.logger.debug("Listing email verification lists with params: %s", params) # Make API call - response = self.client.request( + return self._request( method="GET", path="email-verification", params=params ) - # Create standardized response - return self._create_response(response) - def get_verification(self, request: EmailVerificationGetRequest) -> APIResponse: """Get a single email verification list. @@ -136,13 +123,10 @@ def get_verification(self, request: EmailVerificationGetRequest) -> APIResponse: ) # Make API call - response = self.client.request( + return self._request( method="GET", path=f"email-verification/{request.email_verification_id}" ) - # Create standardized response - return self._create_response(response) - def create_verification( self, request: EmailVerificationCreateRequest ) -> APIResponse: @@ -166,13 +150,10 @@ def create_verification( ) # Make API call - response = self.client.request( + return self._request( method="POST", path="email-verification", body=body ) - # Create standardized response - return self._create_response(response) - def verify_list(self, request: EmailVerificationVerifyRequest) -> APIResponse: """Start verification of an email verification list. @@ -188,14 +169,11 @@ def verify_list(self, request: EmailVerificationVerifyRequest) -> APIResponse: ) # Make API call - response = self.client.request( + return self._request( method="GET", path=f"email-verification/{request.email_verification_id}/verify", ) - # Create standardized response - return self._create_response(response) - def get_results(self, request: EmailVerificationResultsRequest) -> APIResponse: """Get verification results for an email verification list. @@ -217,146 +195,11 @@ def get_results(self, request: EmailVerificationResultsRequest) -> APIResponse: ) # Make API call - response = self.client.request( + return self._request( method="GET", path=f"email-verification/{request.email_verification_id}/results", params=params, ) - # Create standardized response - return self._create_response(response) - - -class AsyncEmailVerification(AsyncBaseResource): - """Async resource for managing email verification.""" - - async def verify_email(self, request: EmailVerifyRequest) -> APIResponse: - """Verify a single email address (synchronous). - - Args: - request: The email verification request data. - - Returns: - APIResponse with verification result - """ - body = request.model_dump(exclude_none=True) - response = await self.client.request( - method="POST", path="email-verification/verify", body=body - ) - return self._create_response(response) - - async def verify_email_async(self, request: EmailVerifyAsyncRequest) -> APIResponse: - """Verify a single email address (asynchronous). - - Args: - request: The async email verification request data. - - Returns: - APIResponse with verification result - """ - body = request.model_dump(exclude_none=True) - response = await self.client.request( - method="POST", path="email-verification/verify-async", body=body - ) - return self._create_response(response) - - async def get_async_status( - self, request: EmailVerificationAsyncStatusRequest - ) -> APIResponse: - """Get the status of an async email verification. - - Args: - request: The async status request data. - - Returns: - APIResponse with EmailVerificationAsyncStatusResponse data - """ - response = await self.client.request( - method="GET", - path=f"email-verification/verify-async/{request.email_verification_id}", - ) - return self._create_response(response) - - async def list_verifications( - self, request: EmailVerificationListsRequest - ) -> APIResponse: - """List all email verification lists. - - Args: - request: The list request data with pagination options. - - Returns: - APIResponse with list of email verification lists - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="email-verification", params=params - ) - return self._create_response(response) - - async def get_verification( - self, request: EmailVerificationGetRequest - ) -> APIResponse: - """Get a single email verification list. - - Args: - request: The get verification request data. - - Returns: - APIResponse with email verification list data - """ - response = await self.client.request( - method="GET", path=f"email-verification/{request.email_verification_id}" - ) - return self._create_response(response) - - async def create_verification( - self, request: EmailVerificationCreateRequest - ) -> APIResponse: - """Create a new email verification list. - - Args: - request: The create verification request data. - - Returns: - APIResponse with email verification list data - """ - body = request.model_dump(exclude_none=True) - response = await self.client.request( - method="POST", path="email-verification", body=body - ) - return self._create_response(response) - - async def verify_list(self, request: EmailVerificationVerifyRequest) -> APIResponse: - """Start verification of an email verification list. - - Args: - request: The verify list request data. - - Returns: - APIResponse with verification result - """ - response = await self.client.request( - method="GET", - path=f"email-verification/{request.email_verification_id}/verify", - ) - return self._create_response(response) - - async def get_results( - self, request: EmailVerificationResultsRequest - ) -> APIResponse: - """Get verification results for an email verification list. - Args: - request: The results request data with optional filters. - - Returns: - APIResponse with verification results - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", - path=f"email-verification/{request.email_verification_id}/results", - params=params, - ) - return self._create_response(response) +AsyncEmailVerification = EmailVerification diff --git a/mailersend/resources/identities.py b/mailersend/resources/identities.py index 0a28f9a..cc7c2eb 100644 --- a/mailersend/resources/identities.py +++ b/mailersend/resources/identities.py @@ -11,7 +11,7 @@ IdentityDeleteByEmailRequest, ) from ..models.base import APIResponse -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource class IdentitiesResource(BaseResource): @@ -37,12 +37,10 @@ def list_identities(self, request: IdentityListRequest) -> APIResponse: ) # Make API request - response = self.client.request( + return self._request( method="GET", path="identities", params=params if params else None ) - return self._create_response(response) - def create_identity(self, request: IdentityCreateRequest) -> APIResponse: """ Create a new sender identity. @@ -64,9 +62,7 @@ def create_identity(self, request: IdentityCreateRequest) -> APIResponse: ) # Make API request - response = self.client.request(method="POST", path="identities", body=data) - - return self._create_response(response) + return self._request(method="POST", path="identities", body=data) def get_identity(self, request: IdentityGetRequest) -> APIResponse: """ @@ -81,12 +77,10 @@ def get_identity(self, request: IdentityGetRequest) -> APIResponse: self.logger.debug("Preparing to get identity with ID: %s", request.identity_id) # Make API request - response = self.client.request( + return self._request( method="GET", path=f"identities/{request.identity_id}" ) - return self._create_response(response) - def get_identity_by_email(self, request: IdentityGetByEmailRequest) -> APIResponse: """ Get a single sender identity by email. @@ -100,12 +94,10 @@ def get_identity_by_email(self, request: IdentityGetByEmailRequest) -> APIRespon self.logger.debug("Preparing to get identity by email: %s", request.email) # Make API request - response = self.client.request( + return self._request( method="GET", path=f"identities/email/{request.email}" ) - return self._create_response(response) - def update_identity(self, request: IdentityUpdateRequest) -> APIResponse: """ Update a sender identity by ID. @@ -131,14 +123,12 @@ def update_identity(self, request: IdentityUpdateRequest) -> APIResponse: ) # Make API request - response = self.client.request( + return self._request( method="PUT", path=f"identities/{request.identity_id}", body=data if data else None, ) - return self._create_response(response) - def update_identity_by_email( self, request: IdentityUpdateByEmailRequest ) -> APIResponse: @@ -162,14 +152,12 @@ def update_identity_by_email( ) # Make API request - response = self.client.request( + return self._request( method="PUT", path=f"identities/email/{request.email}", body=data if data else None, ) - return self._create_response(response) - def delete_identity(self, request: IdentityDeleteRequest) -> APIResponse: """ Delete a sender identity by ID. @@ -185,12 +173,10 @@ def delete_identity(self, request: IdentityDeleteRequest) -> APIResponse: ) # Make API request - response = self.client.request( + return self._request( method="DELETE", path=f"identities/{request.identity_id}" ) - return self._create_response(response) - def delete_identity_by_email( self, request: IdentityDeleteByEmailRequest ) -> APIResponse: @@ -206,148 +192,9 @@ def delete_identity_by_email( self.logger.debug("Preparing to delete identity by email: %s", request.email) # Make API request - response = self.client.request( + return self._request( method="DELETE", path=f"identities/email/{request.email}" ) - return self._create_response(response) - - -class AsyncIdentitiesResource(AsyncBaseResource): - """Async resource for managing sender identities.""" - - async def list_identities(self, request: IdentityListRequest) -> APIResponse: - """ - Get a list of sender identities. - - Args: - request: The identity list request containing filtering and pagination parameters - - Returns: - APIResponse containing the identities list response - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="identities", params=params if params else None - ) - return self._create_response(response) - - async def create_identity(self, request: IdentityCreateRequest) -> APIResponse: - """ - Create a new sender identity. - - Args: - request: The identity creation request with all required data - - Returns: - APIResponse containing the created identity response - """ - data = request.model_dump(by_alias=True, exclude_none=True) - response = await self.client.request( - method="POST", path="identities", body=data - ) - return self._create_response(response) - - async def get_identity(self, request: IdentityGetRequest) -> APIResponse: - """ - Get a single sender identity by ID. - - Args: - request: The identity get request with identity ID - - Returns: - APIResponse containing the identity data - """ - response = await self.client.request( - method="GET", path=f"identities/{request.identity_id}" - ) - return self._create_response(response) - - async def get_identity_by_email( - self, request: IdentityGetByEmailRequest - ) -> APIResponse: - """ - Get a single sender identity by email. - - Args: - request: The identity get by email request - - Returns: - APIResponse containing the identity data - """ - response = await self.client.request( - method="GET", path=f"identities/email/{request.email}" - ) - return self._create_response(response) - - async def update_identity(self, request: IdentityUpdateRequest) -> APIResponse: - """ - Update a sender identity by ID. - - Args: - request: The identity update request with identity ID and update data - - Returns: - APIResponse containing the updated identity - """ - data = request.model_dump( - by_alias=True, exclude_none=True, exclude={"identity_id"} - ) - response = await self.client.request( - method="PUT", - path=f"identities/{request.identity_id}", - body=data if data else None, - ) - return self._create_response(response) - - async def update_identity_by_email( - self, request: IdentityUpdateByEmailRequest - ) -> APIResponse: - """ - Update a sender identity by email. - Args: - request: The identity update by email request - - Returns: - APIResponse containing the updated identity - """ - data = request.model_dump(by_alias=True, exclude_none=True, exclude={"email"}) - response = await self.client.request( - method="PUT", - path=f"identities/email/{request.email}", - body=data if data else None, - ) - return self._create_response(response) - - async def delete_identity(self, request: IdentityDeleteRequest) -> APIResponse: - """ - Delete a sender identity by ID. - - Args: - request: The identity delete request with identity ID - - Returns: - APIResponse containing the deletion result - """ - response = await self.client.request( - method="DELETE", path=f"identities/{request.identity_id}" - ) - return self._create_response(response) - - async def delete_identity_by_email( - self, request: IdentityDeleteByEmailRequest - ) -> APIResponse: - """ - Delete a sender identity by email. - - Args: - request: The identity delete by email request - - Returns: - APIResponse containing the deletion result - """ - response = await self.client.request( - method="DELETE", path=f"identities/email/{request.email}" - ) - return self._create_response(response) +AsyncIdentitiesResource = IdentitiesResource diff --git a/mailersend/resources/inbound.py b/mailersend/resources/inbound.py index c0d94cd..5e6f4fb 100644 --- a/mailersend/resources/inbound.py +++ b/mailersend/resources/inbound.py @@ -8,7 +8,7 @@ InboundDeleteRequest, ) from mailersend.models.base import APIResponse -from mailersend.resources.base import AsyncBaseResource, BaseResource +from mailersend.resources.base import BaseResource class InboundResource(BaseResource): @@ -34,12 +34,10 @@ def list(self, request: InboundListRequest) -> APIResponse: ) # Make API request - response = self.client.request( + return self._request( method="GET", path="inbound", params=params if params else None ) - return self._create_response(response) - def get(self, request: InboundGetRequest) -> APIResponse: """ Get a single inbound route by ID. @@ -55,11 +53,7 @@ def get(self, request: InboundGetRequest) -> APIResponse: ) # Make API request - response = self.client.request( - method="GET", path=f"inbound/{request.inbound_id}" - ) - - return self._create_response(response) + return self._request(method="GET", path=f"inbound/{request.inbound_id}") def create(self, request: InboundCreateRequest) -> APIResponse: """ @@ -82,9 +76,7 @@ def create(self, request: InboundCreateRequest) -> APIResponse: ) # Make API request - response = self.client.request(method="POST", path="inbound", body=data) - - return self._create_response(response) + return self._request(method="POST", path="inbound", body=data) def update(self, request: InboundUpdateRequest) -> APIResponse: """ @@ -109,12 +101,10 @@ def update(self, request: InboundUpdateRequest) -> APIResponse: ) # Make API request - response = self.client.request( + return self._request( method="PUT", path=f"inbound/{request.inbound_id}", body=data ) - return self._create_response(response) - def delete(self, request: InboundDeleteRequest) -> APIResponse: """ Delete an inbound route. @@ -130,88 +120,7 @@ def delete(self, request: InboundDeleteRequest) -> APIResponse: ) # Make API request - response = self.client.request( - method="DELETE", path=f"inbound/{request.inbound_id}" - ) - - return self._create_response(response) - - -class AsyncInboundResource(AsyncBaseResource): - """Async resource for managing inbound routes.""" - - async def list(self, request: InboundListRequest) -> APIResponse: - """ - Get a list of inbound routes. - - Args: - request: The inbound list request containing filtering and pagination parameters - - Returns: - APIResponse containing the inbound routes list response - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="inbound", params=params if params else None - ) - return self._create_response(response) - - async def get(self, request: InboundGetRequest) -> APIResponse: - """ - Get a single inbound route by ID. - - Args: - request: The inbound get request with inbound ID - - Returns: - APIResponse containing the inbound route data - """ - response = await self.client.request( - method="GET", path=f"inbound/{request.inbound_id}" - ) - return self._create_response(response) + return self._request(method="DELETE", path=f"inbound/{request.inbound_id}") - async def create(self, request: InboundCreateRequest) -> APIResponse: - """ - Create a new inbound route. - - Args: - request: The inbound create request with all required data - Returns: - APIResponse containing the created inbound route response - """ - data = request.to_request_body() - response = await self.client.request(method="POST", path="inbound", body=data) - return self._create_response(response) - - async def update(self, request: InboundUpdateRequest) -> APIResponse: - """ - Update an existing inbound route. - - Args: - request: The inbound update request with inbound ID and update data - - Returns: - APIResponse containing the updated response - """ - data = request.to_request_body() - response = await self.client.request( - method="PUT", path=f"inbound/{request.inbound_id}", body=data - ) - return self._create_response(response) - - async def delete(self, request: InboundDeleteRequest) -> APIResponse: - """ - Delete an inbound route. - - Args: - request: The inbound delete request with inbound ID - - Returns: - APIResponse containing the deletion result - """ - response = await self.client.request( - method="DELETE", path=f"inbound/{request.inbound_id}" - ) - return self._create_response(response) +AsyncInboundResource = InboundResource diff --git a/mailersend/resources/messages.py b/mailersend/resources/messages.py index b69aab3..a790ad2 100644 --- a/mailersend/resources/messages.py +++ b/mailersend/resources/messages.py @@ -1,6 +1,6 @@ """Messages resource""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.messages import ( MessagesListRequest, MessageGetRequest, @@ -33,12 +33,10 @@ def list_messages(self, request: MessagesListRequest) -> APIResponse: self.logger.debug("Making API request to list messages with params: %s", params) # Make API request - response = self.client.request( + return self._request( method="GET", path="messages", params=params if params else None ) - return self._create_response(response) - def get_message(self, request: MessageGetRequest) -> APIResponse: """ Retrieve information about a single message. @@ -52,43 +50,7 @@ def get_message(self, request: MessageGetRequest) -> APIResponse: self.logger.debug("Preparing to get message with ID: %s", request.message_id) # Make API request - response = self.client.request( - method="GET", path=f"messages/{request.message_id}" - ) - - return self._create_response(response) - - -class AsyncMessages(AsyncBaseResource): - """Async client for interacting with the MailerSend Messages API.""" - - async def list_messages(self, request: MessagesListRequest) -> APIResponse: - """ - Retrieve a list of messages. + return self._request(method="GET", path=f"messages/{request.message_id}") - Args: - request: MessagesListRequest with pagination options - Returns: - APIResponse containing the messages list response - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="messages", params=params if params else None - ) - return self._create_response(response) - - async def get_message(self, request: MessageGetRequest) -> APIResponse: - """ - Retrieve information about a single message. - - Args: - request: MessageGetRequest with message ID - - Returns: - APIResponse containing the message response - """ - response = await self.client.request( - method="GET", path=f"messages/{request.message_id}" - ) - return self._create_response(response) +AsyncMessages = Messages diff --git a/mailersend/resources/other.py b/mailersend/resources/other.py index 587d8fd..31bcc41 100644 --- a/mailersend/resources/other.py +++ b/mailersend/resources/other.py @@ -1,6 +1,6 @@ """Other endpoints resource""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.base import APIResponse @@ -20,20 +20,7 @@ def get_quota(self) -> APIResponse: """ self.logger.debug("Retrieving API quota information") - response = self.client.request(method="GET", path="api-quota") + return self._request(method="GET", path="api-quota") - return self._create_response(response) - -class AsyncOther(AsyncBaseResource): - """Async client for other MailerSend API endpoints.""" - - async def get_quota(self) -> APIResponse: - """ - Get API quota information. - - Returns: - APIResponse with quota information including remaining requests - """ - response = await self.client.request(method="GET", path="api-quota") - return self._create_response(response) +AsyncOther = Other diff --git a/mailersend/resources/recipients.py b/mailersend/resources/recipients.py index f0d6a38..e122165 100644 --- a/mailersend/resources/recipients.py +++ b/mailersend/resources/recipients.py @@ -13,7 +13,7 @@ RecipientsListQueryParams, SuppressionListQueryParams, ) -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource class Recipients(BaseResource): @@ -31,7 +31,6 @@ def list_recipients( Returns: APIResponse with recipients list """ - # Use default request if none provided if request is None: query_params = RecipientsListQueryParams() @@ -43,9 +42,7 @@ def list_recipients( self.logger.debug("Listing recipients with params: %s", params) # Make API call - response = self.client.request(method="GET", path="recipients", params=params) - - return self._create_response(response) + return self._request(method="GET", path="recipients", params=params) def get_recipient(self, request: RecipientGetRequest) -> APIResponse: """ @@ -57,12 +54,10 @@ def get_recipient(self, request: RecipientGetRequest) -> APIResponse: self.logger.debug("Getting recipient: %s", request.recipient_id) # Make API call - response = self.client.request( + return self._request( method="GET", path=f"recipients/{request.recipient_id}" ) - return self._create_response(response) - def delete_recipient(self, request: RecipientDeleteRequest) -> APIResponse: """ Delete a recipient. @@ -76,12 +71,10 @@ def delete_recipient(self, request: RecipientDeleteRequest) -> APIResponse: self.logger.debug("Deleting recipient: %s", request.recipient_id) # Make API call - response = self.client.request( + return self._request( method="DELETE", path=f"recipients/{request.recipient_id}" ) - return self._create_response(response) - def list_blocklist( self, request: Optional[SuppressionListRequest] = None ) -> APIResponse: @@ -105,12 +98,10 @@ def list_blocklist( self.logger.debug("Listing blocklist with params: %s", params) # Make API call - response = self.client.request( + return self._request( method="GET", path="suppressions/blocklist", params=params ) - return self._create_response(response) - def list_hard_bounces( self, request: Optional[SuppressionListRequest] = None ) -> APIResponse: @@ -134,12 +125,10 @@ def list_hard_bounces( self.logger.debug("Listing hard bounces with params: %s", params) # Make API call - response = self.client.request( + return self._request( method="GET", path="suppressions/hard-bounces", params=params ) - return self._create_response(response) - def list_spam_complaints( self, request: Optional[SuppressionListRequest] = None ) -> APIResponse: @@ -163,12 +152,10 @@ def list_spam_complaints( self.logger.debug("Listing spam complaints with params: %s", params) # Make API call - response = self.client.request( + return self._request( method="GET", path="suppressions/spam-complaints", params=params ) - return self._create_response(response) - def list_unsubscribes( self, request: Optional[SuppressionListRequest] = None ) -> APIResponse: @@ -192,12 +179,10 @@ def list_unsubscribes( self.logger.debug("Listing unsubscribes with params: %s", params) # Make API call - response = self.client.request( + return self._request( method="GET", path="suppressions/unsubscribes", params=params ) - return self._create_response(response) - def list_on_hold( self, request: Optional[SuppressionListRequest] = None ) -> APIResponse: @@ -221,12 +206,10 @@ def list_on_hold( self.logger.debug("Listing on-hold entries with params: %s", params) # Make API call - response = self.client.request( + return self._request( method="GET", path="suppressions/on-hold-list", params=params ) - return self._create_response(response) - def add_to_blocklist(self, request: SuppressionAddRequest) -> APIResponse: """ Add entries to blocklist. @@ -242,11 +225,7 @@ def add_to_blocklist(self, request: SuppressionAddRequest) -> APIResponse: self.logger.debug("Adding to blocklist with body: %s", body) # Make API call - response = self.client.request( - method="POST", path="suppressions/blocklist", body=body - ) - - return self._create_response(response) + return self._request(method="POST", path="suppressions/blocklist", body=body) def add_hard_bounces(self, request: SuppressionAddRequest) -> APIResponse: """ @@ -264,12 +243,10 @@ def add_hard_bounces(self, request: SuppressionAddRequest) -> APIResponse: self.logger.debug("Adding hard bounces with body: %s", body) # Make API call - response = self.client.request( + return self._request( method="POST", path="suppressions/hard-bounces", body=body ) - return self._create_response(response) - def add_spam_complaints(self, request: SuppressionAddRequest) -> APIResponse: """ Add spam complaints. @@ -287,12 +264,10 @@ def add_spam_complaints(self, request: SuppressionAddRequest) -> APIResponse: self.logger.debug("Adding spam complaints with body: %s", body) # Make API call - response = self.client.request( + return self._request( method="POST", path="suppressions/spam-complaints", body=body ) - return self._create_response(response) - def add_unsubscribes(self, request: SuppressionAddRequest) -> APIResponse: """ Add unsubscribes. @@ -309,12 +284,10 @@ def add_unsubscribes(self, request: SuppressionAddRequest) -> APIResponse: self.logger.debug("Adding unsubscribes with body: %s", body) # Make API call - response = self.client.request( + return self._request( method="POST", path="suppressions/unsubscribes", body=body ) - return self._create_response(response) - def delete_from_blocklist(self, request: SuppressionDeleteRequest) -> APIResponse: """ Delete entries from blocklist. @@ -331,12 +304,10 @@ def delete_from_blocklist(self, request: SuppressionDeleteRequest) -> APIRespons self.logger.debug("Deleting from blocklist with body: %s", body) # Make API call - response = self.client.request( + return self._request( method="DELETE", path="suppressions/blocklist", body=body ) - return self._create_response(response) - def delete_hard_bounces(self, request: SuppressionDeleteRequest) -> APIResponse: """ Delete hard bounces. @@ -353,12 +324,10 @@ def delete_hard_bounces(self, request: SuppressionDeleteRequest) -> APIResponse: self.logger.debug("Deleting hard bounces with body: %s", body) # Make API call - response = self.client.request( + return self._request( method="DELETE", path="suppressions/hard-bounces", body=body ) - return self._create_response(response) - def delete_spam_complaints(self, request: SuppressionDeleteRequest) -> APIResponse: """ Delete spam complaints. @@ -376,12 +345,10 @@ def delete_spam_complaints(self, request: SuppressionDeleteRequest) -> APIRespon self.logger.debug("Deleting spam complaints with body: %s", body) # Make API call - response = self.client.request( + return self._request( method="DELETE", path="suppressions/spam-complaints", body=body ) - return self._create_response(response) - def delete_unsubscribes(self, request: SuppressionDeleteRequest) -> APIResponse: """ Delete unsubscribes. @@ -398,12 +365,10 @@ def delete_unsubscribes(self, request: SuppressionDeleteRequest) -> APIResponse: self.logger.debug("Deleting unsubscribes with body: %s", body) # Make API call - response = self.client.request( + return self._request( method="DELETE", path="suppressions/unsubscribes", body=body ) - return self._create_response(response) - def delete_from_on_hold(self, request: SuppressionDeleteRequest) -> APIResponse: """ Delete entries from on-hold list. @@ -420,316 +385,9 @@ def delete_from_on_hold(self, request: SuppressionDeleteRequest) -> APIResponse: self.logger.debug("Deleting from on-hold with body: %s", body) # Make API call - response = self.client.request( + return self._request( method="DELETE", path="suppressions/on-hold-list", body=body ) - return self._create_response(response) - - -class AsyncRecipients(AsyncBaseResource): - """Async Recipients API resource.""" - - async def list_recipients( - self, request: Optional[RecipientsListRequest] = None - ) -> APIResponse: - """ - List recipients with optional filtering. - - Args: - request: Request parameters for listing recipients (optional) - - Returns: - APIResponse with recipients list - """ - if request is None: - request = RecipientsListRequest(query_params=RecipientsListQueryParams()) - params = request.to_query_params() - response = await self.client.request( - method="GET", path="recipients", params=params - ) - return self._create_response(response) - - async def get_recipient(self, request: RecipientGetRequest) -> APIResponse: - """ - Get a single recipient by ID. - - Args: - request: Request parameters for getting recipient - - Returns: - APIResponse with recipient data - """ - response = await self.client.request( - method="GET", path=f"recipients/{request.recipient_id}" - ) - return self._create_response(response) - - async def delete_recipient(self, request: RecipientDeleteRequest) -> APIResponse: - """ - Delete a recipient. - - Args: - request: Request parameters for deleting recipient - - Returns: - APIResponse with empty data - """ - response = await self.client.request( - method="DELETE", path=f"recipients/{request.recipient_id}" - ) - return self._create_response(response) - - async def list_blocklist( - self, request: Optional[SuppressionListRequest] = None - ) -> APIResponse: - """ - List blocklist entries. - - Args: - request: Request parameters for listing blocklist entries (optional) - - Returns: - APIResponse with blocklist entries - """ - if request is None: - request = SuppressionListRequest(query_params=SuppressionListQueryParams()) - params = request.to_query_params() - response = await self.client.request( - method="GET", path="suppressions/blocklist", params=params - ) - return self._create_response(response) - - async def list_hard_bounces( - self, request: Optional[SuppressionListRequest] = None - ) -> APIResponse: - """ - List hard bounces. - - Args: - request: Request parameters for listing hard bounces (optional) - - Returns: - APIResponse with hard bounces - """ - if request is None: - request = SuppressionListRequest(query_params=SuppressionListQueryParams()) - params = request.to_query_params() - response = await self.client.request( - method="GET", path="suppressions/hard-bounces", params=params - ) - return self._create_response(response) - - async def list_spam_complaints( - self, request: Optional[SuppressionListRequest] = None - ) -> APIResponse: - """ - List spam complaints. - - Args: - request: Request parameters for listing spam complaints (optional) - - Returns: - APIResponse with spam complaints - """ - if request is None: - request = SuppressionListRequest(query_params=SuppressionListQueryParams()) - params = request.to_query_params() - response = await self.client.request( - method="GET", path="suppressions/spam-complaints", params=params - ) - return self._create_response(response) - - async def list_unsubscribes( - self, request: Optional[SuppressionListRequest] = None - ) -> APIResponse: - """ - List unsubscribes. - - Args: - request: Request parameters for listing unsubscribes (optional) - - Returns: - APIResponse with unsubscribes - """ - if request is None: - request = SuppressionListRequest(query_params=SuppressionListQueryParams()) - params = request.to_query_params() - response = await self.client.request( - method="GET", path="suppressions/unsubscribes", params=params - ) - return self._create_response(response) - - async def list_on_hold( - self, request: Optional[SuppressionListRequest] = None - ) -> APIResponse: - """ - List on-hold entries. - - Args: - request: Request parameters for listing on-hold entries (optional) - - Returns: - APIResponse with on-hold entries - """ - if request is None: - request = SuppressionListRequest(query_params=SuppressionListQueryParams()) - params = request.to_query_params() - response = await self.client.request( - method="GET", path="suppressions/on-hold-list", params=params - ) - return self._create_response(response) - - async def add_to_blocklist(self, request: SuppressionAddRequest) -> APIResponse: - """ - Add entries to blocklist. - - Args: - request: Request parameters for adding to blocklist - Returns: - APIResponse with added entries - """ - body = request.model_dump(by_alias=True, exclude_none=True) - response = await self.client.request( - method="POST", path="suppressions/blocklist", body=body - ) - return self._create_response(response) - - async def add_hard_bounces(self, request: SuppressionAddRequest) -> APIResponse: - """ - Add hard bounces. - - Args: - request: Request parameters for adding hard bounces - - Returns: - APIResponse with added entries - """ - body = request.model_dump(by_alias=True, exclude_none=True) - response = await self.client.request( - method="POST", path="suppressions/hard-bounces", body=body - ) - return self._create_response(response) - - async def add_spam_complaints(self, request: SuppressionAddRequest) -> APIResponse: - """ - Add spam complaints. - - Args: - request: Request parameters for adding spam complaints - - Returns: - APIResponse with added entries - """ - body = request.model_dump(by_alias=True, exclude_none=True) - response = await self.client.request( - method="POST", path="suppressions/spam-complaints", body=body - ) - return self._create_response(response) - - async def add_unsubscribes(self, request: SuppressionAddRequest) -> APIResponse: - """ - Add unsubscribes. - - Args: - request: Request parameters for adding unsubscribes - - Returns: - APIResponse with added entries - """ - body = request.model_dump(by_alias=True, exclude_none=True) - response = await self.client.request( - method="POST", path="suppressions/unsubscribes", body=body - ) - return self._create_response(response) - - async def delete_from_blocklist( - self, request: SuppressionDeleteRequest - ) -> APIResponse: - """ - Delete entries from blocklist. - - Args: - request: Request parameters for deleting from blocklist - - Returns: - APIResponse with deleted entries - """ - body = request.model_dump(by_alias=True, exclude_none=True) - response = await self.client.request( - method="DELETE", path="suppressions/blocklist", body=body - ) - return self._create_response(response) - - async def delete_hard_bounces( - self, request: SuppressionDeleteRequest - ) -> APIResponse: - """ - Delete hard bounces. - - Args: - request: Request parameters for deleting hard bounces - - Returns: - APIResponse with deleted entries - """ - body = request.model_dump(exclude_none=True, exclude={"domain_id"}) - response = await self.client.request( - method="DELETE", path="suppressions/hard-bounces", body=body - ) - return self._create_response(response) - - async def delete_spam_complaints( - self, request: SuppressionDeleteRequest - ) -> APIResponse: - """ - Delete spam complaints. - - Args: - request: Request parameters for deleting spam complaints - - Returns: - APIResponse with deleted entries - """ - body = request.model_dump(exclude_none=True, exclude={"domain_id"}) - response = await self.client.request( - method="DELETE", path="suppressions/spam-complaints", body=body - ) - return self._create_response(response) - - async def delete_unsubscribes( - self, request: SuppressionDeleteRequest - ) -> APIResponse: - """ - Delete unsubscribes. - - Args: - request: Request parameters for deleting unsubscribes - - Returns: - APIResponse with deleted entries - """ - body = request.model_dump(exclude_none=True, exclude={"domain_id"}) - response = await self.client.request( - method="DELETE", path="suppressions/unsubscribes", body=body - ) - return self._create_response(response) - - async def delete_from_on_hold( - self, request: SuppressionDeleteRequest - ) -> APIResponse: - """ - Delete entries from on-hold list. - - Args: - request: Request parameters for deleting from on-hold - - Returns: - APIResponse with deleted entries - """ - body = request.model_dump(exclude_none=True, exclude={"domain_id"}) - response = await self.client.request( - method="DELETE", path="suppressions/on-hold-list", body=body - ) - return self._create_response(response) +AsyncRecipients = Recipients diff --git a/mailersend/resources/schedules.py b/mailersend/resources/schedules.py index 90815e6..8dd0544 100644 --- a/mailersend/resources/schedules.py +++ b/mailersend/resources/schedules.py @@ -1,6 +1,6 @@ """Schedules resource""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.schedules import ( SchedulesListRequest, ScheduleGetRequest, @@ -36,14 +36,12 @@ def list_schedules(self, request: SchedulesListRequest) -> APIResponse: ) # Make API request - response = self.client.request( + return self._request( method="GET", path="message-schedules", params=params if params else None, ) - return self._create_response(response) - def get_schedule(self, request: ScheduleGetRequest) -> APIResponse: """ Retrieve information about a single scheduled message. @@ -59,12 +57,10 @@ def get_schedule(self, request: ScheduleGetRequest) -> APIResponse: ) # Make API request - response = self.client.request( + return self._request( method="GET", path=f"message-schedules/{request.message_id}" ) - return self._create_response(response) - def delete_schedule(self, request: ScheduleDeleteRequest) -> APIResponse: """ Delete a scheduled message. @@ -80,58 +76,9 @@ def delete_schedule(self, request: ScheduleDeleteRequest) -> APIResponse: ) # Make API request - response = self.client.request( + return self._request( method="DELETE", path=f"message-schedules/{request.message_id}" ) - return self._create_response(response) - - -class AsyncSchedules(AsyncBaseResource): - """Async client for interacting with the MailerSend Schedules API.""" - - async def list_schedules(self, request: SchedulesListRequest) -> APIResponse: - """ - Retrieve a list of scheduled messages. - - Args: - request: SchedulesListRequest with filtering and pagination options - - Returns: - APIResponse containing the schedules list response - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="message-schedules", params=params if params else None - ) - return self._create_response(response) - - async def get_schedule(self, request: ScheduleGetRequest) -> APIResponse: - """ - Retrieve information about a single scheduled message. - Args: - request: ScheduleGetRequest with message ID - - Returns: - APIResponse containing the schedule response - """ - response = await self.client.request( - method="GET", path=f"message-schedules/{request.message_id}" - ) - return self._create_response(response) - - async def delete_schedule(self, request: ScheduleDeleteRequest) -> APIResponse: - """ - Delete a scheduled message. - - Args: - request: ScheduleDeleteRequest with message ID to delete - - Returns: - APIResponse (204 No Content on success) - """ - response = await self.client.request( - method="DELETE", path=f"message-schedules/{request.message_id}" - ) - return self._create_response(response) +AsyncSchedules = Schedules diff --git a/mailersend/resources/sms_activity.py b/mailersend/resources/sms_activity.py index cb18980..245b009 100644 --- a/mailersend/resources/sms_activity.py +++ b/mailersend/resources/sms_activity.py @@ -2,7 +2,7 @@ SMS Activity API resource. """ -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.sms_activity import SmsActivityListRequest, SmsMessageGetRequest from ..models.base import APIResponse @@ -31,9 +31,7 @@ def list(self, request: SmsActivityListRequest) -> APIResponse: self.logger.debug("Listing SMS activities with params: %s", params) # Make API request - response = self.client.request(method="GET", path="sms-activity", params=params) - - return self._create_response(response) + return self._request(method="GET", path="sms-activity", params=params) def get(self, request: SmsMessageGetRequest) -> APIResponse: """ @@ -48,43 +46,9 @@ def get(self, request: SmsMessageGetRequest) -> APIResponse: self.logger.debug("Getting SMS message activity: %s", request.sms_message_id) # Make API request - response = self.client.request( + return self._request( method="GET", path=f"sms-messages/{request.sms_message_id}" ) - return self._create_response(response) - - -class AsyncSmsActivity(AsyncBaseResource): - """Async resource for SMS Activity API endpoints.""" - - async def list(self, request: SmsActivityListRequest) -> APIResponse: - """ - Get a list of SMS activities. - - Args: - request: SMS activity list request - - Returns: - API response with SMS activities - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="sms-activity", params=params - ) - return self._create_response(response) - - async def get(self, request: SmsMessageGetRequest) -> APIResponse: - """ - Get activity of a single SMS message. - Args: - request: SMS message get request - - Returns: - API response with SMS message activity - """ - response = await self.client.request( - method="GET", path=f"sms-messages/{request.sms_message_id}" - ) - return self._create_response(response) +AsyncSmsActivity = SmsActivity diff --git a/mailersend/resources/sms_inbounds.py b/mailersend/resources/sms_inbounds.py index 15881d6..b9a3b3a 100644 --- a/mailersend/resources/sms_inbounds.py +++ b/mailersend/resources/sms_inbounds.py @@ -1,6 +1,6 @@ """SMS Inbounds resource.""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.sms_inbounds import ( SmsInboundsListRequest, SmsInboundGetRequest, @@ -27,8 +27,7 @@ def list_sms_inbounds(self, request: SmsInboundsListRequest) -> APIResponse: self.logger.debug("Listing SMS inbounds with filters: %s", params) - response = self.client.request(method="GET", path="sms-inbounds", params=params) - return self._create_response(response) + return self._request(method="GET", path="sms-inbounds", params=params) def get_sms_inbound(self, request: SmsInboundGetRequest) -> APIResponse: """Get a single SMS inbound route. @@ -41,12 +40,10 @@ def get_sms_inbound(self, request: SmsInboundGetRequest) -> APIResponse: """ self.logger.debug("Getting SMS inbound: %s", request.sms_inbound_id) - response = self.client.request( + return self._request( method="GET", path=f"sms-inbounds/{request.sms_inbound_id}" ) - return self._create_response(response) - def create_sms_inbound(self, request: SmsInboundCreateRequest) -> APIResponse: """Create a new SMS inbound route. @@ -62,12 +59,10 @@ def create_sms_inbound(self, request: SmsInboundCreateRequest) -> APIResponse: request.sms_number_id, ) - response = self.client.request( + return self._request( method="POST", path="sms-inbounds", body=request.to_request_body() ) - return self._create_response(response) - def update_sms_inbound(self, request: SmsInboundUpdateRequest) -> APIResponse: """Update an existing SMS inbound route. @@ -79,14 +74,12 @@ def update_sms_inbound(self, request: SmsInboundUpdateRequest) -> APIResponse: """ self.logger.debug("Updating SMS inbound: %s", request.sms_inbound_id) - response = self.client.request( + return self._request( method="PUT", path=f"sms-inbounds/{request.sms_inbound_id}", body=request.to_request_body(), ) - return self._create_response(response) - def delete_sms_inbound(self, request: SmsInboundDeleteRequest) -> APIResponse: """Delete an SMS inbound route. @@ -98,85 +91,9 @@ def delete_sms_inbound(self, request: SmsInboundDeleteRequest) -> APIResponse: """ self.logger.debug("Deleting SMS inbound: %s", request.sms_inbound_id) - response = self.client.request( + return self._request( method="DELETE", path=f"sms-inbounds/{request.sms_inbound_id}" ) - return self._create_response(response) - - -class AsyncSmsInbounds(AsyncBaseResource): - """Async SMS Inbounds resource.""" - - async def list_sms_inbounds(self, request: SmsInboundsListRequest) -> APIResponse: - """List SMS inbound routes. - - Args: - request: SmsInboundsListRequest with query parameters - - Returns: - APIResponse: Response containing list of SMS inbound routes - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="sms-inbounds", params=params - ) - return self._create_response(response) - async def get_sms_inbound(self, request: SmsInboundGetRequest) -> APIResponse: - """Get a single SMS inbound route. - - Args: - request: SmsInboundGetRequest with inbound ID - - Returns: - APIResponse: Response containing SMS inbound route details - """ - response = await self.client.request( - method="GET", path=f"sms-inbounds/{request.sms_inbound_id}" - ) - return self._create_response(response) - - async def create_sms_inbound(self, request: SmsInboundCreateRequest) -> APIResponse: - """Create a new SMS inbound route. - - Args: - request: SmsInboundCreateRequest with inbound route details - - Returns: - APIResponse: Response containing created SMS inbound route - """ - response = await self.client.request( - method="POST", path="sms-inbounds", body=request.to_request_body() - ) - return self._create_response(response) - - async def update_sms_inbound(self, request: SmsInboundUpdateRequest) -> APIResponse: - """Update an existing SMS inbound route. - - Args: - request: SmsInboundUpdateRequest with inbound ID and updated fields - - Returns: - APIResponse: Response containing updated SMS inbound route - """ - response = await self.client.request( - method="PUT", - path=f"sms-inbounds/{request.sms_inbound_id}", - body=request.to_request_body(), - ) - return self._create_response(response) - - async def delete_sms_inbound(self, request: SmsInboundDeleteRequest) -> APIResponse: - """Delete an SMS inbound route. - - Args: - request: SmsInboundDeleteRequest with inbound ID - - Returns: - APIResponse: Response confirming deletion - """ - response = await self.client.request( - method="DELETE", path=f"sms-inbounds/{request.sms_inbound_id}" - ) - return self._create_response(response) +AsyncSmsInbounds = SmsInbounds diff --git a/mailersend/resources/sms_messages.py b/mailersend/resources/sms_messages.py index 766283a..75ed2e7 100644 --- a/mailersend/resources/sms_messages.py +++ b/mailersend/resources/sms_messages.py @@ -1,6 +1,6 @@ """SMS Messages resource.""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.sms_messages import SmsMessagesListRequest, SmsMessageGetRequest from ..models.base import APIResponse @@ -26,9 +26,7 @@ def list_sms_messages(self, request: SmsMessagesListRequest) -> APIResponse: request.query_params.limit, ) - response = self.client.request(method="GET", path="sms-messages", params=params) - - return self._create_response(response) + return self._request(method="GET", path="sms-messages", params=params) def get_sms_message(self, request: SmsMessageGetRequest) -> APIResponse: """ @@ -42,43 +40,9 @@ def get_sms_message(self, request: SmsMessageGetRequest) -> APIResponse: """ self.logger.debug("Getting SMS message: %s", request.sms_message_id) - response = self.client.request( + return self._request( method="GET", path=f"sms-messages/{request.sms_message_id}" ) - return self._create_response(response) - - -class AsyncSmsMessages(AsyncBaseResource): - """Async SMS Messages resource.""" - - async def list_sms_messages(self, request: SmsMessagesListRequest) -> APIResponse: - """ - List SMS messages. - - Args: - request: SmsMessagesListRequest object containing query parameters - - Returns: - APIResponse: Response containing list of SMS messages - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="sms-messages", params=params - ) - return self._create_response(response) - - async def get_sms_message(self, request: SmsMessageGetRequest) -> APIResponse: - """ - Get a single SMS message. - Args: - request: SmsMessageGetRequest object containing SMS message ID - - Returns: - APIResponse: Response containing SMS message details - """ - response = await self.client.request( - method="GET", path=f"sms-messages/{request.sms_message_id}" - ) - return self._create_response(response) +AsyncSmsMessages = SmsMessages diff --git a/mailersend/resources/sms_numbers.py b/mailersend/resources/sms_numbers.py index f7c1153..7b24844 100644 --- a/mailersend/resources/sms_numbers.py +++ b/mailersend/resources/sms_numbers.py @@ -1,6 +1,6 @@ """SMS Numbers resource""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.sms_numbers import ( SmsNumbersListRequest, SmsNumberGetRequest, @@ -32,9 +32,7 @@ def list(self, request: SmsNumbersListRequest) -> APIResponse: self.logger.debug("Listing SMS phone numbers with params: %s", params) - response = self.client.request(method="GET", path="sms-numbers", params=params) - - return self._create_response(response) + return self._request(method="GET", path="sms-numbers", params=params) def get(self, request: SmsNumberGetRequest) -> APIResponse: """ @@ -48,12 +46,10 @@ def get(self, request: SmsNumberGetRequest) -> APIResponse: """ self.logger.debug("Getting SMS phone number: %s", request.sms_number_id) - response = self.client.request( + return self._request( method="GET", path=f"sms-numbers/{request.sms_number_id}" ) - return self._create_response(response) - def update(self, request: SmsNumberUpdateRequest) -> APIResponse: """ Update a specific SMS phone number. @@ -71,12 +67,10 @@ def update(self, request: SmsNumberUpdateRequest) -> APIResponse: self.logger.debug("Updating SMS phone number: %s", payload) - response = self.client.request( + return self._request( method="PUT", path=f"sms-numbers/{request.sms_number_id}", body=payload ) - return self._create_response(response) - def delete(self, request: SmsNumberDeleteRequest) -> APIResponse: """ Delete a specific SMS phone number. @@ -89,75 +83,9 @@ def delete(self, request: SmsNumberDeleteRequest) -> APIResponse: """ self.logger.debug("Deleting SMS phone number: %s", request.sms_number_id) - response = self.client.request( + return self._request( method="DELETE", path=f"sms-numbers/{request.sms_number_id}" ) - return self._create_response(response) - - -class AsyncSmsNumbers(AsyncBaseResource): - """Async client for the MailerSend SMS Phone Numbers API.""" - - async def list(self, request: SmsNumbersListRequest) -> APIResponse: - """ - Get a list of SMS phone numbers. - - Args: - request: SmsNumbersListRequest with query parameters - - Returns: - APIResponse with SMS phone numbers list and metadata - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="sms-numbers", params=params - ) - return self._create_response(response) - - async def get(self, request: SmsNumberGetRequest) -> APIResponse: - """ - Get a specific SMS phone number. - Args: - request: SmsNumberGetRequest with SMS number ID - - Returns: - APIResponse with SMS phone number data and metadata - """ - response = await self.client.request( - method="GET", path=f"sms-numbers/{request.sms_number_id}" - ) - return self._create_response(response) - - async def update(self, request: SmsNumberUpdateRequest) -> APIResponse: - """ - Update a specific SMS phone number. - - Args: - request: SmsNumberUpdateRequest with SMS number ID and update data - - Returns: - APIResponse with updated SMS phone number data and metadata - """ - response = await self.client.request( - method="PUT", - path=f"sms-numbers/{request.sms_number_id}", - body=request.to_json(), - ) - return self._create_response(response) - - async def delete(self, request: SmsNumberDeleteRequest) -> APIResponse: - """ - Delete a specific SMS phone number. - - Args: - request: SmsNumberDeleteRequest with SMS number ID - - Returns: - APIResponse with deletion confirmation and metadata - """ - response = await self.client.request( - method="DELETE", path=f"sms-numbers/{request.sms_number_id}" - ) - return self._create_response(response) +AsyncSmsNumbers = SmsNumbers diff --git a/mailersend/resources/sms_recipients.py b/mailersend/resources/sms_recipients.py index b716679..03ff95a 100644 --- a/mailersend/resources/sms_recipients.py +++ b/mailersend/resources/sms_recipients.py @@ -1,6 +1,6 @@ """SMS Recipients resource.""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.sms_recipients import ( SmsRecipientsListRequest, SmsRecipientGetRequest, @@ -29,11 +29,7 @@ def list_sms_recipients(self, request: SmsRecipientsListRequest) -> APIResponse: request.query_params.limit, ) - response = self.client.request( - method="GET", path="sms-recipients", params=params - ) - - return self._create_response(response) + return self._request(method="GET", path="sms-recipients", params=params) def get_sms_recipient(self, request: SmsRecipientGetRequest) -> APIResponse: """ @@ -47,12 +43,10 @@ def get_sms_recipient(self, request: SmsRecipientGetRequest) -> APIResponse: """ self.logger.debug("Getting SMS recipient: %s", request.sms_recipient_id) - response = self.client.request( + return self._request( method="GET", path=f"sms-recipients/{request.sms_recipient_id}" ) - return self._create_response(response) - def update_sms_recipient(self, request: SmsRecipientUpdateRequest) -> APIResponse: """ Update a single SMS recipient. @@ -68,66 +62,11 @@ def update_sms_recipient(self, request: SmsRecipientUpdateRequest) -> APIRespons request.status, ) - response = self.client.request( + return self._request( method="PUT", path=f"sms-recipients/{request.sms_recipient_id}", body=request.to_request_body(), ) - return self._create_response(response) - - -class AsyncSmsRecipients(AsyncBaseResource): - """Async SMS Recipients resource.""" - - async def list_sms_recipients( - self, request: SmsRecipientsListRequest - ) -> APIResponse: - """ - List SMS recipients. - - Args: - request: SmsRecipientsListRequest object containing query parameters - - Returns: - APIResponse: Response containing list of SMS recipients - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="sms-recipients", params=params - ) - return self._create_response(response) - - async def get_sms_recipient(self, request: SmsRecipientGetRequest) -> APIResponse: - """ - Get a single SMS recipient. - - Args: - request: SmsRecipientGetRequest object containing SMS recipient ID - - Returns: - APIResponse: Response containing SMS recipient details - """ - response = await self.client.request( - method="GET", path=f"sms-recipients/{request.sms_recipient_id}" - ) - return self._create_response(response) - - async def update_sms_recipient( - self, request: SmsRecipientUpdateRequest - ) -> APIResponse: - """ - Update a single SMS recipient. - Args: - request: SmsRecipientUpdateRequest object containing SMS recipient ID and new status - - Returns: - APIResponse: Response containing updated SMS recipient - """ - response = await self.client.request( - method="PUT", - path=f"sms-recipients/{request.sms_recipient_id}", - body=request.to_request_body(), - ) - return self._create_response(response) +AsyncSmsRecipients = SmsRecipients diff --git a/mailersend/resources/sms_sending.py b/mailersend/resources/sms_sending.py index fc97f63..826403a 100644 --- a/mailersend/resources/sms_sending.py +++ b/mailersend/resources/sms_sending.py @@ -1,6 +1,6 @@ """SMS Sending resource""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.sms_sending import SmsSendRequest from ..models.base import APIResponse @@ -27,24 +27,7 @@ def send(self, request: SmsSendRequest) -> APIResponse: self.logger.debug("SMS payload: %s", payload) - response = self.client.request(method="POST", path="sms", body=payload) + return self._request(method="POST", path="sms", body=payload) - return self._create_response(response) - -class AsyncSmsSending(AsyncBaseResource): - """Async client for the MailerSend SMS Sending API.""" - - async def send(self, request: SmsSendRequest) -> APIResponse: - """ - Send an SMS message. - - Args: - request: SmsSendRequest with SMS details - - Returns: - APIResponse with SMS sending response and metadata - """ - payload = request.to_json() - response = await self.client.request(method="POST", path="sms", body=payload) - return self._create_response(response) +AsyncSmsSending = SmsSending diff --git a/mailersend/resources/sms_webhooks.py b/mailersend/resources/sms_webhooks.py index 219f4d2..855ad2a 100644 --- a/mailersend/resources/sms_webhooks.py +++ b/mailersend/resources/sms_webhooks.py @@ -1,6 +1,6 @@ """SMS Webhooks resource.""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.sms_webhooks import ( SmsWebhooksListRequest, SmsWebhookGetRequest, @@ -31,9 +31,7 @@ def list_sms_webhooks(self, request: SmsWebhooksListRequest) -> APIResponse: request.query_params.sms_number_id, ) - response = self.client.request(method="GET", path="sms-webhooks", params=params) - - return self._create_response(response) + return self._request(method="GET", path="sms-webhooks", params=params) def get_sms_webhook(self, request: SmsWebhookGetRequest) -> APIResponse: """ @@ -47,12 +45,10 @@ def get_sms_webhook(self, request: SmsWebhookGetRequest) -> APIResponse: """ self.logger.debug("Getting SMS webhook: %s", request.sms_webhook_id) - response = self.client.request( + return self._request( method="GET", path=f"sms-webhooks/{request.sms_webhook_id}" ) - return self._create_response(response) - def create_sms_webhook(self, request: SmsWebhookCreateRequest) -> APIResponse: """ Create an SMS webhook. @@ -68,12 +64,10 @@ def create_sms_webhook(self, request: SmsWebhookCreateRequest) -> APIResponse: request.sms_number_id, ) - response = self.client.request( + return self._request( method="POST", path="sms-webhooks", body=request.to_request_body() ) - return self._create_response(response) - def update_sms_webhook(self, request: SmsWebhookUpdateRequest) -> APIResponse: """ Update an SMS webhook. @@ -86,14 +80,12 @@ def update_sms_webhook(self, request: SmsWebhookUpdateRequest) -> APIResponse: """ self.logger.debug("Updating SMS webhook: %s", request.sms_webhook_id) - response = self.client.request( + return self._request( method="PUT", path=f"sms-webhooks/{request.sms_webhook_id}", body=request.to_request_body(), ) - return self._create_response(response) - def delete_sms_webhook(self, request: SmsWebhookDeleteRequest) -> APIResponse: """ Delete an SMS webhook. @@ -106,88 +98,9 @@ def delete_sms_webhook(self, request: SmsWebhookDeleteRequest) -> APIResponse: """ self.logger.debug("Deleting SMS webhook: %s", request.sms_webhook_id) - response = self.client.request( + return self._request( method="DELETE", path=f"sms-webhooks/{request.sms_webhook_id}" ) - return self._create_response(response) - - -class AsyncSmsWebhooks(AsyncBaseResource): - """Async SMS Webhooks resource.""" - - async def list_sms_webhooks(self, request: SmsWebhooksListRequest) -> APIResponse: - """List SMS webhooks. - - Args: - request: SmsWebhooksListRequest object containing query parameters - - Returns: - APIResponse: Response containing list of SMS webhooks - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="sms-webhooks", params=params - ) - return self._create_response(response) - - async def get_sms_webhook(self, request: SmsWebhookGetRequest) -> APIResponse: - """Get a single SMS webhook. - - Args: - request: SmsWebhookGetRequest object containing SMS webhook ID - - Returns: - APIResponse: Response containing SMS webhook details - """ - response = await self.client.request( - method="GET", path=f"sms-webhooks/{request.sms_webhook_id}" - ) - return self._create_response(response) - - async def create_sms_webhook(self, request: SmsWebhookCreateRequest) -> APIResponse: - """ - Create an SMS webhook. - - Args: - request: SmsWebhookCreateRequest object containing webhook data - Returns: - APIResponse: Response containing created SMS webhook - """ - response = await self.client.request( - method="POST", path="sms-webhooks", body=request.to_request_body() - ) - return self._create_response(response) - - async def update_sms_webhook(self, request: SmsWebhookUpdateRequest) -> APIResponse: - """ - Update an SMS webhook. - - Args: - request: SmsWebhookUpdateRequest object containing SMS webhook ID and update data - - Returns: - APIResponse: Response containing updated SMS webhook - """ - response = await self.client.request( - method="PUT", - path=f"sms-webhooks/{request.sms_webhook_id}", - body=request.to_request_body(), - ) - return self._create_response(response) - - async def delete_sms_webhook(self, request: SmsWebhookDeleteRequest) -> APIResponse: - """ - Delete an SMS webhook. - - Args: - request: SmsWebhookDeleteRequest object containing SMS webhook ID - - Returns: - APIResponse: Response confirming deletion - """ - response = await self.client.request( - method="DELETE", path=f"sms-webhooks/{request.sms_webhook_id}" - ) - return self._create_response(response) +AsyncSmsWebhooks = SmsWebhooks diff --git a/mailersend/resources/smtp_users.py b/mailersend/resources/smtp_users.py index a5de7f4..37d0c85 100644 --- a/mailersend/resources/smtp_users.py +++ b/mailersend/resources/smtp_users.py @@ -1,6 +1,6 @@ """SMTP Users API resource.""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.base import APIResponse from ..models.smtp_users import ( SmtpUsersListRequest, @@ -33,15 +33,12 @@ def list_smtp_users(self, request: SmtpUsersListRequest) -> APIResponse: params = request.to_query_params() # Make API call - response = self.client.request( + return self._request( method="GET", path=f"domains/{request.domain_id}/smtp-users", params=params, ) - # Create standardized response - return self._create_response(response) - def get_smtp_user(self, request: SmtpUserGetRequest) -> APIResponse: """Get a single SMTP user. @@ -58,14 +55,11 @@ def get_smtp_user(self, request: SmtpUserGetRequest) -> APIResponse: ) # Make API call - response = self.client.request( + return self._request( method="GET", path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", ) - # Create standardized response - return self._create_response(response) - def create_smtp_user(self, request: SmtpUserCreateRequest) -> APIResponse: """Create an SMTP user. @@ -80,15 +74,12 @@ def create_smtp_user(self, request: SmtpUserCreateRequest) -> APIResponse: ) # Make API call - response = self.client.request( + return self._request( method="POST", path=f"domains/{request.domain_id}/smtp-users", body=request.to_json(), ) - # Create standardized response - return self._create_response(response) - def update_smtp_user(self, request: SmtpUserUpdateRequest) -> APIResponse: """Update an SMTP user. @@ -105,15 +96,12 @@ def update_smtp_user(self, request: SmtpUserUpdateRequest) -> APIResponse: ) # Make API call - response = self.client.request( + return self._request( method="PUT", path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", body=request.to_json(), ) - # Create standardized response - return self._create_response(response) - def delete_smtp_user(self, request: SmtpUserDeleteRequest) -> APIResponse: """Delete an SMTP user. @@ -130,91 +118,10 @@ def delete_smtp_user(self, request: SmtpUserDeleteRequest) -> APIResponse: ) # Make API call - response = self.client.request( + return self._request( method="DELETE", path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", ) - # Create standardized response - return self._create_response(response) - - -class AsyncSmtpUsers(AsyncBaseResource): - """Async SMTP Users API resource.""" - - async def list_smtp_users(self, request: SmtpUsersListRequest) -> APIResponse: - """List SMTP users for a domain. - - Args: - request: The list SMTP users request - - Returns: - APIResponse: API response with SMTP users list data - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path=f"domains/{request.domain_id}/smtp-users", params=params - ) - return self._create_response(response) - - async def get_smtp_user(self, request: SmtpUserGetRequest) -> APIResponse: - """Get a single SMTP user. - - Args: - request: The get SMTP user request - - Returns: - APIResponse: API response with SMTP user data - """ - response = await self.client.request( - method="GET", - path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", - ) - return self._create_response(response) - - async def create_smtp_user(self, request: SmtpUserCreateRequest) -> APIResponse: - """Create an SMTP user. - - Args: - request: The create SMTP user request - - Returns: - APIResponse: API response with SMTP user creation data - """ - response = await self.client.request( - method="POST", - path=f"domains/{request.domain_id}/smtp-users", - body=request.to_json(), - ) - return self._create_response(response) - - async def update_smtp_user(self, request: SmtpUserUpdateRequest) -> APIResponse: - """Update an SMTP user. - - Args: - request: The update SMTP user request - - Returns: - APIResponse: API response with updated SMTP user data - """ - response = await self.client.request( - method="PUT", - path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", - body=request.to_json(), - ) - return self._create_response(response) - - async def delete_smtp_user(self, request: SmtpUserDeleteRequest) -> APIResponse: - """Delete an SMTP user. - - Args: - request: The delete SMTP user request - Returns: - APIResponse: API response with delete confirmation - """ - response = await self.client.request( - method="DELETE", - path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", - ) - return self._create_response(response) +AsyncSmtpUsers = SmtpUsers diff --git a/mailersend/resources/templates.py b/mailersend/resources/templates.py index a3c9f41..e467430 100644 --- a/mailersend/resources/templates.py +++ b/mailersend/resources/templates.py @@ -2,7 +2,7 @@ from typing import Optional -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.base import APIResponse from ..models.templates import ( TemplatesListRequest, @@ -45,10 +45,7 @@ def list_templates( self.logger.debug("Fetching templates with params: %s", params) # Make API call - response = self.client.request(method="GET", path="templates", params=params) - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path="templates", params=params) def get_template(self, request: TemplateGetRequest) -> APIResponse: """ @@ -63,13 +60,10 @@ def get_template(self, request: TemplateGetRequest) -> APIResponse: self.logger.debug("Template get request: %s", request) # Make API call - response = self.client.request( + return self._request( method="GET", path=f"templates/{request.template_id}" ) - # Create standardized response - return self._create_response(response) - def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: """ Delete a template. @@ -84,63 +78,9 @@ def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: self.logger.debug("Deleting template: %s", request.template_id) # Make API call - response = self.client.request( + return self._request( method="DELETE", path=f"templates/{request.template_id}" ) - # Create standardized response - return self._create_response(response) - - -class AsyncTemplates(AsyncBaseResource): - """Async client for interacting with the MailerSend Templates API.""" - - async def list_templates( - self, request: Optional[TemplatesListRequest] = None - ) -> APIResponse: - """ - Retrieve a list of templates. - - Args: - request: Optional TemplatesListRequest with filtering and pagination options - - Returns: - APIResponse with TemplatesListResponse data - """ - if request is None: - request = TemplatesListRequest() - params = request.to_query_params() - response = await self.client.request( - method="GET", path="templates", params=params - ) - return self._create_response(response) - async def get_template(self, request: TemplateGetRequest) -> APIResponse: - """ - Retrieve information about a single template. - - Args: - request: TemplateGetRequest with template ID - - Returns: - APIResponse with TemplateResponse data - """ - response = await self.client.request( - method="GET", path=f"templates/{request.template_id}" - ) - return self._create_response(response) - - async def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: - """ - Delete a template. - - Args: - request: TemplateDeleteRequest with template ID to delete - - Returns: - APIResponse with empty data - """ - response = await self.client.request( - method="DELETE", path=f"templates/{request.template_id}" - ) - return self._create_response(response) +AsyncTemplates = Templates diff --git a/mailersend/resources/tokens.py b/mailersend/resources/tokens.py index b2bf362..456e396 100644 --- a/mailersend/resources/tokens.py +++ b/mailersend/resources/tokens.py @@ -1,6 +1,6 @@ """Tokens API resource.""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.base import APIResponse from ..models.tokens import ( TokensListRequest, @@ -32,10 +32,7 @@ def list_tokens(self, request: TokensListRequest) -> APIResponse: params = request.to_query_params() # Make API call - response = self.client.request(method="GET", path="token", params=params) - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path="token", params=params) def get_token(self, request: TokenGetRequest) -> APIResponse: """Get a single API token. @@ -49,10 +46,7 @@ def get_token(self, request: TokenGetRequest) -> APIResponse: self.logger.info("Getting token: %s", request.token_id) # Make API call - response = self.client.request(method="GET", path=f"token/{request.token_id}") - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path=f"token/{request.token_id}") def create_token(self, request: TokenCreateRequest) -> APIResponse: """Create an API token. @@ -68,12 +62,7 @@ def create_token(self, request: TokenCreateRequest) -> APIResponse: ) # Make API call - response = self.client.request( - method="POST", path="token", body=request.to_json() - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="POST", path="token", body=request.to_json()) def update_token(self, request: TokenUpdateRequest) -> APIResponse: """Update an API token status. @@ -89,15 +78,12 @@ def update_token(self, request: TokenUpdateRequest) -> APIResponse: ) # Make API call - response = self.client.request( + return self._request( method="PUT", path=f"token/{request.token_id}/settings", body=request.to_json(), ) - # Create standardized response - return self._create_response(response) - def update_token_name(self, request: TokenUpdateNameRequest) -> APIResponse: """Update an API token name. @@ -110,13 +96,10 @@ def update_token_name(self, request: TokenUpdateNameRequest) -> APIResponse: self.logger.info("Updating token name: {request.token_id} to: %s", request.name) # Make API call - response = self.client.request( + return self._request( method="PUT", path=f"token/{request.token_id}", body=request.to_json() ) - # Create standardized response - return self._create_response(response) - def delete_token(self, request: TokenDeleteRequest) -> APIResponse: """Delete an API token. @@ -129,98 +112,7 @@ def delete_token(self, request: TokenDeleteRequest) -> APIResponse: self.logger.info("Deleting token: %s", request.token_id) # Make API call - response = self.client.request( - method="DELETE", path=f"token/{request.token_id}" - ) - - # Create standardized response - return self._create_response(response) - - -class AsyncTokens(AsyncBaseResource): - """Async Tokens API resource.""" - - async def list_tokens(self, request: TokensListRequest) -> APIResponse: - """List API tokens. - - Args: - request: The list tokens request - - Returns: - APIResponse: API response with tokens list data - """ - params = request.to_query_params() - response = await self.client.request(method="GET", path="token", params=params) - return self._create_response(response) - - async def get_token(self, request: TokenGetRequest) -> APIResponse: - """Get a single API token. - - Args: - request: The get token request - - Returns: - APIResponse: API response with token data - """ - response = await self.client.request( - method="GET", path=f"token/{request.token_id}" - ) - return self._create_response(response) - - async def create_token(self, request: TokenCreateRequest) -> APIResponse: - """Create an API token. - - Args: - request: The create token request - - Returns: - APIResponse: API response with token creation data - """ - response = await self.client.request( - method="POST", path="token", body=request.to_json() - ) - return self._create_response(response) - - async def update_token(self, request: TokenUpdateRequest) -> APIResponse: - """Update an API token status. - - Args: - request: The update token request - - Returns: - APIResponse: API response with update confirmation - """ - response = await self.client.request( - method="PUT", - path=f"token/{request.token_id}/settings", - body=request.to_json(), - ) - return self._create_response(response) - - async def update_token_name(self, request: TokenUpdateNameRequest) -> APIResponse: - """Update an API token name. - - Args: - request: The update token name request - - Returns: - APIResponse: API response with update confirmation - """ - response = await self.client.request( - method="PUT", path=f"token/{request.token_id}", body=request.to_json() - ) - return self._create_response(response) - - async def delete_token(self, request: TokenDeleteRequest) -> APIResponse: - """Delete an API token. + return self._request(method="DELETE", path=f"token/{request.token_id}") - Args: - request: The delete token request - Returns: - APIResponse: API response with delete confirmation - """ - response = await self.client.request( - method="DELETE", path=f"token/{request.token_id}" - ) - return self._create_response(response) +AsyncTokens = Tokens diff --git a/mailersend/resources/users.py b/mailersend/resources/users.py index 4d34c3c..18a99c6 100644 --- a/mailersend/resources/users.py +++ b/mailersend/resources/users.py @@ -1,6 +1,6 @@ """Users API resource.""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.base import APIResponse from ..models.users import ( UsersListRequest, @@ -37,10 +37,7 @@ def list_users(self, request: UsersListRequest) -> APIResponse: params = request.to_query_params() # Make API call - response = self.client.request(method="GET", path="users", params=params) - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path="users", params=params) def get_user(self, request: UserGetRequest) -> APIResponse: """Get a single account user. @@ -54,10 +51,7 @@ def get_user(self, request: UserGetRequest) -> APIResponse: self.logger.debug("Getting user: %s", request.user_id) # Make API call - response = self.client.request(method="GET", path=f"users/{request.user_id}") - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path=f"users/{request.user_id}") def invite_user(self, request: UserInviteRequest) -> APIResponse: """Invite a user to account. @@ -73,12 +67,7 @@ def invite_user(self, request: UserInviteRequest) -> APIResponse: ) # Make API call - response = self.client.request( - method="POST", path="users", body=request.to_json() - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="POST", path="users", body=request.to_json()) def update_user(self, request: UserUpdateRequest) -> APIResponse: """Update account user. @@ -94,13 +83,10 @@ def update_user(self, request: UserUpdateRequest) -> APIResponse: ) # Make API call - response = self.client.request( + return self._request( method="PUT", path=f"users/{request.user_id}", body=request.to_json() ) - # Create standardized response - return self._create_response(response) - def delete_user(self, request: UserDeleteRequest) -> APIResponse: """Delete account user. @@ -113,10 +99,7 @@ def delete_user(self, request: UserDeleteRequest) -> APIResponse: self.logger.debug("Deleting user: %s", request.user_id) # Make API call - response = self.client.request(method="DELETE", path=f"users/{request.user_id}") - - # Create standardized response - return self._create_response(response, None) + return self._request(method="DELETE", path=f"users/{request.user_id}", data=lambda r: None) def list_invites(self, request: InvitesListRequest) -> APIResponse: """Get a list of invites. @@ -137,10 +120,7 @@ def list_invites(self, request: InvitesListRequest) -> APIResponse: params = request.to_query_params() # Make API call - response = self.client.request(method="GET", path="invites", params=params) - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path="invites", params=params) def get_invite(self, request: InviteGetRequest) -> APIResponse: """Get a single invite. @@ -154,12 +134,7 @@ def get_invite(self, request: InviteGetRequest) -> APIResponse: self.logger.debug("Getting invite: %s", request.invite_id) # Make API call - response = self.client.request( - method="GET", path=f"invites/{request.invite_id}" - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path=f"invites/{request.invite_id}") def resend_invite(self, request: InviteResendRequest) -> APIResponse: """Resend an invite. @@ -173,12 +148,7 @@ def resend_invite(self, request: InviteResendRequest) -> APIResponse: self.logger.debug("Resending invite: %s", request.invite_id) # Make API call - response = self.client.request( - method="POST", path=f"invites/{request.invite_id}/resend" - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="POST", path=f"invites/{request.invite_id}/resend") def cancel_invite(self, request: InviteCancelRequest) -> APIResponse: """Cancel an invite. @@ -192,139 +162,7 @@ def cancel_invite(self, request: InviteCancelRequest) -> APIResponse: self.logger.debug("Canceling invite: %s", request.invite_id) # Make API call - response = self.client.request( - method="DELETE", path=f"invites/{request.invite_id}" - ) - - # Create standardized response - return self._create_response(response, None) - + return self._request(method="DELETE", path=f"invites/{request.invite_id}", data=lambda r: None) -class AsyncUsers(AsyncBaseResource): - """Async Users API resource.""" - async def list_users(self, request: UsersListRequest) -> APIResponse: - """Get a list of account users. - - Args: - request: The list users request - - Returns: - APIResponse: API response with users list data - """ - params = request.to_query_params() - response = await self.client.request(method="GET", path="users", params=params) - return self._create_response(response) - - async def get_user(self, request: UserGetRequest) -> APIResponse: - """Get a single account user. - - Args: - request: The get user request - - Returns: - APIResponse: API response with user data - """ - response = await self.client.request( - method="GET", path=f"users/{request.user_id}" - ) - return self._create_response(response) - - async def invite_user(self, request: UserInviteRequest) -> APIResponse: - """Invite a user to account. - - Args: - request: The user invite request - - Returns: - APIResponse: API response with invite data - """ - response = await self.client.request( - method="POST", path="users", body=request.to_json() - ) - return self._create_response(response) - - async def update_user(self, request: UserUpdateRequest) -> APIResponse: - """Update account user. - - Args: - request: The user update request - - Returns: - APIResponse: API response with updated user data - """ - response = await self.client.request( - method="PUT", path=f"users/{request.user_id}", body=request.to_json() - ) - return self._create_response(response) - - async def delete_user(self, request: UserDeleteRequest) -> APIResponse: - """Delete account user. - - Args: - request: The user delete request - - Returns: - APIResponse: API response with delete confirmation - """ - response = await self.client.request( - method="DELETE", path=f"users/{request.user_id}" - ) - return self._create_response(response, None) - - async def list_invites(self, request: InvitesListRequest) -> APIResponse: - """Get a list of invites. - - Args: - request: The list invites request - - Returns: - APIResponse: API response with invites list data - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="invites", params=params - ) - return self._create_response(response) - - async def get_invite(self, request: InviteGetRequest) -> APIResponse: - """Get a single invite. - - Args: - request: The get invite request - - Returns: - APIResponse: API response with invite data - """ - response = await self.client.request( - method="GET", path=f"invites/{request.invite_id}" - ) - return self._create_response(response) - - async def resend_invite(self, request: InviteResendRequest) -> APIResponse: - """Resend an invite. - - Args: - request: The invite resend request - - Returns: - APIResponse: API response with resent invite data - """ - response = await self.client.request( - method="POST", path=f"invites/{request.invite_id}/resend" - ) - return self._create_response(response) - - async def cancel_invite(self, request: InviteCancelRequest) -> APIResponse: - """Cancel an invite. - - Args: - request: The invite cancel request - - Returns: - APIResponse: API response with cancel confirmation - """ - response = await self.client.request( - method="DELETE", path=f"invites/{request.invite_id}" - ) - return self._create_response(response, None) +AsyncUsers = Users diff --git a/mailersend/resources/webhooks.py b/mailersend/resources/webhooks.py index 418c2ea..1e874af 100644 --- a/mailersend/resources/webhooks.py +++ b/mailersend/resources/webhooks.py @@ -1,6 +1,6 @@ """Webhooks resource for MailerSend SDK.""" -from .base import AsyncBaseResource, BaseResource +from .base import BaseResource from ..models.base import APIResponse from ..models.webhooks import ( WebhooksListRequest, @@ -32,10 +32,7 @@ def list_webhooks(self, request: WebhooksListRequest) -> APIResponse: self.logger.debug("Listing webhooks with params: %s", params) # Make API call - response = self.client.request(method="GET", path="webhooks", params=params) - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path="webhooks", params=params) def get_webhook(self, request: WebhookGetRequest) -> APIResponse: """Get a single webhook by ID. @@ -50,13 +47,10 @@ def get_webhook(self, request: WebhookGetRequest) -> APIResponse: self.logger.debug("Webhook get request: %s", request) # Make API call - response = self.client.request( + return self._request( method="GET", path=f"webhooks/{request.webhook_id}" ) - # Create standardized response - return self._create_response(response) - def create_webhook(self, request: WebhookCreateRequest) -> APIResponse: """Create a new webhook. @@ -74,10 +68,7 @@ def create_webhook(self, request: WebhookCreateRequest) -> APIResponse: self.logger.debug("Creating webhook: %s", request.name) # Make API call - response = self.client.request(method="POST", path="webhooks", body=data) - - # Create standardized response - return self._create_response(response) + return self._request(method="POST", path="webhooks", body=data) def update_webhook(self, request: WebhookUpdateRequest) -> APIResponse: """Update an existing webhook. @@ -97,13 +88,10 @@ def update_webhook(self, request: WebhookUpdateRequest) -> APIResponse: self.logger.debug("Updating webhook: %s", data) # Make API call - response = self.client.request( + return self._request( method="PUT", path=f"webhooks/{request.webhook_id}", body=data ) - # Create standardized response - return self._create_response(response) - def delete_webhook(self, request: WebhookDeleteRequest) -> APIResponse: """Delete a webhook. @@ -117,84 +105,9 @@ def delete_webhook(self, request: WebhookDeleteRequest) -> APIResponse: self.logger.debug("Webhook delete request: %s", request) # Make API call - response = self.client.request( + return self._request( method="DELETE", path=f"webhooks/{request.webhook_id}" ) - # Create standardized response - return self._create_response(response) - - -class AsyncWebhooks(AsyncBaseResource): - """Async Webhooks API resource.""" - - async def list_webhooks(self, request: WebhooksListRequest) -> APIResponse: - """List webhooks for a domain. - - Args: - request: The webhooks list request - - Returns: - APIResponse with WebhooksListResponse data - """ - params = request.to_query_params() - response = await self.client.request( - method="GET", path="webhooks", params=params - ) - return self._create_response(response) - - async def get_webhook(self, request: WebhookGetRequest) -> APIResponse: - """Get a single webhook by ID. - - Args: - request: The webhook get request - - Returns: - APIResponse with WebhookResponse data - """ - response = await self.client.request( - method="GET", path=f"webhooks/{request.webhook_id}" - ) - return self._create_response(response) - - async def create_webhook(self, request: WebhookCreateRequest) -> APIResponse: - """Create a new webhook. - - Args: - request: The webhook create request - - Returns: - APIResponse with WebhookResponse data - """ - data = request.model_dump(exclude_none=True) - response = await self.client.request(method="POST", path="webhooks", body=data) - return self._create_response(response) - - async def update_webhook(self, request: WebhookUpdateRequest) -> APIResponse: - """Update an existing webhook. - - Args: - request: The webhook update request - - Returns: - APIResponse with WebhookResponse data - """ - data = request.model_dump(exclude_none=True, exclude={"webhook_id"}) - response = await self.client.request( - method="PUT", path=f"webhooks/{request.webhook_id}", body=data - ) - return self._create_response(response) - - async def delete_webhook(self, request: WebhookDeleteRequest) -> APIResponse: - """Delete a webhook. - Args: - request: The webhook delete request - - Returns: - APIResponse with empty data - """ - response = await self.client.request( - method="DELETE", path=f"webhooks/{request.webhook_id}" - ) - return self._create_response(response) +AsyncWebhooks = Webhooks diff --git a/tests/unit/test_analytics_resource.py b/tests/unit/test_analytics_resource.py index e7aa540..8406ba3 100644 --- a/tests/unit/test_analytics_resource.py +++ b/tests/unit/test_analytics_resource.py @@ -56,11 +56,12 @@ def test_get_activity_by_date_success(self): assert isinstance(result, APIResponse) self.mock_client.request.assert_called_once() call_args = self.mock_client.request.call_args - assert call_args[0] == ("GET", "analytics/date") - assert "params" in call_args[1] + assert call_args.kwargs["method"] == "GET" + assert call_args.kwargs["path"] == "analytics/date" + assert "params" in call_args.kwargs # Check that the right parameters were passed - params = call_args[1]["params"] + params = call_args.kwargs["params"] assert "date_from" in params assert "date_to" in params assert "tags[]" in params @@ -122,10 +123,11 @@ def test_get_opens_by_country_success(self): assert isinstance(result, APIResponse) self.mock_client.request.assert_called_once() call_args = self.mock_client.request.call_args - assert call_args[0] == ("GET", "analytics/country") + assert call_args.kwargs["method"] == "GET" + assert call_args.kwargs["path"] == "analytics/country" # Check that excluded fields are not present - params = call_args[1]["params"] + params = call_args.kwargs["params"] assert "event" not in params assert "group_by" not in params assert "date_from" in params @@ -162,7 +164,8 @@ def test_get_opens_by_user_agent_success(self): assert isinstance(result, APIResponse) self.mock_client.request.assert_called_once() call_args = self.mock_client.request.call_args - assert call_args[0] == ("GET", "analytics/ua-name") + assert call_args.kwargs["method"] == "GET" + assert call_args.kwargs["path"] == "analytics/ua-name" def test_get_opens_by_reading_environment_success(self): """Test successful opens by reading environment request""" @@ -196,7 +199,8 @@ def test_get_opens_by_reading_environment_success(self): assert isinstance(result, APIResponse) self.mock_client.request.assert_called_once() call_args = self.mock_client.request.call_args - assert call_args[0] == ("GET", "analytics/ua-type") + assert call_args.kwargs["method"] == "GET" + assert call_args.kwargs["path"] == "analytics/ua-type" def test_build_query_params_basic(self): """Test basic query parameter building""" diff --git a/tests/unit/test_async_analytics_resource.py b/tests/unit/test_async_analytics_resource.py index cff82ab..c9ae5c1 100644 --- a/tests/unit/test_async_analytics_resource.py +++ b/tests/unit/test_async_analytics_resource.py @@ -38,7 +38,8 @@ async def test_get_activity_by_date_returns_api_response(self): async def test_get_activity_by_date_calls_correct_endpoint(self): await self.resource.get_activity_by_date(_make_request()) call = self.mock_client.request.call_args - assert call.args == ("GET", "analytics/date") + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "analytics/date" async def test_get_activity_by_date_passes_params(self): await self.resource.get_activity_by_date(_make_request()) @@ -54,7 +55,8 @@ async def test_get_opens_by_country_returns_api_response(self): async def test_get_opens_by_country_calls_correct_endpoint(self): await self.resource.get_opens_by_country(_make_request()) call = self.mock_client.request.call_args - assert call.args == ("GET", "analytics/country") + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "analytics/country" async def test_get_opens_by_country_excludes_event_and_group_by(self): await self.resource.get_opens_by_country(_make_request()) @@ -71,7 +73,8 @@ async def test_get_opens_by_user_agent_returns_api_response(self): async def test_get_opens_by_user_agent_calls_correct_endpoint(self): await self.resource.get_opens_by_user_agent(_make_request()) call = self.mock_client.request.call_args - assert call.args == ("GET", "analytics/ua-name") + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "analytics/ua-name" async def test_get_opens_by_reading_environment_returns_api_response(self): result = await self.resource.get_opens_by_reading_environment(_make_request()) @@ -80,4 +83,5 @@ async def test_get_opens_by_reading_environment_returns_api_response(self): async def test_get_opens_by_reading_environment_calls_correct_endpoint(self): await self.resource.get_opens_by_reading_environment(_make_request()) call = self.mock_client.request.call_args - assert call.args == ("GET", "analytics/ua-type") + assert call.kwargs["method"] == "GET" + assert call.kwargs["path"] == "analytics/ua-type" From c3d7fbe8f190338678ce576d0e036d51511c3cb5 Mon Sep 17 00:00:00 2001 From: rocribera Date: Tue, 26 May 2026 15:43:27 +0200 Subject: [PATCH 03/10] feat: remove aliasing --- mailersend/async_client.py | 96 +++++++++---------- mailersend/resources/__init__.py | 77 +++++---------- mailersend/resources/activity.py | 1 - mailersend/resources/analytics.py | 1 - mailersend/resources/base.py | 3 - mailersend/resources/dmarc_monitoring.py | 1 - mailersend/resources/domains.py | 1 - mailersend/resources/email.py | 1 - mailersend/resources/email_verification.py | 1 - mailersend/resources/identities.py | 1 - mailersend/resources/inbound.py | 1 - mailersend/resources/messages.py | 1 - mailersend/resources/other.py | 1 - mailersend/resources/recipients.py | 1 - mailersend/resources/schedules.py | 1 - mailersend/resources/sms_activity.py | 1 - mailersend/resources/sms_inbounds.py | 1 - mailersend/resources/sms_messages.py | 1 - mailersend/resources/sms_numbers.py | 1 - mailersend/resources/sms_recipients.py | 1 - mailersend/resources/sms_sending.py | 1 - mailersend/resources/sms_webhooks.py | 1 - mailersend/resources/smtp_users.py | 1 - mailersend/resources/templates.py | 1 - mailersend/resources/tokens.py | 1 - mailersend/resources/users.py | 1 - mailersend/resources/webhooks.py | 1 - tests/unit/test_async_activity_resource.py | 8 +- tests/unit/test_async_analytics_resource.py | 8 +- .../test_async_dmarc_monitoring_resource.py | 8 +- tests/unit/test_async_domains_resource.py | 8 +- tests/unit/test_async_email_resource.py | 8 +- .../test_async_email_verification_resource.py | 8 +- tests/unit/test_async_identities_resource.py | 8 +- tests/unit/test_async_inbound_resource.py | 8 +- tests/unit/test_async_messages_resource.py | 8 +- tests/unit/test_async_other_resource.py | 8 +- tests/unit/test_async_recipients_resource.py | 8 +- tests/unit/test_async_schedules_resource.py | 8 +- .../unit/test_async_sms_activity_resource.py | 8 +- .../unit/test_async_sms_inbounds_resource.py | 8 +- .../unit/test_async_sms_messages_resource.py | 8 +- tests/unit/test_async_sms_numbers_resource.py | 8 +- .../test_async_sms_recipients_resource.py | 8 +- tests/unit/test_async_sms_sending_resource.py | 8 +- .../unit/test_async_sms_webhooks_resource.py | 8 +- tests/unit/test_async_smtp_users_resource.py | 8 +- tests/unit/test_async_templates_resource.py | 8 +- tests/unit/test_async_tokens_resource.py | 8 +- tests/unit/test_async_users_resource.py | 8 +- tests/unit/test_async_webhooks_resource.py | 8 +- 51 files changed, 169 insertions(+), 223 deletions(-) diff --git a/mailersend/async_client.py b/mailersend/async_client.py index 4a53005..e806f64 100644 --- a/mailersend/async_client.py +++ b/mailersend/async_client.py @@ -15,30 +15,30 @@ ResourceNotFoundError, ServerError, ) -from .resources.activity import AsyncActivity -from .resources.analytics import AsyncAnalytics -from .resources.dmarc_monitoring import AsyncDmarcMonitoring -from .resources.domains import AsyncDomains -from .resources.email import AsyncEmail -from .resources.email_verification import AsyncEmailVerification -from .resources.identities import AsyncIdentitiesResource -from .resources.inbound import AsyncInboundResource -from .resources.messages import AsyncMessages -from .resources.other import AsyncOther -from .resources.recipients import AsyncRecipients -from .resources.schedules import AsyncSchedules -from .resources.sms_activity import AsyncSmsActivity -from .resources.sms_inbounds import AsyncSmsInbounds -from .resources.sms_messages import AsyncSmsMessages -from .resources.sms_numbers import AsyncSmsNumbers -from .resources.sms_recipients import AsyncSmsRecipients -from .resources.sms_sending import AsyncSmsSending -from .resources.sms_webhooks import AsyncSmsWebhooks -from .resources.smtp_users import AsyncSmtpUsers -from .resources.templates import AsyncTemplates -from .resources.tokens import AsyncTokens -from .resources.users import AsyncUsers -from .resources.webhooks import AsyncWebhooks +from .resources.activity import Activity +from .resources.analytics import Analytics +from .resources.dmarc_monitoring import DmarcMonitoring +from .resources.domains import Domains +from .resources.email import Email +from .resources.email_verification import EmailVerification +from .resources.identities import IdentitiesResource +from .resources.inbound import InboundResource +from .resources.messages import Messages +from .resources.other import Other +from .resources.recipients import Recipients +from .resources.schedules import Schedules +from .resources.sms_activity import SmsActivity +from .resources.sms_inbounds import SmsInbounds +from .resources.sms_messages import SmsMessages +from .resources.sms_numbers import SmsNumbers +from .resources.sms_recipients import SmsRecipients +from .resources.sms_sending import SmsSending +from .resources.sms_webhooks import SmsWebhooks +from .resources.smtp_users import SmtpUsers +from .resources.templates import Templates +from .resources.tokens import Tokens +from .resources.users import Users +from .resources.webhooks import Webhooks from .logging import get_logger, RequestLogger _RETRY_STATUSES = frozenset([429, 500, 502, 503, 504]) @@ -114,30 +114,30 @@ def __init__( timeout=self.timeout, ) - self.emails = AsyncEmail(self) - self.activities = AsyncActivity(self) - self.analytics = AsyncAnalytics(self) - self.domains = AsyncDomains(self) - self.identities = AsyncIdentitiesResource(self) - self.inbound = AsyncInboundResource(self) - self.templates = AsyncTemplates(self) - self.tokens = AsyncTokens(self) - self.webhooks = AsyncWebhooks(self) - self.email_verification = AsyncEmailVerification(self) - self.users = AsyncUsers(self) - self.messages = AsyncMessages(self) - self.recipients = AsyncRecipients(self) - self.schedules = AsyncSchedules(self) - self.sms_messages = AsyncSmsMessages(self) - self.smtp_users = AsyncSmtpUsers(self) - self.sms_sending = AsyncSmsSending(self) - self.sms_numbers = AsyncSmsNumbers(self) - self.sms_activity = AsyncSmsActivity(self) - self.sms_inbounds = AsyncSmsInbounds(self) - self.sms_recipients = AsyncSmsRecipients(self) - self.sms_webhooks = AsyncSmsWebhooks(self) - self.api_quota = AsyncOther(self) - self.dmarc_monitoring = AsyncDmarcMonitoring(self) + self.emails = Email(self) + self.activities = Activity(self) + self.analytics = Analytics(self) + self.domains = Domains(self) + self.identities = IdentitiesResource(self) + self.inbound = InboundResource(self) + self.templates = Templates(self) + self.tokens = Tokens(self) + self.webhooks = Webhooks(self) + self.email_verification = EmailVerification(self) + self.users = Users(self) + self.messages = Messages(self) + self.recipients = Recipients(self) + self.schedules = Schedules(self) + self.sms_messages = SmsMessages(self) + self.smtp_users = SmtpUsers(self) + self.sms_sending = SmsSending(self) + self.sms_numbers = SmsNumbers(self) + self.sms_activity = SmsActivity(self) + self.sms_inbounds = SmsInbounds(self) + self.sms_recipients = SmsRecipients(self) + self.sms_webhooks = SmsWebhooks(self) + self.api_quota = Other(self) + self.dmarc_monitoring = DmarcMonitoring(self) self.logger.info("AsyncMailerSendClient initialized successfully") diff --git a/mailersend/resources/__init__.py b/mailersend/resources/__init__.py index d51d779..594aa84 100644 --- a/mailersend/resources/__init__.py +++ b/mailersend/resources/__init__.py @@ -2,34 +2,33 @@ API resource classes for interacting with specific MailerSend API endpoints. """ -from .base import AsyncBaseResource, BaseResource -from .email import AsyncEmail, Email -from .activity import AsyncActivity, Activity -from .analytics import AsyncAnalytics, Analytics -from .domains import AsyncDomains, Domains -from .identities import AsyncIdentitiesResource, IdentitiesResource -from .inbound import AsyncInboundResource, InboundResource -from .messages import AsyncMessages, Messages -from .schedules import AsyncSchedules, Schedules -from .recipients import AsyncRecipients, Recipients -from .templates import AsyncTemplates, Templates -from .tokens import AsyncTokens, Tokens -from .webhooks import AsyncWebhooks, Webhooks -from .email_verification import AsyncEmailVerification, EmailVerification -from .users import AsyncUsers, Users -from .sms_messages import AsyncSmsMessages, SmsMessages -from .sms_numbers import AsyncSmsNumbers, SmsNumbers -from .sms_activity import AsyncSmsActivity, SmsActivity -from .sms_sending import AsyncSmsSending, SmsSending -from .sms_recipients import AsyncSmsRecipients, SmsRecipients -from .sms_webhooks import AsyncSmsWebhooks, SmsWebhooks -from .sms_inbounds import AsyncSmsInbounds, SmsInbounds -from .other import AsyncOther, Other -from .dmarc_monitoring import AsyncDmarcMonitoring, DmarcMonitoring -from .smtp_users import AsyncSmtpUsers, SmtpUsers +from .base import BaseResource +from .email import Email +from .activity import Activity +from .analytics import Analytics +from .domains import Domains +from .identities import IdentitiesResource +from .inbound import InboundResource +from .messages import Messages +from .schedules import Schedules +from .recipients import Recipients +from .templates import Templates +from .tokens import Tokens +from .webhooks import Webhooks +from .email_verification import EmailVerification +from .users import Users +from .sms_messages import SmsMessages +from .sms_numbers import SmsNumbers +from .sms_activity import SmsActivity +from .sms_sending import SmsSending +from .sms_recipients import SmsRecipients +from .sms_webhooks import SmsWebhooks +from .sms_inbounds import SmsInbounds +from .other import Other +from .dmarc_monitoring import DmarcMonitoring +from .smtp_users import SmtpUsers __all__ = [ - # Sync resources "BaseResource", "Email", "Activity", @@ -55,30 +54,4 @@ "SmtpUsers", "Other", "DmarcMonitoring", - # Async resources - "AsyncBaseResource", - "AsyncEmail", - "AsyncActivity", - "AsyncAnalytics", - "AsyncDomains", - "AsyncIdentitiesResource", - "AsyncInboundResource", - "AsyncMessages", - "AsyncSchedules", - "AsyncRecipients", - "AsyncTemplates", - "AsyncTokens", - "AsyncWebhooks", - "AsyncEmailVerification", - "AsyncUsers", - "AsyncSmsMessages", - "AsyncSmsNumbers", - "AsyncSmsActivity", - "AsyncSmsSending", - "AsyncSmsRecipients", - "AsyncSmsWebhooks", - "AsyncSmsInbounds", - "AsyncSmtpUsers", - "AsyncOther", - "AsyncDmarcMonitoring", ] diff --git a/mailersend/resources/activity.py b/mailersend/resources/activity.py index 1a5ce63..41e7475 100644 --- a/mailersend/resources/activity.py +++ b/mailersend/resources/activity.py @@ -48,4 +48,3 @@ def get_single(self, request: SingleActivityRequest) -> APIResponse: return self._request(method="GET", path=f"activities/{request.activity_id}") -AsyncActivity = Activity diff --git a/mailersend/resources/analytics.py b/mailersend/resources/analytics.py index ed93dde..5c94687 100644 --- a/mailersend/resources/analytics.py +++ b/mailersend/resources/analytics.py @@ -123,4 +123,3 @@ def _build_query_params( return params -AsyncAnalytics = Analytics diff --git a/mailersend/resources/base.py b/mailersend/resources/base.py index 6d6d871..7977955 100644 --- a/mailersend/resources/base.py +++ b/mailersend/resources/base.py @@ -128,7 +128,4 @@ def _process_response( return response_data -class AsyncBaseResource(BaseResource): - """Base class for all async API resources.""" - pass diff --git a/mailersend/resources/dmarc_monitoring.py b/mailersend/resources/dmarc_monitoring.py index 0333d28..9382cf4 100644 --- a/mailersend/resources/dmarc_monitoring.py +++ b/mailersend/resources/dmarc_monitoring.py @@ -205,4 +205,3 @@ def remove_ip_favorite( ) -AsyncDmarcMonitoring = DmarcMonitoring diff --git a/mailersend/resources/domains.py b/mailersend/resources/domains.py index 23a4ee8..abeed74 100644 --- a/mailersend/resources/domains.py +++ b/mailersend/resources/domains.py @@ -186,4 +186,3 @@ def get_domain_verification_status( ) -AsyncDomains = Domains diff --git a/mailersend/resources/email.py b/mailersend/resources/email.py index 949c614..4b641e2 100644 --- a/mailersend/resources/email.py +++ b/mailersend/resources/email.py @@ -75,4 +75,3 @@ def get_bulk_status(self, bulk_email_id: str) -> APIResponse: return self._request(method="GET", path=f"bulk-email/{bulk_email_id}") -AsyncEmail = Email diff --git a/mailersend/resources/email_verification.py b/mailersend/resources/email_verification.py index 28f9585..1c8e629 100644 --- a/mailersend/resources/email_verification.py +++ b/mailersend/resources/email_verification.py @@ -202,4 +202,3 @@ def get_results(self, request: EmailVerificationResultsRequest) -> APIResponse: ) -AsyncEmailVerification = EmailVerification diff --git a/mailersend/resources/identities.py b/mailersend/resources/identities.py index cc7c2eb..8598df0 100644 --- a/mailersend/resources/identities.py +++ b/mailersend/resources/identities.py @@ -197,4 +197,3 @@ def delete_identity_by_email( ) -AsyncIdentitiesResource = IdentitiesResource diff --git a/mailersend/resources/inbound.py b/mailersend/resources/inbound.py index 5e6f4fb..4a6bd6d 100644 --- a/mailersend/resources/inbound.py +++ b/mailersend/resources/inbound.py @@ -123,4 +123,3 @@ def delete(self, request: InboundDeleteRequest) -> APIResponse: return self._request(method="DELETE", path=f"inbound/{request.inbound_id}") -AsyncInboundResource = InboundResource diff --git a/mailersend/resources/messages.py b/mailersend/resources/messages.py index a790ad2..02997f3 100644 --- a/mailersend/resources/messages.py +++ b/mailersend/resources/messages.py @@ -53,4 +53,3 @@ def get_message(self, request: MessageGetRequest) -> APIResponse: return self._request(method="GET", path=f"messages/{request.message_id}") -AsyncMessages = Messages diff --git a/mailersend/resources/other.py b/mailersend/resources/other.py index 31bcc41..21e46c0 100644 --- a/mailersend/resources/other.py +++ b/mailersend/resources/other.py @@ -23,4 +23,3 @@ def get_quota(self) -> APIResponse: return self._request(method="GET", path="api-quota") -AsyncOther = Other diff --git a/mailersend/resources/recipients.py b/mailersend/resources/recipients.py index e122165..2412c66 100644 --- a/mailersend/resources/recipients.py +++ b/mailersend/resources/recipients.py @@ -390,4 +390,3 @@ def delete_from_on_hold(self, request: SuppressionDeleteRequest) -> APIResponse: ) -AsyncRecipients = Recipients diff --git a/mailersend/resources/schedules.py b/mailersend/resources/schedules.py index 8dd0544..158a644 100644 --- a/mailersend/resources/schedules.py +++ b/mailersend/resources/schedules.py @@ -81,4 +81,3 @@ def delete_schedule(self, request: ScheduleDeleteRequest) -> APIResponse: ) -AsyncSchedules = Schedules diff --git a/mailersend/resources/sms_activity.py b/mailersend/resources/sms_activity.py index 245b009..6822ae3 100644 --- a/mailersend/resources/sms_activity.py +++ b/mailersend/resources/sms_activity.py @@ -51,4 +51,3 @@ def get(self, request: SmsMessageGetRequest) -> APIResponse: ) -AsyncSmsActivity = SmsActivity diff --git a/mailersend/resources/sms_inbounds.py b/mailersend/resources/sms_inbounds.py index b9a3b3a..760b164 100644 --- a/mailersend/resources/sms_inbounds.py +++ b/mailersend/resources/sms_inbounds.py @@ -96,4 +96,3 @@ def delete_sms_inbound(self, request: SmsInboundDeleteRequest) -> APIResponse: ) -AsyncSmsInbounds = SmsInbounds diff --git a/mailersend/resources/sms_messages.py b/mailersend/resources/sms_messages.py index 75ed2e7..8f33f06 100644 --- a/mailersend/resources/sms_messages.py +++ b/mailersend/resources/sms_messages.py @@ -45,4 +45,3 @@ def get_sms_message(self, request: SmsMessageGetRequest) -> APIResponse: ) -AsyncSmsMessages = SmsMessages diff --git a/mailersend/resources/sms_numbers.py b/mailersend/resources/sms_numbers.py index 7b24844..b4935e0 100644 --- a/mailersend/resources/sms_numbers.py +++ b/mailersend/resources/sms_numbers.py @@ -88,4 +88,3 @@ def delete(self, request: SmsNumberDeleteRequest) -> APIResponse: ) -AsyncSmsNumbers = SmsNumbers diff --git a/mailersend/resources/sms_recipients.py b/mailersend/resources/sms_recipients.py index 03ff95a..d08e0d0 100644 --- a/mailersend/resources/sms_recipients.py +++ b/mailersend/resources/sms_recipients.py @@ -69,4 +69,3 @@ def update_sms_recipient(self, request: SmsRecipientUpdateRequest) -> APIRespons ) -AsyncSmsRecipients = SmsRecipients diff --git a/mailersend/resources/sms_sending.py b/mailersend/resources/sms_sending.py index 826403a..9a71f87 100644 --- a/mailersend/resources/sms_sending.py +++ b/mailersend/resources/sms_sending.py @@ -30,4 +30,3 @@ def send(self, request: SmsSendRequest) -> APIResponse: return self._request(method="POST", path="sms", body=payload) -AsyncSmsSending = SmsSending diff --git a/mailersend/resources/sms_webhooks.py b/mailersend/resources/sms_webhooks.py index 855ad2a..de9d53c 100644 --- a/mailersend/resources/sms_webhooks.py +++ b/mailersend/resources/sms_webhooks.py @@ -103,4 +103,3 @@ def delete_sms_webhook(self, request: SmsWebhookDeleteRequest) -> APIResponse: ) -AsyncSmsWebhooks = SmsWebhooks diff --git a/mailersend/resources/smtp_users.py b/mailersend/resources/smtp_users.py index 37d0c85..4e307e9 100644 --- a/mailersend/resources/smtp_users.py +++ b/mailersend/resources/smtp_users.py @@ -124,4 +124,3 @@ def delete_smtp_user(self, request: SmtpUserDeleteRequest) -> APIResponse: ) -AsyncSmtpUsers = SmtpUsers diff --git a/mailersend/resources/templates.py b/mailersend/resources/templates.py index e467430..4e8301d 100644 --- a/mailersend/resources/templates.py +++ b/mailersend/resources/templates.py @@ -83,4 +83,3 @@ def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: ) -AsyncTemplates = Templates diff --git a/mailersend/resources/tokens.py b/mailersend/resources/tokens.py index 456e396..28e4fce 100644 --- a/mailersend/resources/tokens.py +++ b/mailersend/resources/tokens.py @@ -115,4 +115,3 @@ def delete_token(self, request: TokenDeleteRequest) -> APIResponse: return self._request(method="DELETE", path=f"token/{request.token_id}") -AsyncTokens = Tokens diff --git a/mailersend/resources/users.py b/mailersend/resources/users.py index 18a99c6..525fa36 100644 --- a/mailersend/resources/users.py +++ b/mailersend/resources/users.py @@ -165,4 +165,3 @@ def cancel_invite(self, request: InviteCancelRequest) -> APIResponse: return self._request(method="DELETE", path=f"invites/{request.invite_id}", data=lambda r: None) -AsyncUsers = Users diff --git a/mailersend/resources/webhooks.py b/mailersend/resources/webhooks.py index 1e874af..3454ab9 100644 --- a/mailersend/resources/webhooks.py +++ b/mailersend/resources/webhooks.py @@ -110,4 +110,3 @@ def delete_webhook(self, request: WebhookDeleteRequest) -> APIResponse: ) -AsyncWebhooks = Webhooks diff --git a/tests/unit/test_async_activity_resource.py b/tests/unit/test_async_activity_resource.py index 0ddc8bc..3b6dc05 100644 --- a/tests/unit/test_async_activity_resource.py +++ b/tests/unit/test_async_activity_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncActivity resource.""" +"""Tests for Activity resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.activity import AsyncActivity +from mailersend.resources.activity import Activity from mailersend.models.activity import ( ActivityRequest, ActivityQueryParams, @@ -21,10 +21,10 @@ def _make_mock_client(): return client -class TestAsyncActivity: +class TestActivity: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncActivity(self.mock_client) + self.resource = Activity(self.mock_client) async def test_get_returns_api_response(self): request = ActivityRequest( diff --git a/tests/unit/test_async_analytics_resource.py b/tests/unit/test_async_analytics_resource.py index c9ae5c1..3f66ecc 100644 --- a/tests/unit/test_async_analytics_resource.py +++ b/tests/unit/test_async_analytics_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncAnalytics resource.""" +"""Tests for Analytics resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.analytics import AsyncAnalytics +from mailersend.resources.analytics import Analytics from mailersend.models.analytics import AnalyticsRequest from mailersend.models.base import APIResponse @@ -26,10 +26,10 @@ def _make_request(): ) -class TestAsyncAnalytics: +class TestAnalytics: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncAnalytics(self.mock_client) + self.resource = Analytics(self.mock_client) async def test_get_activity_by_date_returns_api_response(self): result = await self.resource.get_activity_by_date(_make_request()) diff --git a/tests/unit/test_async_dmarc_monitoring_resource.py b/tests/unit/test_async_dmarc_monitoring_resource.py index 84cfb40..33444e7 100644 --- a/tests/unit/test_async_dmarc_monitoring_resource.py +++ b/tests/unit/test_async_dmarc_monitoring_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncDmarcMonitoring resource.""" +"""Tests for DmarcMonitoring resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.dmarc_monitoring import AsyncDmarcMonitoring +from mailersend.resources.dmarc_monitoring import DmarcMonitoring from mailersend.models.base import APIResponse from mailersend.models.dmarc_monitoring import ( DmarcMonitoringListRequest, @@ -28,10 +28,10 @@ def _make_mock_client(): return client -class TestAsyncDmarcMonitoring: +class TestDmarcMonitoring: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncDmarcMonitoring(self.mock_client) + self.resource = DmarcMonitoring(self.mock_client) async def test_list_monitors_returns_api_response(self): result = await self.resource.list_monitors() diff --git a/tests/unit/test_async_domains_resource.py b/tests/unit/test_async_domains_resource.py index 0313fd3..53dcea4 100644 --- a/tests/unit/test_async_domains_resource.py +++ b/tests/unit/test_async_domains_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncDomains resource.""" +"""Tests for Domains resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.domains import AsyncDomains +from mailersend.resources.domains import Domains from mailersend.models.domains import ( DomainListRequest, DomainListQueryParams, @@ -28,10 +28,10 @@ def _make_mock_client(): return client -class TestAsyncDomains: +class TestDomains: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncDomains(self.mock_client) + self.resource = Domains(self.mock_client) async def test_list_domains_returns_api_response(self): result = await self.resource.list_domains() diff --git a/tests/unit/test_async_email_resource.py b/tests/unit/test_async_email_resource.py index 73e199c..2507e26 100644 --- a/tests/unit/test_async_email_resource.py +++ b/tests/unit/test_async_email_resource.py @@ -1,9 +1,9 @@ -"""Tests for AsyncEmail resource.""" +"""Tests for Email resource.""" import pytest from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.email import AsyncEmail +from mailersend.resources.email import Email from mailersend.models.base import APIResponse from mailersend.models.email import EmailRequest, EmailContact @@ -32,10 +32,10 @@ def _make_email_request(): ) -class TestAsyncEmail: +class TestEmail: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncEmail(self.mock_client) + self.resource = Email(self.mock_client) async def test_send_returns_api_response(self): self.mock_client.request.return_value = _make_mock_response() diff --git a/tests/unit/test_async_email_verification_resource.py b/tests/unit/test_async_email_verification_resource.py index 491ac52..82f59a8 100644 --- a/tests/unit/test_async_email_verification_resource.py +++ b/tests/unit/test_async_email_verification_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncEmailVerification resource.""" +"""Tests for EmailVerification resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.email_verification import AsyncEmailVerification +from mailersend.resources.email_verification import EmailVerification from mailersend.models.base import APIResponse from mailersend.models.email_verification import ( EmailVerifyRequest, @@ -28,10 +28,10 @@ def _make_mock_client(): return client -class TestAsyncEmailVerification: +class TestEmailVerification: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncEmailVerification(self.mock_client) + self.resource = EmailVerification(self.mock_client) async def test_verify_email_returns_api_response(self): result = await self.resource.verify_email( diff --git a/tests/unit/test_async_identities_resource.py b/tests/unit/test_async_identities_resource.py index 875301d..0af190d 100644 --- a/tests/unit/test_async_identities_resource.py +++ b/tests/unit/test_async_identities_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncIdentitiesResource.""" +"""Tests for IdentitiesResource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.identities import AsyncIdentitiesResource +from mailersend.resources.identities import IdentitiesResource from mailersend.models.base import APIResponse from mailersend.models.identities import ( IdentityListRequest, @@ -27,10 +27,10 @@ def _make_mock_client(): return client -class TestAsyncIdentitiesResource: +class TestIdentitiesResource: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncIdentitiesResource(self.mock_client) + self.resource = IdentitiesResource(self.mock_client) async def test_list_identities_returns_api_response(self): request = IdentityListRequest(query_params=IdentityListQueryParams()) diff --git a/tests/unit/test_async_inbound_resource.py b/tests/unit/test_async_inbound_resource.py index b8a679c..6a60b9e 100644 --- a/tests/unit/test_async_inbound_resource.py +++ b/tests/unit/test_async_inbound_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncInboundResource.""" +"""Tests for InboundResource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.inbound import AsyncInboundResource +from mailersend.resources.inbound import InboundResource from mailersend.models.base import APIResponse from mailersend.models.inbound import ( InboundListRequest, @@ -34,10 +34,10 @@ def _make_forward(): return InboundForward(type="email", value="forward@example.com") -class TestAsyncInboundResource: +class TestInboundResource: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncInboundResource(self.mock_client) + self.resource = InboundResource(self.mock_client) async def test_list_returns_api_response(self): request = InboundListRequest(query_params=InboundListQueryParams()) diff --git a/tests/unit/test_async_messages_resource.py b/tests/unit/test_async_messages_resource.py index 29820b2..5476141 100644 --- a/tests/unit/test_async_messages_resource.py +++ b/tests/unit/test_async_messages_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncMessages resource.""" +"""Tests for Messages resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.messages import AsyncMessages +from mailersend.resources.messages import Messages from mailersend.models.base import APIResponse from mailersend.models.messages import ( MessagesListRequest, @@ -21,10 +21,10 @@ def _make_mock_client(): return client -class TestAsyncMessages: +class TestMessages: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncMessages(self.mock_client) + self.resource = Messages(self.mock_client) async def test_list_messages_returns_api_response(self): request = MessagesListRequest(query_params=MessagesListQueryParams()) diff --git a/tests/unit/test_async_other_resource.py b/tests/unit/test_async_other_resource.py index a00f5db..929b7a2 100644 --- a/tests/unit/test_async_other_resource.py +++ b/tests/unit/test_async_other_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncOther resource.""" +"""Tests for Other resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.other import AsyncOther +from mailersend.resources.other import Other from mailersend.models.base import APIResponse @@ -16,10 +16,10 @@ def _make_mock_client(): return client -class TestAsyncOther: +class TestOther: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncOther(self.mock_client) + self.resource = Other(self.mock_client) async def test_get_quota_returns_api_response(self): result = await self.resource.get_quota() diff --git a/tests/unit/test_async_recipients_resource.py b/tests/unit/test_async_recipients_resource.py index e0785e5..c4d65ce 100644 --- a/tests/unit/test_async_recipients_resource.py +++ b/tests/unit/test_async_recipients_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncRecipients resource.""" +"""Tests for Recipients resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.recipients import AsyncRecipients +from mailersend.resources.recipients import Recipients from mailersend.models.base import APIResponse from mailersend.models.recipients import ( RecipientsListRequest, @@ -26,10 +26,10 @@ def _make_mock_client(): return client -class TestAsyncRecipients: +class TestRecipients: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncRecipients(self.mock_client) + self.resource = Recipients(self.mock_client) async def test_list_recipients_returns_api_response(self): result = await self.resource.list_recipients() diff --git a/tests/unit/test_async_schedules_resource.py b/tests/unit/test_async_schedules_resource.py index 23c30be..6be3e6e 100644 --- a/tests/unit/test_async_schedules_resource.py +++ b/tests/unit/test_async_schedules_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncSchedules resource.""" +"""Tests for Schedules resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.schedules import AsyncSchedules +from mailersend.resources.schedules import Schedules from mailersend.models.base import APIResponse from mailersend.models.schedules import ( SchedulesListRequest, @@ -22,10 +22,10 @@ def _make_mock_client(): return client -class TestAsyncSchedules: +class TestSchedules: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncSchedules(self.mock_client) + self.resource = Schedules(self.mock_client) async def test_list_schedules_returns_api_response(self): request = SchedulesListRequest(query_params=SchedulesListQueryParams()) diff --git a/tests/unit/test_async_sms_activity_resource.py b/tests/unit/test_async_sms_activity_resource.py index 7cf6ca9..e63751a 100644 --- a/tests/unit/test_async_sms_activity_resource.py +++ b/tests/unit/test_async_sms_activity_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncSmsActivity resource.""" +"""Tests for SmsActivity resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.sms_activity import AsyncSmsActivity +from mailersend.resources.sms_activity import SmsActivity from mailersend.models.base import APIResponse from mailersend.models.sms_activity import ( SmsActivityListRequest, @@ -20,10 +20,10 @@ def _make_mock_client(): return client -class TestAsyncSmsActivity: +class TestSmsActivity: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncSmsActivity(self.mock_client) + self.resource = SmsActivity(self.mock_client) async def test_list_returns_api_response(self): result = await self.resource.list(SmsActivityListRequest()) diff --git a/tests/unit/test_async_sms_inbounds_resource.py b/tests/unit/test_async_sms_inbounds_resource.py index 801a720..66d1f29 100644 --- a/tests/unit/test_async_sms_inbounds_resource.py +++ b/tests/unit/test_async_sms_inbounds_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncSmsInbounds resource.""" +"""Tests for SmsInbounds resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.sms_inbounds import AsyncSmsInbounds +from mailersend.resources.sms_inbounds import SmsInbounds from mailersend.models.base import APIResponse from mailersend.models.sms_inbounds import ( SmsInboundsListRequest, @@ -24,10 +24,10 @@ def _make_mock_client(): return client -class TestAsyncSmsInbounds: +class TestSmsInbounds: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncSmsInbounds(self.mock_client) + self.resource = SmsInbounds(self.mock_client) async def test_list_sms_inbounds_returns_api_response(self): result = await self.resource.list_sms_inbounds(SmsInboundsListRequest()) diff --git a/tests/unit/test_async_sms_messages_resource.py b/tests/unit/test_async_sms_messages_resource.py index 488c0b4..b301ae5 100644 --- a/tests/unit/test_async_sms_messages_resource.py +++ b/tests/unit/test_async_sms_messages_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncSmsMessages resource.""" +"""Tests for SmsMessages resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.sms_messages import AsyncSmsMessages +from mailersend.resources.sms_messages import SmsMessages from mailersend.models.base import APIResponse from mailersend.models.sms_messages import ( SmsMessagesListRequest, @@ -21,10 +21,10 @@ def _make_mock_client(): return client -class TestAsyncSmsMessages: +class TestSmsMessages: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncSmsMessages(self.mock_client) + self.resource = SmsMessages(self.mock_client) async def test_list_sms_messages_returns_api_response(self): result = await self.resource.list_sms_messages(SmsMessagesListRequest()) diff --git a/tests/unit/test_async_sms_numbers_resource.py b/tests/unit/test_async_sms_numbers_resource.py index 5cffa9c..2f43073 100644 --- a/tests/unit/test_async_sms_numbers_resource.py +++ b/tests/unit/test_async_sms_numbers_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncSmsNumbers resource.""" +"""Tests for SmsNumbers resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.sms_numbers import AsyncSmsNumbers +from mailersend.resources.sms_numbers import SmsNumbers from mailersend.models.base import APIResponse from mailersend.models.sms_numbers import ( SmsNumbersListRequest, @@ -22,10 +22,10 @@ def _make_mock_client(): return client -class TestAsyncSmsNumbers: +class TestSmsNumbers: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncSmsNumbers(self.mock_client) + self.resource = SmsNumbers(self.mock_client) async def test_list_returns_api_response(self): result = await self.resource.list(SmsNumbersListRequest()) diff --git a/tests/unit/test_async_sms_recipients_resource.py b/tests/unit/test_async_sms_recipients_resource.py index 42d4608..5de2f85 100644 --- a/tests/unit/test_async_sms_recipients_resource.py +++ b/tests/unit/test_async_sms_recipients_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncSmsRecipients resource.""" +"""Tests for SmsRecipients resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.sms_recipients import AsyncSmsRecipients +from mailersend.resources.sms_recipients import SmsRecipients from mailersend.models.base import APIResponse from mailersend.models.sms_recipients import ( SmsRecipientsListRequest, @@ -23,10 +23,10 @@ def _make_mock_client(): return client -class TestAsyncSmsRecipients: +class TestSmsRecipients: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncSmsRecipients(self.mock_client) + self.resource = SmsRecipients(self.mock_client) async def test_list_sms_recipients_returns_api_response(self): result = await self.resource.list_sms_recipients(SmsRecipientsListRequest()) diff --git a/tests/unit/test_async_sms_sending_resource.py b/tests/unit/test_async_sms_sending_resource.py index 2ae313c..100a633 100644 --- a/tests/unit/test_async_sms_sending_resource.py +++ b/tests/unit/test_async_sms_sending_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncSmsSending resource.""" +"""Tests for SmsSending resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.sms_sending import AsyncSmsSending +from mailersend.resources.sms_sending import SmsSending from mailersend.models.base import APIResponse from mailersend.models.sms_sending import SmsSendRequest @@ -17,10 +17,10 @@ def _make_mock_client(): return client -class TestAsyncSmsSending: +class TestSmsSending: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncSmsSending(self.mock_client) + self.resource = SmsSending(self.mock_client) async def test_send_returns_api_response(self): request = SmsSendRequest( diff --git a/tests/unit/test_async_sms_webhooks_resource.py b/tests/unit/test_async_sms_webhooks_resource.py index 8004c71..e757b43 100644 --- a/tests/unit/test_async_sms_webhooks_resource.py +++ b/tests/unit/test_async_sms_webhooks_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncSmsWebhooks resource.""" +"""Tests for SmsWebhooks resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.sms_webhooks import AsyncSmsWebhooks +from mailersend.resources.sms_webhooks import SmsWebhooks from mailersend.models.base import APIResponse from mailersend.models.sms_webhooks import ( SmsWebhooksListRequest, @@ -25,10 +25,10 @@ def _make_mock_client(): return client -class TestAsyncSmsWebhooks: +class TestSmsWebhooks: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncSmsWebhooks(self.mock_client) + self.resource = SmsWebhooks(self.mock_client) async def test_list_sms_webhooks_returns_api_response(self): request = SmsWebhooksListRequest( diff --git a/tests/unit/test_async_smtp_users_resource.py b/tests/unit/test_async_smtp_users_resource.py index 5502678..2f3152b 100644 --- a/tests/unit/test_async_smtp_users_resource.py +++ b/tests/unit/test_async_smtp_users_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncSmtpUsers resource.""" +"""Tests for SmtpUsers resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.smtp_users import AsyncSmtpUsers +from mailersend.resources.smtp_users import SmtpUsers from mailersend.models.base import APIResponse from mailersend.models.smtp_users import ( SmtpUsersListRequest, @@ -24,10 +24,10 @@ def _make_mock_client(): return client -class TestAsyncSmtpUsers: +class TestSmtpUsers: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncSmtpUsers(self.mock_client) + self.resource = SmtpUsers(self.mock_client) async def test_list_smtp_users_returns_api_response(self): request = SmtpUsersListRequest(domain_id="dom123") diff --git a/tests/unit/test_async_templates_resource.py b/tests/unit/test_async_templates_resource.py index 2680bfa..e5b8f42 100644 --- a/tests/unit/test_async_templates_resource.py +++ b/tests/unit/test_async_templates_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncTemplates resource.""" +"""Tests for Templates resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.templates import AsyncTemplates +from mailersend.resources.templates import Templates from mailersend.models.base import APIResponse from mailersend.models.templates import ( TemplatesListRequest, @@ -22,10 +22,10 @@ def _make_mock_client(): return client -class TestAsyncTemplates: +class TestTemplates: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncTemplates(self.mock_client) + self.resource = Templates(self.mock_client) async def test_list_templates_returns_api_response(self): result = await self.resource.list_templates() diff --git a/tests/unit/test_async_tokens_resource.py b/tests/unit/test_async_tokens_resource.py index 7ff5ba3..f6a1f14 100644 --- a/tests/unit/test_async_tokens_resource.py +++ b/tests/unit/test_async_tokens_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncTokens resource.""" +"""Tests for Tokens resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.tokens import AsyncTokens +from mailersend.resources.tokens import Tokens from mailersend.models.base import APIResponse from mailersend.models.tokens import ( TokensListRequest, @@ -25,10 +25,10 @@ def _make_mock_client(): return client -class TestAsyncTokens: +class TestTokens: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncTokens(self.mock_client) + self.resource = Tokens(self.mock_client) async def test_list_tokens_returns_api_response(self): result = await self.resource.list_tokens(TokensListRequest()) diff --git a/tests/unit/test_async_users_resource.py b/tests/unit/test_async_users_resource.py index 5e77a2b..f4ec761 100644 --- a/tests/unit/test_async_users_resource.py +++ b/tests/unit/test_async_users_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncUsers resource.""" +"""Tests for Users resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.users import AsyncUsers +from mailersend.resources.users import Users from mailersend.models.base import APIResponse from mailersend.models.users import ( UsersListRequest, @@ -29,10 +29,10 @@ def _make_mock_client(): return client -class TestAsyncUsers: +class TestUsers: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncUsers(self.mock_client) + self.resource = Users(self.mock_client) async def test_list_users_returns_api_response(self): result = await self.resource.list_users(UsersListRequest()) diff --git a/tests/unit/test_async_webhooks_resource.py b/tests/unit/test_async_webhooks_resource.py index da82238..75c2935 100644 --- a/tests/unit/test_async_webhooks_resource.py +++ b/tests/unit/test_async_webhooks_resource.py @@ -1,8 +1,8 @@ -"""Tests for AsyncWebhooks resource.""" +"""Tests for Webhooks resource.""" from unittest.mock import AsyncMock, MagicMock -from mailersend.resources.webhooks import AsyncWebhooks +from mailersend.resources.webhooks import Webhooks from mailersend.models.base import APIResponse from mailersend.models.webhooks import ( WebhooksListRequest, @@ -24,10 +24,10 @@ def _make_mock_client(): return client -class TestAsyncWebhooks: +class TestWebhooks: def setup_method(self): self.mock_client = _make_mock_client() - self.resource = AsyncWebhooks(self.mock_client) + self.resource = Webhooks(self.mock_client) async def test_list_webhooks_returns_api_response(self): request = WebhooksListRequest( From ca5b5b7116c67f0420ee9c1113a1c1c39d8a061e Mon Sep 17 00:00:00 2001 From: rocribera Date: Wed, 3 Jun 2026 15:37:25 +0200 Subject: [PATCH 04/10] feat: set dual tests for sync and async --- mailersend/__init__.py | 6 +- mailersend/async_client.py | 171 +---- mailersend/base_client.py | 178 +++++ mailersend/client.py | 179 +---- tests/unit/test_activity_resource.py | 213 ++---- tests/unit/test_analytics_resource.py | 355 +++------- tests/unit/test_async_activity_resource.py | 67 -- tests/unit/test_async_analytics_resource.py | 87 --- tests/unit/test_async_client.py | 151 ++++- .../test_async_dmarc_monitoring_resource.py | 153 ----- tests/unit/test_async_domains_resource.py | 148 ----- .../test_async_email_verification_resource.py | 155 ----- tests/unit/test_async_identities_resource.py | 141 ---- tests/unit/test_async_inbound_resource.py | 124 ---- tests/unit/test_async_messages_resource.py | 58 -- tests/unit/test_async_other_resource.py | 32 - tests/unit/test_async_recipients_resource.py | 282 -------- tests/unit/test_async_schedules_resource.py | 64 -- .../unit/test_async_sms_activity_resource.py | 46 -- .../unit/test_async_sms_inbounds_resource.py | 100 --- .../unit/test_async_sms_messages_resource.py | 60 -- tests/unit/test_async_sms_numbers_resource.py | 74 --- .../test_async_sms_recipients_resource.py | 77 --- tests/unit/test_async_sms_sending_resource.py | 43 -- .../unit/test_async_sms_webhooks_resource.py | 109 ---- tests/unit/test_async_smtp_users_resource.py | 94 --- tests/unit/test_async_templates_resource.py | 72 -- tests/unit/test_async_tokens_resource.py | 105 --- tests/unit/test_async_users_resource.py | 133 ---- tests/unit/test_async_webhooks_resource.py | 103 --- tests/unit/test_client.py | 199 +++++- tests/unit/test_dmarc_monitoring_resource.py | 616 ++++-------------- tests/unit/test_domains_resource.py | 321 ++++----- ...ail_resource.py => test_email_resource.py} | 45 +- .../unit/test_email_verification_resource.py | 389 ++++------- tests/unit/test_identities_resource.py | 426 ++++-------- tests/unit/test_inbound_resource.py | 361 +++------- tests/unit/test_messages_resource.py | 185 ++---- tests/unit/test_other_resource.py | 47 ++ tests/unit/test_recipients_resource.py | 553 +++++++--------- tests/unit/test_schedules_resource.py | 235 ++----- tests/unit/test_sms_activity_resource.py | 135 ++-- tests/unit/test_sms_inbounds_resource.py | 217 +++--- tests/unit/test_sms_messages_resource.py | 116 ++-- tests/unit/test_sms_numbers_resource.py | 173 ++--- tests/unit/test_sms_recipients_resource.py | 143 ++-- tests/unit/test_sms_sending_resource.py | 118 ++-- tests/unit/test_sms_webhooks_resource.py | 193 +++--- tests/unit/test_smtp_users_resource.py | 301 +++------ tests/unit/test_templates_resource.py | 192 ++---- tests/unit/test_tokens_resource.py | 319 +++------ tests/unit/test_users_resource.py | 298 ++++----- tests/unit/test_webhooks_resource.py | 303 +++------ 53 files changed, 2645 insertions(+), 6820 deletions(-) create mode 100644 mailersend/base_client.py delete mode 100644 tests/unit/test_async_activity_resource.py delete mode 100644 tests/unit/test_async_analytics_resource.py delete mode 100644 tests/unit/test_async_dmarc_monitoring_resource.py delete mode 100644 tests/unit/test_async_domains_resource.py delete mode 100644 tests/unit/test_async_email_verification_resource.py delete mode 100644 tests/unit/test_async_identities_resource.py delete mode 100644 tests/unit/test_async_inbound_resource.py delete mode 100644 tests/unit/test_async_messages_resource.py delete mode 100644 tests/unit/test_async_other_resource.py delete mode 100644 tests/unit/test_async_recipients_resource.py delete mode 100644 tests/unit/test_async_schedules_resource.py delete mode 100644 tests/unit/test_async_sms_activity_resource.py delete mode 100644 tests/unit/test_async_sms_inbounds_resource.py delete mode 100644 tests/unit/test_async_sms_messages_resource.py delete mode 100644 tests/unit/test_async_sms_numbers_resource.py delete mode 100644 tests/unit/test_async_sms_recipients_resource.py delete mode 100644 tests/unit/test_async_sms_sending_resource.py delete mode 100644 tests/unit/test_async_sms_webhooks_resource.py delete mode 100644 tests/unit/test_async_smtp_users_resource.py delete mode 100644 tests/unit/test_async_templates_resource.py delete mode 100644 tests/unit/test_async_tokens_resource.py delete mode 100644 tests/unit/test_async_users_resource.py delete mode 100644 tests/unit/test_async_webhooks_resource.py rename tests/unit/{test_async_email_resource.py => test_email_resource.py} (65%) create mode 100644 tests/unit/test_other_resource.py diff --git a/mailersend/__init__.py b/mailersend/__init__.py index 1ec9e83..9a79ac3 100644 --- a/mailersend/__init__.py +++ b/mailersend/__init__.py @@ -5,7 +5,11 @@ """ from .client import MailerSendClient -from .async_client import AsyncMailerSendClient + +try: + from .async_client import AsyncMailerSendClient +except ImportError: + AsyncMailerSendClient = None # type: ignore[assignment,misc] # Import all builders for better UX - users can import everything from main module from .builders.email import EmailBuilder diff --git a/mailersend/async_client.py b/mailersend/async_client.py index e806f64..60d305a 100644 --- a/mailersend/async_client.py +++ b/mailersend/async_client.py @@ -1,11 +1,11 @@ import asyncio import logging -import os from typing import Any, Dict, Optional from urllib.parse import urljoin import httpx +from .base_client import _BaseMailerSendClient, RETRY_STATUSES from .constants import DEFAULT_BASE_URL, DEFAULT_TIMEOUT, USER_AGENT from .exceptions import ( AuthenticationError, @@ -15,36 +15,9 @@ ResourceNotFoundError, ServerError, ) -from .resources.activity import Activity -from .resources.analytics import Analytics -from .resources.dmarc_monitoring import DmarcMonitoring -from .resources.domains import Domains -from .resources.email import Email -from .resources.email_verification import EmailVerification -from .resources.identities import IdentitiesResource -from .resources.inbound import InboundResource -from .resources.messages import Messages -from .resources.other import Other -from .resources.recipients import Recipients -from .resources.schedules import Schedules -from .resources.sms_activity import SmsActivity -from .resources.sms_inbounds import SmsInbounds -from .resources.sms_messages import SmsMessages -from .resources.sms_numbers import SmsNumbers -from .resources.sms_recipients import SmsRecipients -from .resources.sms_sending import SmsSending -from .resources.sms_webhooks import SmsWebhooks -from .resources.smtp_users import SmtpUsers -from .resources.templates import Templates -from .resources.tokens import Tokens -from .resources.users import Users -from .resources.webhooks import Webhooks -from .logging import get_logger, RequestLogger -_RETRY_STATUSES = frozenset([429, 500, 502, 503, 504]) - -class AsyncMailerSendClient: +class AsyncMailerSendClient(_BaseMailerSendClient): """ Async client for the MailerSend API. @@ -56,8 +29,10 @@ class AsyncMailerSendClient: >>> async with AsyncMailerSendClient() as client: ... response = await client.emails.send(email_request) - >>> # Using explicit API key + >>> # Using explicit API key (remember to close when done) >>> client = AsyncMailerSendClient(api_key="your_api_key") + >>> response = await client.emails.send(email_request) + >>> await client.close() >>> # Enable debug logging for detailed request/response info >>> client = AsyncMailerSendClient(debug=True) @@ -88,21 +63,7 @@ def __init__( ValueError: If no API key is provided and MAILERSEND_API_KEY environment variable is not set """ - resolved_api_key = api_key or os.getenv("MAILERSEND_API_KEY") - - if not resolved_api_key: - raise ValueError( - "API key is required. Either pass it as 'api_key' parameter or " - "set the 'MAILERSEND_API_KEY' environment variable." - ) - - self.api_key = resolved_api_key - self.base_url = base_url - self.timeout = timeout - self.max_retries = max_retries - self.debug = debug - self.logger = logger or get_logger(debug=debug) - self.request_logger = RequestLogger(self.logger) + super().__init__(api_key, base_url, timeout, max_retries, debug, logger) self._client = httpx.AsyncClient( headers={ @@ -114,55 +75,7 @@ def __init__( timeout=self.timeout, ) - self.emails = Email(self) - self.activities = Activity(self) - self.analytics = Analytics(self) - self.domains = Domains(self) - self.identities = IdentitiesResource(self) - self.inbound = InboundResource(self) - self.templates = Templates(self) - self.tokens = Tokens(self) - self.webhooks = Webhooks(self) - self.email_verification = EmailVerification(self) - self.users = Users(self) - self.messages = Messages(self) - self.recipients = Recipients(self) - self.schedules = Schedules(self) - self.sms_messages = SmsMessages(self) - self.smtp_users = SmtpUsers(self) - self.sms_sending = SmsSending(self) - self.sms_numbers = SmsNumbers(self) - self.sms_activity = SmsActivity(self) - self.sms_inbounds = SmsInbounds(self) - self.sms_recipients = SmsRecipients(self) - self.sms_webhooks = SmsWebhooks(self) - self.api_quota = Other(self) - self.dmarc_monitoring = DmarcMonitoring(self) - - self.logger.info("AsyncMailerSendClient initialized successfully") - - def enable_debug(self) -> None: - """Enable debug logging for this client instance.""" - self.debug = True - self.logger.setLevel(logging.DEBUG) - self.logger.info("Debug mode enabled") - - def disable_debug(self) -> None: - """Disable debug logging for this client instance.""" - self.debug = False - self.logger.setLevel(logging.WARNING) - self.logger.info("Debug mode disabled") - - def get_debug_info(self) -> Dict[str, Any]: - """Get current debug and configuration information.""" - return { - "debug_enabled": self.debug, - "base_url": self.base_url, - "timeout": self.timeout, - "max_retries": self.max_retries, - "user_agent": USER_AGENT, - "logger_level": self.logger.level, - } + self.logger.info(f"{self.__class__.__name__} initialized successfully") async def request( self, @@ -194,8 +107,6 @@ async def request( url = urljoin(self.base_url, path) request_id = self.request_logger.start_request(method, url, params, body) - last_exception: Optional[Exception] = None - for attempt in range(self.max_retries + 1): try: response = await self._client.request( @@ -210,47 +121,30 @@ async def request( if 200 <= response.status_code < 300: return response - # Retry on transient errors (except on the last attempt) if ( - response.status_code in _RETRY_STATUSES + response.status_code in RETRY_STATUSES and attempt < self.max_retries ): if response.status_code == 429: retry_after = response.headers.get("retry-after") - delay = ( - float(retry_after) if retry_after else 0.3 * (2**attempt) - ) + try: + delay = ( + float(retry_after) + if retry_after + else 0.3 * (2**attempt) + ) + except ValueError: + delay = 0.3 * (2**attempt) else: delay = 0.3 * (2**attempt) self.request_logger.log_retry(attempt + 1, delay) await asyncio.sleep(delay) continue - error_message = self._get_error_message(response) - self.logger.error( - f"API error {response.status_code}: {error_message}", - extra={"request_id": request_id}, + self._raise_for_status( + response, self._get_error_message(response), request_id ) - if response.status_code == 401: - raise AuthenticationError(error_message, response) - elif response.status_code == 404: - raise ResourceNotFoundError(error_message, response) - elif response.status_code == 429: - retry_after = response.headers.get("retry-after") - remaining = response.headers.get("x-apiquota-remaining") - self.logger.warning( - f"Rate limit exceeded. Retry after: {retry_after}s, Remaining: {remaining}", - extra={"request_id": request_id}, - ) - raise RateLimitExceeded(error_message, response) - elif 400 <= response.status_code < 500: - raise BadRequestError(error_message, response) - elif 500 <= response.status_code < 600: - raise ServerError(error_message, response) - else: - raise MailerSendError(error_message, response) - except ( AuthenticationError, ResourceNotFoundError, @@ -261,7 +155,6 @@ async def request( ): raise except httpx.RequestError as e: - last_exception = e if attempt < self.max_retries: delay = 0.3 * (2**attempt) self.request_logger.log_retry(attempt + 1, delay) @@ -270,27 +163,6 @@ async def request( self.request_logger.log_error(e) raise MailerSendError(f"Request failed: {str(e)}") from e - # Should not be reached, but satisfies type checker - if last_exception: - raise MailerSendError(f"Request failed: {str(last_exception)}") - raise MailerSendError("Request failed after retries") - - def _get_error_message(self, response: httpx.Response) -> str: - try: - error_data = response.json() - if isinstance(error_data, dict): - message = error_data.get("message", "Unknown error") - errors = error_data.get("errors", {}) - if errors: - error_details = "; ".join( - f"{key}: {', '.join(msgs)}" for key, msgs in errors.items() - ) - return f"{message}: {error_details}" - return message - except Exception: - pass - return f"Error {response.status_code}: {response.text}" - async def close(self) -> None: """Close the underlying httpx client and release resources.""" await self._client.aclose() @@ -298,5 +170,10 @@ async def close(self) -> None: async def __aenter__(self) -> "AsyncMailerSendClient": return self - async def __aexit__(self, *_: Any) -> None: + async def __aexit__( + self, + exc_type: Optional[type], + exc_val: Optional[BaseException], + exc_tb: Optional[Any], + ) -> None: await self.close() diff --git a/mailersend/base_client.py b/mailersend/base_client.py new file mode 100644 index 0000000..c22d215 --- /dev/null +++ b/mailersend/base_client.py @@ -0,0 +1,178 @@ +"""Shared base client for MailerSendClient and AsyncMailerSendClient.""" + +import logging +import os +from typing import Any, Dict, NoReturn, Optional + +from .constants import DEFAULT_BASE_URL, DEFAULT_TIMEOUT, USER_AGENT +from .exceptions import ( + AuthenticationError, + BadRequestError, + MailerSendError, + RateLimitExceeded, + ResourceNotFoundError, + ServerError, +) +from .logging import get_logger, RequestLogger +from .resources.activity import Activity +from .resources.analytics import Analytics +from .resources.dmarc_monitoring import DmarcMonitoring +from .resources.domains import Domains +from .resources.email import Email +from .resources.email_verification import EmailVerification +from .resources.identities import IdentitiesResource +from .resources.inbound import InboundResource +from .resources.messages import Messages +from .resources.other import Other +from .resources.recipients import Recipients +from .resources.schedules import Schedules +from .resources.sms_activity import SmsActivity +from .resources.sms_inbounds import SmsInbounds +from .resources.sms_messages import SmsMessages +from .resources.sms_numbers import SmsNumbers +from .resources.sms_recipients import SmsRecipients +from .resources.sms_sending import SmsSending +from .resources.sms_webhooks import SmsWebhooks +from .resources.smtp_users import SmtpUsers +from .resources.templates import Templates +from .resources.tokens import Tokens +from .resources.users import Users +from .resources.webhooks import Webhooks + +# HTTP status codes that warrant a retry +RETRY_STATUSES: frozenset = frozenset([429, 500, 502, 503, 504]) + + +class _BaseMailerSendClient: + """ + Shared base for MailerSendClient and AsyncMailerSendClient. + + Handles API key resolution, resource initialisation, debug helpers, + and error parsing/dispatch. Subclasses provide the transport layer + (requests vs httpx) and the request() method (sync vs async). + """ + + def __init__( + self, + api_key: Optional[str] = None, + base_url: str = DEFAULT_BASE_URL, + timeout: int = DEFAULT_TIMEOUT, + max_retries: int = 3, + debug: bool = False, + logger: Optional[logging.Logger] = None, + ) -> None: + resolved_api_key = api_key or os.getenv("MAILERSEND_API_KEY") + if not resolved_api_key: + raise ValueError( + "API key is required. Either pass it as 'api_key' parameter or " + "set the 'MAILERSEND_API_KEY' environment variable." + ) + + self.api_key = resolved_api_key + self.base_url = base_url.rstrip("/") + "/" + self.timeout = timeout + self.max_retries = max_retries + self.debug = debug + self.logger = logger or get_logger(debug=debug) + self.request_logger = RequestLogger(self.logger) + + self._init_resources() + + def _init_resources(self) -> None: + """Instantiate all API resource objects.""" + self.emails = Email(self) + self.activities = Activity(self) + self.analytics = Analytics(self) + self.domains = Domains(self) + self.identities = IdentitiesResource(self) + self.inbound = InboundResource(self) + self.templates = Templates(self) + self.tokens = Tokens(self) + self.webhooks = Webhooks(self) + self.email_verification = EmailVerification(self) + self.users = Users(self) + self.messages = Messages(self) + self.recipients = Recipients(self) + self.schedules = Schedules(self) + self.sms_messages = SmsMessages(self) + self.smtp_users = SmtpUsers(self) + self.sms_sending = SmsSending(self) + self.sms_numbers = SmsNumbers(self) + self.sms_activity = SmsActivity(self) + self.sms_inbounds = SmsInbounds(self) + self.sms_recipients = SmsRecipients(self) + self.sms_webhooks = SmsWebhooks(self) + self.api_quota = Other(self) + self.dmarc_monitoring = DmarcMonitoring(self) + + @staticmethod + def _get_error_message(response: Any) -> str: + """Extract a human-readable error message from an HTTP response.""" + try: + error_data = response.json() + if isinstance(error_data, dict): + message = error_data.get("message", "Unknown error") + errors = error_data.get("errors", {}) + if errors: + error_details = "; ".join( + f"{key}: {', '.join(msgs)}" for key, msgs in errors.items() + ) + return f"{message}: {error_details}" + return message + except Exception: + pass + try: + return f"Error {response.status_code}: {response.text}" + except Exception: + return f"Error {response.status_code}: " + + def _raise_for_status( + self, response: Any, error_message: str, request_id: str + ) -> NoReturn: + """Log and raise the appropriate SDK exception for a non-2xx response.""" + self.logger.error( + f"API error {response.status_code}: {error_message}", + extra={"request_id": request_id}, + ) + if response.status_code == 401: + raise AuthenticationError(error_message, response) + elif response.status_code == 404: + raise ResourceNotFoundError(error_message, response) + elif response.status_code == 429: + retry_after = response.headers.get("retry-after") + remaining = response.headers.get("x-apiquota-remaining") + self.logger.warning( + f"Rate limit exceeded. Retry after: {retry_after}s, " + f"Remaining: {remaining}", + extra={"request_id": request_id}, + ) + raise RateLimitExceeded(error_message, response) + elif 400 <= response.status_code < 500: + raise BadRequestError(error_message, response) + elif 500 <= response.status_code < 600: + raise ServerError(error_message, response) + else: + raise MailerSendError(error_message, response) + + def enable_debug(self) -> None: + """Enable debug logging for this client instance.""" + self.debug = True + self.logger.setLevel(logging.DEBUG) + self.logger.info("Debug mode enabled") + + def disable_debug(self) -> None: + """Disable debug logging for this client instance.""" + self.debug = False + self.logger.setLevel(logging.WARNING) + self.logger.info("Debug mode disabled") + + def get_debug_info(self) -> Dict[str, Any]: + """Get current debug and configuration information.""" + return { + "debug_enabled": self.debug, + "base_url": self.base_url, + "timeout": self.timeout, + "max_retries": self.max_retries, + "user_agent": USER_AGENT, + "logger_level": self.logger.level, + } diff --git a/mailersend/client.py b/mailersend/client.py index 455c448..1ac5e06 100644 --- a/mailersend/client.py +++ b/mailersend/client.py @@ -1,49 +1,17 @@ import logging -import os -from typing import Optional, Dict, Any, Type, cast, Union +from typing import Any, Dict, Optional from urllib.parse import urljoin import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry +from .base_client import _BaseMailerSendClient, RETRY_STATUSES from .constants import DEFAULT_BASE_URL, DEFAULT_TIMEOUT, USER_AGENT -from .exceptions import ( - MailerSendError, - AuthenticationError, - RateLimitExceeded, - ResourceNotFoundError, - BadRequestError, - ServerError, -) -from .resources.email import Email -from .resources.activity import Activity -from .resources.analytics import Analytics -from .resources.domains import Domains -from .resources.identities import IdentitiesResource -from .resources.inbound import InboundResource -from .resources.templates import Templates -from .resources.tokens import Tokens -from .resources.webhooks import Webhooks -from .resources.email_verification import EmailVerification -from .resources.users import Users -from .resources.messages import Messages -from .resources.recipients import Recipients -from .resources.schedules import Schedules -from .resources.smtp_users import SmtpUsers -from .resources.sms_activity import SmsActivity -from .resources.sms_inbounds import SmsInbounds -from .resources.sms_messages import SmsMessages -from .resources.sms_numbers import SmsNumbers -from .resources.sms_recipients import SmsRecipients -from .resources.sms_sending import SmsSending -from .resources.sms_webhooks import SmsWebhooks -from .resources.other import Other -from .resources.dmarc_monitoring import DmarcMonitoring -from .logging import get_logger, RequestLogger +from .exceptions import MailerSendError -class MailerSendClient: +class MailerSendClient(_BaseMailerSendClient): """ Main client for the MailerSend API. @@ -58,8 +26,9 @@ class MailerSendClient: >>> # Using explicit API key >>> client = MailerSendClient(api_key="your_api_key") - >>> # Enable debug logging for detailed request/response info - >>> client = MailerSendClient(debug=True) + >>> # Use as a context manager to ensure the session is closed + >>> with MailerSendClient() as client: + ... response = client.emails.send(email_request) """ def __init__( @@ -87,35 +56,18 @@ def __init__( ValueError: If no API key is provided and MAILERSEND_API_KEY environment variable is not set """ - # Try to get API key from environment variable first, then from parameter - resolved_api_key = api_key or os.getenv("MAILERSEND_API_KEY") + super().__init__(api_key, base_url, timeout, max_retries, debug, logger) - if not resolved_api_key: - raise ValueError( - "API key is required. Either pass it as 'api_key' parameter or " - "set the 'MAILERSEND_API_KEY' environment variable." - ) - - self.api_key = resolved_api_key - self.base_url = base_url - self.timeout = timeout - self.debug = debug - self.logger = logger or get_logger(debug=debug) - self.request_logger = RequestLogger(self.logger) - - # Initialize session with retry logic self.session = requests.Session() retry_strategy = Retry( total=max_retries, backoff_factor=0.3, - status_forcelist=[429, 500, 502, 503, 504], + status_forcelist=sorted(RETRY_STATUSES), allowed_methods=["GET", "POST", "PUT", "DELETE", "PATCH"], ) adapter = HTTPAdapter(max_retries=retry_strategy) self.session.mount("https://", adapter) self.session.mount("http://", adapter) - - # Set default headers self.session.headers.update( { "Authorization": f"Bearer {self.api_key}", @@ -125,35 +77,9 @@ def __init__( } ) - # Initialize resources - self.emails = Email(self) - self.activities = Activity(self) - self.analytics = Analytics(self) - self.domains = Domains(self) - self.identities = IdentitiesResource(self) - self.inbound = InboundResource(self) - self.templates = Templates(self) - self.tokens = Tokens(self) - self.webhooks = Webhooks(self) - self.email_verification = EmailVerification(self) - self.users = Users(self) - self.messages = Messages(self) - self.recipients = Recipients(self) - self.schedules = Schedules(self) - self.sms_messages = SmsMessages(self) - self.smtp_users = SmtpUsers(self) - self.sms_sending = SmsSending(self) - self.sms_numbers = SmsNumbers(self) - self.sms_activity = SmsActivity(self) - self.sms_inbounds = SmsInbounds(self) - self.sms_recipients = SmsRecipients(self) - self.sms_webhooks = SmsWebhooks(self) - self.api_quota = Other(self) - self.dmarc_monitoring = DmarcMonitoring(self) - - self.logger.info("MailerSend client initialized successfully") + self.logger.info(f"{self.__class__.__name__} initialized successfully") if debug: - self.logger.info("🐛 Debug mode enabled - detailed logging active") + self.logger.info("Debug mode enabled") def request( self, @@ -183,92 +109,33 @@ def request( MailerSendError: For other API errors """ url = urljoin(self.base_url, path) - - # Start request logging request_id = self.request_logger.start_request(method, url, params, body) try: response = self.session.request( method=method, url=url, params=params, json=body, timeout=self.timeout ) - - # Log response details self.request_logger.log_response(response) - # Handle different response status codes if 200 <= response.status_code < 300: return response - # Handle error responses - error_message = self._get_error_message(response) - - # Log the error details before raising - self.logger.error( - f"API error {response.status_code}: {error_message}", - extra={"request_id": request_id}, + self._raise_for_status( + response, self._get_error_message(response), request_id ) - if response.status_code == 401: - raise AuthenticationError(error_message, response) - elif response.status_code == 404: - raise ResourceNotFoundError(error_message, response) - elif response.status_code == 429: - # Log rate limit details - retry_after = response.headers.get("retry-after") - remaining = response.headers.get("x-apiquota-remaining") - self.logger.warning( - f"⚠️ Rate limit exceeded. Retry after: {retry_after}s, Remaining: {remaining}", - extra={"request_id": request_id}, - ) - raise RateLimitExceeded(error_message, response) - elif 400 <= response.status_code < 500: - raise BadRequestError(error_message, response) - elif 500 <= response.status_code < 600: - raise ServerError(error_message, response) - else: - raise MailerSendError(error_message, response) - except requests.RequestException as e: self.request_logger.log_error(e) - raise MailerSendError(f"Request failed: {str(e)}") - - def _get_error_message(self, response: requests.Response) -> str: - """Extract error message from response.""" - try: - error_data = response.json() - if isinstance(error_data, dict): - message = error_data.get("message", "Unknown error") - errors = error_data.get("errors", {}) - if errors: - error_details = "; ".join( - f"{key}: {', '.join(msgs)}" for key, msgs in errors.items() - ) - return f"{message}: {error_details}" - return message - except Exception: - pass - - return f"Error {response.status_code}: {response.text}" - - def enable_debug(self): - """Enable debug logging for this client instance.""" - self.debug = True - self.logger.setLevel(logging.DEBUG) - self.logger.info("🐛 Debug mode enabled") - - def disable_debug(self): - """Disable debug logging for this client instance.""" - self.debug = False - self.logger.setLevel(logging.WARNING) - self.logger.info("Debug mode disabled") + raise MailerSendError(f"Request failed: {str(e)}") from e def get_debug_info(self) -> Dict[str, Any]: """Get current debug and configuration information.""" - return { - "debug_enabled": self.debug, - "base_url": self.base_url, - "timeout": self.timeout, - "user_agent": USER_AGENT, - "logger_level": self.logger.level, - "session_adapters": list(self.session.adapters.keys()), - } + info = super().get_debug_info() + info["session_adapters"] = list(self.session.adapters.keys()) + return info + + def __enter__(self) -> "MailerSendClient": + return self + + def __exit__(self, *_: Any) -> None: + self.session.close() diff --git a/tests/unit/test_activity_resource.py b/tests/unit/test_activity_resource.py index c1c2260..85c0002 100644 --- a/tests/unit/test_activity_resource.py +++ b/tests/unit/test_activity_resource.py @@ -1,6 +1,8 @@ +"""Tests for Activity resource.""" +import inspect + +from unittest.mock import AsyncMock, MagicMock, Mock import pytest -from unittest.mock import Mock, patch -from requests import Response from mailersend.resources.activity import Activity from mailersend.models.activity import ( @@ -9,159 +11,72 @@ SingleActivityRequest, ) from mailersend.models.base import APIResponse -from mailersend.exceptions import ValidationError - - -class TestActivityResource: - """Test the Activity resource class.""" - - @pytest.fixture - def activity_resource(self): - """Create an Activity resource instance with a mocked client.""" - mock_client = Mock() - return Activity(mock_client) - @pytest.fixture - def mock_response(self): - """Create a mock HTTP response.""" - response = Mock(spec=Response) - response.status_code = 200 - response.headers = {"Content-Type": "application/json"} - response.json.return_value = { - "data": { - "id": "5ee0b166b251345e407c9207", - "created_at": "2020-06-04 12:00:00", - "updated_at": "2020-06-04 12:00:00", - "type": "clicked", - "email": { - "id": "5ee0b166b251345e407c9201", - "from": "colleen.wiza@example.net", - "subject": "Magni aperiam sunt nam omnis.", - "text": "Lorem ipsum dolor sit amet, consectetuer adipiscin", - "html": " Date: Wed, 3 Jun 2026 16:40:47 +0200 Subject: [PATCH 05/10] feat: move async section in README --- README.md | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5d0881d..0e8e389 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ MailerSend Python SDK - [Builder Pattern](#builder-pattern) - [Resource Classes](#resource-classes) - [Request and Response Models](#request-and-response-models) + - [Async Support](#async-support) - [Response Data Access](#response-data-access) - [Multiple Access Patterns](#multiple-access-patterns) - [Dict-like Access](#dict-like-access) @@ -181,7 +182,7 @@ MailerSend Python SDK - [Remove IP from favorites](#remove-ip-from-favorites) - [Other Endpoints](#other-endpoints) - [Get API Quota](#get-api-quota) - - [Async Support](#async-support) + - [Async Usage](#async-usage) - [Basic Async Usage](#basic-async-usage) - [Concurrent Requests](#concurrent-requests) - [Async Error Handling](#async-error-handling) @@ -320,6 +321,32 @@ print(response.number) # Validated phone number print(response.created_at) # Validated datetime object ``` +## Async Support + +The SDK ships an async client built on [`httpx`](https://www.python-httpx.org/) for use in async applications (FastAPI, asyncio, etc.). It exposes the exact same resource namespaces and builder/model interfaces as the sync client. + +```python +from mailersend import AsyncMailerSendClient + +# Recommended — use as an async context manager +async with AsyncMailerSendClient() as client: + response = await client.emails.send(email_request) + print(response["id"]) +``` + +The async client accepts the same configuration parameters: + +```python +client = AsyncMailerSendClient( + api_key="your_api_key", # or set MAILERSEND_API_KEY env var + timeout=30, + max_retries=3, + debug=True, +) +``` + +Retries, rate-limit handling, and the error exception hierarchy (`AuthenticationError`, `RateLimitExceeded`, `ServerError`, etc.) behave identically to the sync client. + # Response Data Access @@ -2645,11 +2672,11 @@ ms = MailerSendClient() response = ms.api_quota.get_quota() ``` - + -## Async Support +## Async Usage -The SDK provides a fully async-compatible client, `AsyncMailerSendClient`, built on `httpx.AsyncClient`. It exposes the same resources and methods as the synchronous `MailerSendClient` — prefixed with `async`/`await` — so you can use it anywhere `asyncio` is available. +The `AsyncMailerSendClient` exposes the same resources and methods as the synchronous `MailerSendClient` — prefixed with `async`/`await` — so you can use it anywhere `asyncio` is available. ### Basic Async Usage From 875923dfc4b40217379c14d3f0933f8c0480b415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Hr=C4=8Dek?= Date: Mon, 6 Jul 2026 15:32:40 +0200 Subject: [PATCH 06/10] feat: Test updates, merge conflit fixes --- mailersend/resources/activity.py | 2 - mailersend/resources/analytics.py | 2 - mailersend/resources/base.py | 3 +- mailersend/resources/dmarc_monitoring.py | 2 - mailersend/resources/domains.py | 6 +- mailersend/resources/email.py | 2 - mailersend/resources/email_verification.py | 14 +- mailersend/resources/identities.py | 18 +- mailersend/resources/inbound.py | 2 - mailersend/resources/messages.py | 2 - mailersend/resources/other.py | 2 - mailersend/resources/recipients.py | 26 +- mailersend/resources/schedules.py | 2 - mailersend/resources/sms_activity.py | 2 - mailersend/resources/sms_inbounds.py | 2 - mailersend/resources/sms_messages.py | 2 - mailersend/resources/sms_numbers.py | 6 +- mailersend/resources/sms_recipients.py | 2 - mailersend/resources/sms_sending.py | 2 - mailersend/resources/sms_webhooks.py | 2 - mailersend/resources/smtp_users.py | 2 - mailersend/resources/templates.py | 10 +- mailersend/resources/tokens.py | 2 - mailersend/resources/users.py | 10 +- mailersend/resources/webhooks.py | 10 +- pyproject.toml | 29 +- .../cassettes/activity_builder_basic.yaml | 16 +- .../activity_builder_datetime_conversion.yaml | 16 +- .../activity_builder_with_events.yaml | 16 +- .../cassettes/activity_get_basic.yaml | 16 +- .../activity_get_delivery_events.yaml | 16 +- .../cassettes/activity_get_empty_result.yaml | 16 +- .../activity_get_engagement_events.yaml | 16 +- .../cassettes/activity_get_max_limit.yaml | 16 +- .../cassettes/activity_get_min_limit.yaml | 16 +- .../cassettes/activity_get_single_event.yaml | 16 +- .../activity_get_single_not_found.yaml | 16 +- .../cassettes/activity_get_with_datetime.yaml | 16 +- .../cassettes/activity_get_with_events.yaml | 16 +- .../activity_get_with_pagination.yaml | 16 +- .../analytics_comprehensive_test.yaml | 72 +- .../cassettes/analytics_country_basic.yaml | 18 +- .../analytics_country_with_tags.yaml | 18 +- .../cassettes/analytics_date_all_events.yaml | 18 +- .../cassettes/analytics_date_basic.yaml | 18 +- .../analytics_date_builder_helpers.yaml | 36 +- .../cassettes/analytics_date_with_domain.yaml | 18 +- .../cassettes/analytics_date_with_tags.yaml | 18 +- .../cassettes/analytics_error_no_events.yaml | 25 +- .../analytics_reading_env_basic.yaml | 18 +- ...analytics_reading_env_with_recipients.yaml | 18 +- .../cassettes/analytics_user_agent_basic.yaml | 19 +- .../analytics_user_agent_with_domain.yaml | 19 +- .../cassettes/domains_create_minimal.yaml | 38 +- .../cassettes/domains_delete_not_found.yaml | 16 +- .../cassettes/domains_delete_success.yaml | 34 +- .../domains_dns_records_not_found.yaml | 16 +- .../domains_dns_records_success.yaml | 14 +- .../cassettes/domains_get_not_found.yaml | 16 +- .../cassettes/domains_get_success.yaml | 18 +- .../cassettes/domains_list_basic.yaml | 26 +- .../cassettes/domains_list_builder.yaml | 26 +- .../cassettes/domains_list_pagination.yaml | 18 +- .../cassettes/domains_list_verified.yaml | 26 +- .../cassettes/domains_recipients_basic.yaml | 16 +- .../cassettes/domains_recipients_builder.yaml | 16 +- .../domains_recipients_pagination.yaml | 16 +- .../cassettes/domains_settings_workflow.yaml | 72 +- .../domains_update_settings_builder.yaml | 18 +- .../domains_update_settings_pause.yaml | 18 +- .../domains_update_settings_tracking.yaml | 18 +- .../domains_verification_not_found.yaml | 16 +- .../domains_verification_status.yaml | 14 +- tests/fixtures/cassettes/email_send_bulk.yaml | 28 +- .../cassettes/email_send_bulk_workflow.yaml | 46 +- .../cassettes/email_send_text_only.yaml | 26 +- .../email_send_with_attachments.yaml | 26 +- .../email_send_with_base_params.yaml | 26 +- .../cassettes/email_send_with_cc_bcc.yaml | 28 +- .../cassettes/email_send_with_headers.yaml | 28 +- .../cassettes/email_send_with_reply_to.yaml | 24 +- .../cassettes/email_send_with_tags.yaml | 26 +- .../cassettes/email_send_with_template.yaml | 28 +- .../email_send_with_text_priority.yaml | 26 +- .../cassettes/email_send_with_threading.yaml | 27 +- .../cassettes/email_send_with_tracking.yaml | 28 +- ...l_verification_api_response_structure.yaml | 26 +- ...l_verification_comprehensive_workflow.yaml | 77 ++- .../email_verification_create_list.yaml | 16 +- .../email_verification_empty_list.yaml | 26 +- .../email_verification_get_not_found.yaml | 16 +- .../email_verification_get_results.yaml | 16 +- .../email_verification_get_single.yaml | 16 +- .../email_verification_list_basic.yaml | 25 +- ...ail_verification_list_with_pagination.yaml | 26 +- .../email_verification_verify_list.yaml | 16 +- .../identities_create_not_available.yaml | 20 +- .../cassettes/identities_delete_by_email.yaml | 14 +- .../cassettes/identities_delete_by_id.yaml | 16 +- .../cassettes/identities_get_by_email.yaml | 14 +- .../cassettes/identities_get_single.yaml | 16 +- .../cassettes/identities_update_by_email.yaml | 14 +- .../cassettes/identities_update_by_id.yaml | 16 +- .../inbound_api_response_structure.yaml | 22 +- ...inbound_builder_create_invalid_domain.yaml | 112 +--- .../inbound_builder_get_not_found.yaml | 16 +- .../cassettes/inbound_builder_list_basic.yaml | 22 +- .../inbound_builder_list_with_domain.yaml | 21 +- .../inbound_comprehensive_workflow.yaml | 140 ---- .../inbound_create_invalid_domain.yaml | 18 +- .../cassettes/inbound_delete_not_found.yaml | 16 +- .../cassettes/inbound_empty_result.yaml | 22 +- .../cassettes/inbound_get_not_found.yaml | 16 +- .../cassettes/inbound_list_basic.yaml | 22 +- .../inbound_list_with_domain_filter.yaml | 21 +- .../inbound_list_with_pagination.yaml | 22 +- .../cassettes/inbound_update_not_found.yaml | 20 +- tests/fixtures/cassettes/invites_cancel.yaml | 16 +- .../cassettes/invites_get_single.yaml | 16 +- .../cassettes/invites_list_basic.yaml | 18 +- tests/fixtures/cassettes/invites_resend.yaml | 16 +- .../messages_api_response_structure.yaml | 16 +- .../messages_builder_get_not_found.yaml | 16 +- .../messages_builder_list_basic.yaml | 16 +- ...ssages_builder_list_with_custom_limit.yaml | 16 +- .../messages_comprehensive_workflow.yaml | 64 +- .../cassettes/messages_empty_result.yaml | 16 +- .../cassettes/messages_get_not_found.yaml | 16 +- .../cassettes/messages_list_basic.yaml | 16 +- .../messages_list_different_limit.yaml | 16 +- .../messages_list_with_pagination.yaml | 16 +- .../recipients_add_hard_bounces.yaml | 14 +- .../recipients_add_spam_complaints.yaml | 14 +- .../recipients_add_to_blocklist.yaml | 14 +- .../recipients_add_unsubscribes.yaml | 14 +- .../recipients_api_response_structure.yaml | 16 +- .../cassettes/recipients_blocklist_basic.yaml | 16 +- .../recipients_comprehensive_workflow.yaml | 14 +- .../recipients_delete_from_blocklist.yaml | 14 +- .../cassettes/recipients_delete_success.yaml | 16 +- .../cassettes/recipients_empty_list.yaml | 16 +- .../cassettes/recipients_get_single.yaml | 16 +- .../recipients_hard_bounces_basic.yaml | 18 +- .../cassettes/recipients_list_basic.yaml | 16 +- .../recipients_list_with_pagination.yaml | 16 +- .../recipients_spam_complaints_basic.yaml | 16 +- .../recipients_unsubscribes_basic.yaml | 16 +- .../schedules_api_response_structure.yaml | 21 +- .../fixtures/cassettes/schedules_delete.yaml | 14 +- .../cassettes/schedules_empty_result.yaml | 21 +- .../cassettes/schedules_get_single.yaml | 14 +- .../cassettes/schedules_list_basic.yaml | 21 +- .../schedules_list_with_domain_filter.yaml | 21 +- .../schedules_list_with_pagination.yaml | 21 +- .../schedules_list_with_status_filter.yaml | 21 +- .../sms_activity_api_response_structure.yaml | 16 +- .../sms_activity_builder_get_not_found.yaml | 16 +- .../sms_activity_builder_list_basic.yaml | 16 +- ...ms_activity_builder_list_with_filters.yaml | 25 +- ...activity_builder_list_with_sms_number.yaml | 14 +- .../sms_activity_comprehensive_workflow.yaml | 73 +- .../cassettes/sms_activity_empty_result.yaml | 16 +- .../sms_activity_get_message_not_found.yaml | 16 +- .../cassettes/sms_activity_list_basic.yaml | 16 +- .../sms_activity_list_with_date_range.yaml | 25 +- .../sms_activity_list_with_pagination.yaml | 16 +- ..._activity_list_with_sms_number_filter.yaml | 14 +- .../sms_activity_list_with_status_filter.yaml | 16 +- .../sms_messages_api_response_structure.yaml | 18 +- .../sms_messages_comprehensive_workflow.yaml | 18 +- .../cassettes/sms_messages_get_not_found.yaml | 44 -- .../cassettes/sms_messages_get_single.yaml | 16 +- .../cassettes/sms_messages_list_basic.yaml | 18 +- .../cassettes/sms_messages_list_empty.yaml | 18 +- .../sms_messages_list_with_filters.yaml | 18 +- .../sms_messages_list_with_pagination.yaml | 18 +- .../sms_numbers_api_response_structure.yaml | 18 +- .../sms_numbers_delete_not_found.yaml | 16 +- .../cassettes/sms_numbers_empty_result.yaml | 18 +- .../cassettes/sms_numbers_get_not_found.yaml | 16 +- .../sms_numbers_list_active_only.yaml | 18 +- .../cassettes/sms_numbers_list_basic.yaml | 18 +- .../sms_numbers_list_paused_only.yaml | 18 +- .../sms_numbers_list_with_filters.yaml | 18 +- .../sms_numbers_update_not_found.yaml | 16 +- .../cassettes/sms_numbers_update_pause.yaml | 16 +- .../cassettes/sms_numbers_update_unpause.yaml | 16 +- ...sms_recipients_api_response_structure.yaml | 16 +- .../sms_recipients_builder_get_not_found.yaml | 16 +- .../sms_recipients_builder_list_basic.yaml | 16 +- ...cipients_builder_list_with_sms_number.yaml | 14 +- ...s_recipients_builder_list_with_status.yaml | 16 +- ...s_recipients_builder_update_not_found.yaml | 16 +- ...sms_recipients_comprehensive_workflow.yaml | 64 +- .../sms_recipients_empty_result.yaml | 16 +- .../sms_recipients_get_not_found.yaml | 16 +- .../cassettes/sms_recipients_list_basic.yaml | 16 +- .../sms_recipients_list_with_pagination.yaml | 16 +- ...ecipients_list_with_sms_number_filter.yaml | 14 +- ...ms_recipients_list_with_status_filter.yaml | 16 +- .../sms_recipients_update_not_found.yaml | 16 +- tests/fixtures/cassettes/sms_send_basic.yaml | 20 +- .../cassettes/sms_send_long_message.yaml | 16 +- .../sms_send_multiple_recipients.yaml | 20 +- .../sms_send_with_personalization.yaml | 16 +- ...ms_webhooks_create_invalid_sms_number.yaml | 19 +- .../sms_webhooks_create_with_all_events.yaml | 19 +- .../sms_webhooks_delete_not_found.yaml | 16 +- .../cassettes/sms_webhooks_get_not_found.yaml | 16 +- .../cassettes/sms_webhooks_list_basic.yaml | 14 +- ...webhooks_list_with_invalid_sms_number.yaml | 14 +- .../sms_webhooks_update_disable.yaml | 16 +- .../sms_webhooks_update_not_found.yaml | 16 +- .../smtp_users_api_response_structure.yaml | 17 +- ...p_users_builder_create_invalid_domain.yaml | 16 +- .../smtp_users_builder_delete_not_found.yaml | 16 +- .../smtp_users_builder_get_not_found.yaml | 16 +- .../smtp_users_builder_list_basic.yaml | 17 +- ..._users_builder_list_with_custom_limit.yaml | 17 +- .../smtp_users_builder_update_not_found.yaml | 16 +- .../smtp_users_comprehensive_workflow.yaml | 82 ++- .../smtp_users_create_invalid_domain.yaml | 16 +- .../smtp_users_delete_not_found.yaml | 16 +- .../cassettes/smtp_users_empty_result.yaml | 17 +- .../cassettes/smtp_users_get_not_found.yaml | 16 +- .../cassettes/smtp_users_list_basic.yaml | 17 +- .../smtp_users_list_invalid_domain.yaml | 16 +- .../cassettes/smtp_users_list_with_limit.yaml | 17 +- .../smtp_users_update_not_found.yaml | 16 +- .../templates_api_response_structure.yaml | 18 +- .../fixtures/cassettes/templates_delete.yaml | 16 +- .../cassettes/templates_empty_result.yaml | 18 +- .../cassettes/templates_get_single.yaml | 16 +- .../cassettes/templates_list_basic.yaml | 18 +- .../cassettes/templates_list_no_params.yaml | 18 +- .../templates_list_with_domain_filter.yaml | 16 +- .../templates_list_with_pagination.yaml | 18 +- .../tokens_api_response_structure.yaml | 39 +- .../tokens_builder_create_basic.yaml | 20 +- .../tokens_builder_delete_not_found.yaml | 16 +- .../tokens_builder_get_not_found.yaml | 16 +- .../cassettes/tokens_builder_list_basic.yaml | 39 +- ...tokens_builder_list_with_custom_limit.yaml | 63 +- .../tokens_builder_update_name_not_found.yaml | 16 +- .../tokens_builder_update_not_found.yaml | 16 +- .../tokens_comprehensive_workflow.yaml | 147 +++-- .../cassettes/tokens_create_basic.yaml | 20 +- .../cassettes/tokens_delete_not_found.yaml | 16 +- .../cassettes/tokens_empty_result.yaml | 39 +- .../cassettes/tokens_get_not_found.yaml | 16 +- .../fixtures/cassettes/tokens_list_basic.yaml | 38 +- .../tokens_list_different_limit.yaml | 61 +- .../tokens_list_with_pagination.yaml | 38 +- .../tokens_update_name_not_found.yaml | 16 +- .../cassettes/tokens_update_not_found.yaml | 16 +- .../users_api_response_structure.yaml | 34 +- tests/fixtures/cassettes/users_delete.yaml | 14 +- .../cassettes/users_empty_result.yaml | 34 +- .../fixtures/cassettes/users_get_single.yaml | 14 +- tests/fixtures/cassettes/users_invite.yaml | 14 +- .../fixtures/cassettes/users_list_basic.yaml | 34 +- .../cassettes/users_list_with_pagination.yaml | 34 +- tests/fixtures/cassettes/users_update.yaml | 14 +- .../webhooks_api_response_structure.yaml | 23 +- .../webhooks_builder_create_basic.yaml | 75 ++- .../webhooks_builder_delete_not_found.yaml | 16 +- .../webhooks_builder_get_not_found.yaml | 16 +- .../webhooks_builder_list_basic.yaml | 23 +- .../webhooks_builder_update_not_found.yaml | 16 +- .../webhooks_comprehensive_workflow.yaml | 160 +++-- .../cassettes/webhooks_create_basic.yaml | 32 +- .../webhooks_create_invalid_domain.yaml | 70 +- .../cassettes/webhooks_delete_not_found.yaml | 16 +- .../cassettes/webhooks_empty_result.yaml | 23 +- .../cassettes/webhooks_get_not_found.yaml | 16 +- .../cassettes/webhooks_list_basic.yaml | 22 +- .../webhooks_list_invalid_domain.yaml | 14 +- .../cassettes/webhooks_update_not_found.yaml | 16 +- tests/integration/test_analytics.py | 17 +- tests/integration/test_inbound.py | 10 +- tests/integration/test_recipients.py | 2 - tests/integration/test_smtp_users.py | 1 - tests/integration/test_webhooks.py | 2 +- tests/unit/test_activity_resource.py | 14 +- tests/unit/test_analytics_resource.py | 19 +- tests/unit/test_async_client.py | 151 +++-- tests/unit/test_client.py | 114 ++-- tests/unit/test_dmarc_monitoring_resource.py | 20 +- tests/unit/test_domains_resource.py | 58 +- tests/unit/test_email_resource.py | 15 +- .../unit/test_email_verification_resource.py | 70 +- tests/unit/test_identities_resource.py | 54 +- tests/unit/test_inbound_resource.py | 23 +- tests/unit/test_messages_resource.py | 18 +- tests/unit/test_other_resource.py | 14 +- tests/unit/test_recipients_resource.py | 66 +- tests/unit/test_schedules_resource.py | 30 +- tests/unit/test_sms_activity_resource.py | 18 +- tests/unit/test_sms_inbounds_resource.py | 38 +- tests/unit/test_sms_messages_resource.py | 26 +- tests/unit/test_sms_numbers_resource.py | 38 +- tests/unit/test_sms_recipients_resource.py | 30 +- tests/unit/test_sms_sending_resource.py | 14 +- tests/unit/test_sms_webhooks_resource.py | 34 +- tests/unit/test_smtp_users_resource.py | 14 +- tests/unit/test_templates_resource.py | 30 +- tests/unit/test_tokens_resource.py | 22 +- tests/unit/test_users_resource.py | 38 +- tests/unit/test_webhooks_resource.py | 26 +- uv.lock | 623 +++++++++++------- 310 files changed, 4403 insertions(+), 3235 deletions(-) delete mode 100644 tests/fixtures/cassettes/inbound_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/sms_messages_get_not_found.yaml diff --git a/mailersend/resources/activity.py b/mailersend/resources/activity.py index 41e7475..1f51512 100644 --- a/mailersend/resources/activity.py +++ b/mailersend/resources/activity.py @@ -46,5 +46,3 @@ def get_single(self, request: SingleActivityRequest) -> APIResponse: self.logger.debug("Getting single activity: %s", request.activity_id) return self._request(method="GET", path=f"activities/{request.activity_id}") - - diff --git a/mailersend/resources/analytics.py b/mailersend/resources/analytics.py index 5c94687..741145c 100644 --- a/mailersend/resources/analytics.py +++ b/mailersend/resources/analytics.py @@ -121,5 +121,3 @@ def _build_query_params( params.pop(f"{field}[]", None) return params - - diff --git a/mailersend/resources/base.py b/mailersend/resources/base.py index 7977955..eae1f59 100644 --- a/mailersend/resources/base.py +++ b/mailersend/resources/base.py @@ -60,11 +60,13 @@ def _request(self, method, path, params=None, body=None, data=None) -> Any: result = self.client.request(**kwargs) if inspect.isawaitable(result): + async def resolve(): response = await result if data is not None: return self._create_response(response, data(response)) return self._create_response(response) + return resolve() if data is not None: @@ -127,5 +129,4 @@ def _process_response( return response_data - pass diff --git a/mailersend/resources/dmarc_monitoring.py b/mailersend/resources/dmarc_monitoring.py index 9382cf4..84436b6 100644 --- a/mailersend/resources/dmarc_monitoring.py +++ b/mailersend/resources/dmarc_monitoring.py @@ -203,5 +203,3 @@ def remove_ip_favorite( method="DELETE", path=f"dmarc-monitoring/{request.monitor_id}/favorite/{request.ip}", ) - - diff --git a/mailersend/resources/domains.py b/mailersend/resources/domains.py index abeed74..edae241 100644 --- a/mailersend/resources/domains.py +++ b/mailersend/resources/domains.py @@ -181,8 +181,4 @@ def get_domain_verification_status( "Retrieving verification status for domain: %s", request.domain_id ) - return self._request( - method="GET", path=f"domains/{request.domain_id}/verify" - ) - - + return self._request(method="GET", path=f"domains/{request.domain_id}/verify") diff --git a/mailersend/resources/email.py b/mailersend/resources/email.py index 4b641e2..5096225 100644 --- a/mailersend/resources/email.py +++ b/mailersend/resources/email.py @@ -73,5 +73,3 @@ def get_bulk_status(self, bulk_email_id: str) -> APIResponse: self.logger.debug("Getting bulk email status") return self._request(method="GET", path=f"bulk-email/{bulk_email_id}") - - diff --git a/mailersend/resources/email_verification.py b/mailersend/resources/email_verification.py index 1c8e629..841ee99 100644 --- a/mailersend/resources/email_verification.py +++ b/mailersend/resources/email_verification.py @@ -34,9 +34,7 @@ def verify_email(self, request: EmailVerifyRequest) -> APIResponse: self.logger.debug("Verifying email address: %s", body) # Make API call - return self._request( - method="POST", path="email-verification/verify", body=body - ) + return self._request(method="POST", path="email-verification/verify", body=body) def verify_email_async(self, request: EmailVerifyAsyncRequest) -> APIResponse: """Verify a single email address (asynchronous). @@ -102,9 +100,7 @@ def list_verifications(self, request: EmailVerificationListsRequest) -> APIRespo self.logger.debug("Listing email verification lists with params: %s", params) # Make API call - return self._request( - method="GET", path="email-verification", params=params - ) + return self._request(method="GET", path="email-verification", params=params) def get_verification(self, request: EmailVerificationGetRequest) -> APIResponse: """Get a single email verification list. @@ -150,9 +146,7 @@ def create_verification( ) # Make API call - return self._request( - method="POST", path="email-verification", body=body - ) + return self._request(method="POST", path="email-verification", body=body) def verify_list(self, request: EmailVerificationVerifyRequest) -> APIResponse: """Start verification of an email verification list. @@ -200,5 +194,3 @@ def get_results(self, request: EmailVerificationResultsRequest) -> APIResponse: path=f"email-verification/{request.email_verification_id}/results", params=params, ) - - diff --git a/mailersend/resources/identities.py b/mailersend/resources/identities.py index 8598df0..1f03ffd 100644 --- a/mailersend/resources/identities.py +++ b/mailersend/resources/identities.py @@ -77,9 +77,7 @@ def get_identity(self, request: IdentityGetRequest) -> APIResponse: self.logger.debug("Preparing to get identity with ID: %s", request.identity_id) # Make API request - return self._request( - method="GET", path=f"identities/{request.identity_id}" - ) + return self._request(method="GET", path=f"identities/{request.identity_id}") def get_identity_by_email(self, request: IdentityGetByEmailRequest) -> APIResponse: """ @@ -94,9 +92,7 @@ def get_identity_by_email(self, request: IdentityGetByEmailRequest) -> APIRespon self.logger.debug("Preparing to get identity by email: %s", request.email) # Make API request - return self._request( - method="GET", path=f"identities/email/{request.email}" - ) + return self._request(method="GET", path=f"identities/email/{request.email}") def update_identity(self, request: IdentityUpdateRequest) -> APIResponse: """ @@ -173,9 +169,7 @@ def delete_identity(self, request: IdentityDeleteRequest) -> APIResponse: ) # Make API request - return self._request( - method="DELETE", path=f"identities/{request.identity_id}" - ) + return self._request(method="DELETE", path=f"identities/{request.identity_id}") def delete_identity_by_email( self, request: IdentityDeleteByEmailRequest @@ -192,8 +186,4 @@ def delete_identity_by_email( self.logger.debug("Preparing to delete identity by email: %s", request.email) # Make API request - return self._request( - method="DELETE", path=f"identities/email/{request.email}" - ) - - + return self._request(method="DELETE", path=f"identities/email/{request.email}") diff --git a/mailersend/resources/inbound.py b/mailersend/resources/inbound.py index 4a6bd6d..8a997fd 100644 --- a/mailersend/resources/inbound.py +++ b/mailersend/resources/inbound.py @@ -121,5 +121,3 @@ def delete(self, request: InboundDeleteRequest) -> APIResponse: # Make API request return self._request(method="DELETE", path=f"inbound/{request.inbound_id}") - - diff --git a/mailersend/resources/messages.py b/mailersend/resources/messages.py index 02997f3..0b8bf1e 100644 --- a/mailersend/resources/messages.py +++ b/mailersend/resources/messages.py @@ -51,5 +51,3 @@ def get_message(self, request: MessageGetRequest) -> APIResponse: # Make API request return self._request(method="GET", path=f"messages/{request.message_id}") - - diff --git a/mailersend/resources/other.py b/mailersend/resources/other.py index 21e46c0..5672e68 100644 --- a/mailersend/resources/other.py +++ b/mailersend/resources/other.py @@ -21,5 +21,3 @@ def get_quota(self) -> APIResponse: self.logger.debug("Retrieving API quota information") return self._request(method="GET", path="api-quota") - - diff --git a/mailersend/resources/recipients.py b/mailersend/resources/recipients.py index 2412c66..8476df2 100644 --- a/mailersend/resources/recipients.py +++ b/mailersend/resources/recipients.py @@ -54,9 +54,7 @@ def get_recipient(self, request: RecipientGetRequest) -> APIResponse: self.logger.debug("Getting recipient: %s", request.recipient_id) # Make API call - return self._request( - method="GET", path=f"recipients/{request.recipient_id}" - ) + return self._request(method="GET", path=f"recipients/{request.recipient_id}") def delete_recipient(self, request: RecipientDeleteRequest) -> APIResponse: """ @@ -71,9 +69,7 @@ def delete_recipient(self, request: RecipientDeleteRequest) -> APIResponse: self.logger.debug("Deleting recipient: %s", request.recipient_id) # Make API call - return self._request( - method="DELETE", path=f"recipients/{request.recipient_id}" - ) + return self._request(method="DELETE", path=f"recipients/{request.recipient_id}") def list_blocklist( self, request: Optional[SuppressionListRequest] = None @@ -98,9 +94,7 @@ def list_blocklist( self.logger.debug("Listing blocklist with params: %s", params) # Make API call - return self._request( - method="GET", path="suppressions/blocklist", params=params - ) + return self._request(method="GET", path="suppressions/blocklist", params=params) def list_hard_bounces( self, request: Optional[SuppressionListRequest] = None @@ -243,9 +237,7 @@ def add_hard_bounces(self, request: SuppressionAddRequest) -> APIResponse: self.logger.debug("Adding hard bounces with body: %s", body) # Make API call - return self._request( - method="POST", path="suppressions/hard-bounces", body=body - ) + return self._request(method="POST", path="suppressions/hard-bounces", body=body) def add_spam_complaints(self, request: SuppressionAddRequest) -> APIResponse: """ @@ -284,9 +276,7 @@ def add_unsubscribes(self, request: SuppressionAddRequest) -> APIResponse: self.logger.debug("Adding unsubscribes with body: %s", body) # Make API call - return self._request( - method="POST", path="suppressions/unsubscribes", body=body - ) + return self._request(method="POST", path="suppressions/unsubscribes", body=body) def delete_from_blocklist(self, request: SuppressionDeleteRequest) -> APIResponse: """ @@ -304,9 +294,7 @@ def delete_from_blocklist(self, request: SuppressionDeleteRequest) -> APIRespons self.logger.debug("Deleting from blocklist with body: %s", body) # Make API call - return self._request( - method="DELETE", path="suppressions/blocklist", body=body - ) + return self._request(method="DELETE", path="suppressions/blocklist", body=body) def delete_hard_bounces(self, request: SuppressionDeleteRequest) -> APIResponse: """ @@ -388,5 +376,3 @@ def delete_from_on_hold(self, request: SuppressionDeleteRequest) -> APIResponse: return self._request( method="DELETE", path="suppressions/on-hold-list", body=body ) - - diff --git a/mailersend/resources/schedules.py b/mailersend/resources/schedules.py index 158a644..9cba8c4 100644 --- a/mailersend/resources/schedules.py +++ b/mailersend/resources/schedules.py @@ -79,5 +79,3 @@ def delete_schedule(self, request: ScheduleDeleteRequest) -> APIResponse: return self._request( method="DELETE", path=f"message-schedules/{request.message_id}" ) - - diff --git a/mailersend/resources/sms_activity.py b/mailersend/resources/sms_activity.py index 6822ae3..cfcb4eb 100644 --- a/mailersend/resources/sms_activity.py +++ b/mailersend/resources/sms_activity.py @@ -49,5 +49,3 @@ def get(self, request: SmsMessageGetRequest) -> APIResponse: return self._request( method="GET", path=f"sms-messages/{request.sms_message_id}" ) - - diff --git a/mailersend/resources/sms_inbounds.py b/mailersend/resources/sms_inbounds.py index 760b164..bd586f1 100644 --- a/mailersend/resources/sms_inbounds.py +++ b/mailersend/resources/sms_inbounds.py @@ -94,5 +94,3 @@ def delete_sms_inbound(self, request: SmsInboundDeleteRequest) -> APIResponse: return self._request( method="DELETE", path=f"sms-inbounds/{request.sms_inbound_id}" ) - - diff --git a/mailersend/resources/sms_messages.py b/mailersend/resources/sms_messages.py index 8f33f06..1ffa222 100644 --- a/mailersend/resources/sms_messages.py +++ b/mailersend/resources/sms_messages.py @@ -43,5 +43,3 @@ def get_sms_message(self, request: SmsMessageGetRequest) -> APIResponse: return self._request( method="GET", path=f"sms-messages/{request.sms_message_id}" ) - - diff --git a/mailersend/resources/sms_numbers.py b/mailersend/resources/sms_numbers.py index b4935e0..57e1ecb 100644 --- a/mailersend/resources/sms_numbers.py +++ b/mailersend/resources/sms_numbers.py @@ -46,9 +46,7 @@ def get(self, request: SmsNumberGetRequest) -> APIResponse: """ self.logger.debug("Getting SMS phone number: %s", request.sms_number_id) - return self._request( - method="GET", path=f"sms-numbers/{request.sms_number_id}" - ) + return self._request(method="GET", path=f"sms-numbers/{request.sms_number_id}") def update(self, request: SmsNumberUpdateRequest) -> APIResponse: """ @@ -86,5 +84,3 @@ def delete(self, request: SmsNumberDeleteRequest) -> APIResponse: return self._request( method="DELETE", path=f"sms-numbers/{request.sms_number_id}" ) - - diff --git a/mailersend/resources/sms_recipients.py b/mailersend/resources/sms_recipients.py index d08e0d0..b9f9185 100644 --- a/mailersend/resources/sms_recipients.py +++ b/mailersend/resources/sms_recipients.py @@ -67,5 +67,3 @@ def update_sms_recipient(self, request: SmsRecipientUpdateRequest) -> APIRespons path=f"sms-recipients/{request.sms_recipient_id}", body=request.to_request_body(), ) - - diff --git a/mailersend/resources/sms_sending.py b/mailersend/resources/sms_sending.py index 9a71f87..fae9123 100644 --- a/mailersend/resources/sms_sending.py +++ b/mailersend/resources/sms_sending.py @@ -28,5 +28,3 @@ def send(self, request: SmsSendRequest) -> APIResponse: self.logger.debug("SMS payload: %s", payload) return self._request(method="POST", path="sms", body=payload) - - diff --git a/mailersend/resources/sms_webhooks.py b/mailersend/resources/sms_webhooks.py index de9d53c..4fbb898 100644 --- a/mailersend/resources/sms_webhooks.py +++ b/mailersend/resources/sms_webhooks.py @@ -101,5 +101,3 @@ def delete_sms_webhook(self, request: SmsWebhookDeleteRequest) -> APIResponse: return self._request( method="DELETE", path=f"sms-webhooks/{request.sms_webhook_id}" ) - - diff --git a/mailersend/resources/smtp_users.py b/mailersend/resources/smtp_users.py index 4e307e9..38a3a32 100644 --- a/mailersend/resources/smtp_users.py +++ b/mailersend/resources/smtp_users.py @@ -122,5 +122,3 @@ def delete_smtp_user(self, request: SmtpUserDeleteRequest) -> APIResponse: method="DELETE", path=f"domains/{request.domain_id}/smtp-users/{request.smtp_user_id}", ) - - diff --git a/mailersend/resources/templates.py b/mailersend/resources/templates.py index 4e8301d..242611b 100644 --- a/mailersend/resources/templates.py +++ b/mailersend/resources/templates.py @@ -60,9 +60,7 @@ def get_template(self, request: TemplateGetRequest) -> APIResponse: self.logger.debug("Template get request: %s", request) # Make API call - return self._request( - method="GET", path=f"templates/{request.template_id}" - ) + return self._request(method="GET", path=f"templates/{request.template_id}") def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: """ @@ -78,8 +76,4 @@ def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: self.logger.debug("Deleting template: %s", request.template_id) # Make API call - return self._request( - method="DELETE", path=f"templates/{request.template_id}" - ) - - + return self._request(method="DELETE", path=f"templates/{request.template_id}") diff --git a/mailersend/resources/tokens.py b/mailersend/resources/tokens.py index 28e4fce..5d1c8b0 100644 --- a/mailersend/resources/tokens.py +++ b/mailersend/resources/tokens.py @@ -113,5 +113,3 @@ def delete_token(self, request: TokenDeleteRequest) -> APIResponse: # Make API call return self._request(method="DELETE", path=f"token/{request.token_id}") - - diff --git a/mailersend/resources/users.py b/mailersend/resources/users.py index 525fa36..d567484 100644 --- a/mailersend/resources/users.py +++ b/mailersend/resources/users.py @@ -99,7 +99,9 @@ def delete_user(self, request: UserDeleteRequest) -> APIResponse: self.logger.debug("Deleting user: %s", request.user_id) # Make API call - return self._request(method="DELETE", path=f"users/{request.user_id}", data=lambda r: None) + return self._request( + method="DELETE", path=f"users/{request.user_id}", data=lambda r: None + ) def list_invites(self, request: InvitesListRequest) -> APIResponse: """Get a list of invites. @@ -162,6 +164,6 @@ def cancel_invite(self, request: InviteCancelRequest) -> APIResponse: self.logger.debug("Canceling invite: %s", request.invite_id) # Make API call - return self._request(method="DELETE", path=f"invites/{request.invite_id}", data=lambda r: None) - - + return self._request( + method="DELETE", path=f"invites/{request.invite_id}", data=lambda r: None + ) diff --git a/mailersend/resources/webhooks.py b/mailersend/resources/webhooks.py index 3454ab9..fc5645a 100644 --- a/mailersend/resources/webhooks.py +++ b/mailersend/resources/webhooks.py @@ -47,9 +47,7 @@ def get_webhook(self, request: WebhookGetRequest) -> APIResponse: self.logger.debug("Webhook get request: %s", request) # Make API call - return self._request( - method="GET", path=f"webhooks/{request.webhook_id}" - ) + return self._request(method="GET", path=f"webhooks/{request.webhook_id}") def create_webhook(self, request: WebhookCreateRequest) -> APIResponse: """Create a new webhook. @@ -105,8 +103,4 @@ def delete_webhook(self, request: WebhookDeleteRequest) -> APIResponse: self.logger.debug("Webhook delete request: %s", request) # Make API call - return self._request( - method="DELETE", path=f"webhooks/{request.webhook_id}" - ) - - + return self._request(method="DELETE", path=f"webhooks/{request.webhook_id}") diff --git a/pyproject.toml b/pyproject.toml index a79cd02..046ce18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,24 +7,21 @@ requires-python = ">=3.10" dependencies = [ "requests>=2.28.1", "pydantic[email]>=2.11.0", + "httpx>=0.28.1", ] -[tool.poetry.dependencies] -python = "^3.10" -requests = "^2.28.1" -pydantic = {extras = ["email"], version = "^2.11.0"} -httpx = "^0.28.1" - -[tool.poetry.dev-dependencies] -black = "^26.0.0" -coverage = "^7.0.0" -pytest = "^9.0.0" -pytest-asyncio = "^1.3.0" -pytest-mock = "^3.10.0" -python-dotenv = "^0.21.0" -python-semantic-release = "^7.32.2" -vcrpy = "^8.0.0" -pre-commit = "^2.12.1" +[dependency-groups] +dev = [ + "black>=26.0.0", + "coverage>=7.0.0", + "pytest>=9.0.0", + "pytest-asyncio>=1.3.0", + "pytest-mock>=3.10.0", + "python-dotenv>=0.21.0", + "python-semantic-release>=7.32.2", + "vcrpy>=8.0.0", + "pre-commit>=2.12.1", +] [tool.pytest.ini_options] asyncio_mode = "auto" diff --git a/tests/fixtures/cassettes/activity_builder_basic.yaml b/tests/fixtures/cassettes/activity_builder_basic.yaml index cad98ac..3b22874 100644 --- a/tests/fixtures/cassettes/activity_builder_basic.yaml +++ b/tests/fixtures/cassettes/activity_builder_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750945671&date_to=1750949271 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' headers: CF-RAY: - - 966d76f8df02562e-BEG + - a16ed0df5ccee298-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:45 GMT + - Mon, 06 Jul 2026 13:04:33 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '66' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_builder_datetime_conversion.yaml b/tests/fixtures/cassettes/activity_builder_datetime_conversion.yaml index 8835d2d..76095a2 100644 --- a/tests/fixtures/cassettes/activity_builder_datetime_conversion.yaml +++ b/tests/fixtures/cassettes/activity_builder_datetime_conversion.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?date_from=1750938493&date_to=1750949293 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' headers: CF-RAY: - - 966d76fb2ef696e0-BEG + - a16ed0e14d24a8bc-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:45 GMT + - Mon, 06 Jul 2026 13:04:33 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '66' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_builder_with_events.yaml b/tests/fixtures/cassettes/activity_builder_with_events.yaml index 07740c4..965d9fd 100644 --- a/tests/fixtures/cassettes/activity_builder_with_events.yaml +++ b/tests/fixtures/cassettes/activity_builder_with_events.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?limit=50&date_from=1750942092&date_to=1750949292&event%5B0%5D=sent&event%5B1%5D=delivered&event%5B2%5D=opened response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":50,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":50,"to":null}}' headers: CF-RAY: - - 966d76f9fa0ae291-BEG + - a16ed0e05b70b01e-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:45 GMT + - Mon, 06 Jul 2026 13:04:33 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '57' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_basic.yaml b/tests/fixtures/cassettes/activity_get_basic.yaml index 7e180ee..880d4fb 100644 --- a/tests/fixtures/cassettes/activity_get_basic.yaml +++ b/tests/fixtures/cassettes/activity_get_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1754040747&date_to=1754044347 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' headers: CF-RAY: - - 9684abf1ba41076b-BEG + - a16ed0d66c3d1b8b-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:32:27 GMT + - Mon, 06 Jul 2026 13:04:31 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '69' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_delivery_events.yaml b/tests/fixtures/cassettes/activity_get_delivery_events.yaml index bc702d0..60a5611 100644 --- a/tests/fixtures/cassettes/activity_get_delivery_events.yaml +++ b/tests/fixtures/cassettes/activity_get_delivery_events.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750862891&date_to=1750949291&event%5B0%5D=queued&event%5B1%5D=sent&event%5B2%5D=delivered&event%5B3%5D=soft_bounced&event%5B4%5D=hard_bounced response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' headers: CF-RAY: - - 966d76f04d11562e-BEG + - a16ed0d9d9af3267-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:43 GMT + - Mon, 06 Jul 2026 13:04:32 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '72' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_empty_result.yaml b/tests/fixtures/cassettes/activity_get_empty_result.yaml index 6ebd456..9e995a0 100644 --- a/tests/fixtures/cassettes/activity_get_empty_result.yaml +++ b/tests/fixtures/cassettes/activity_get_empty_result.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750949232&date_to=1750949292&event%5B0%5D=survey_opened response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' headers: CF-RAY: - - 966d76f7bbeae291-BEG + - a16ed0de5f71870d-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:44 GMT + - Mon, 06 Jul 2026 13:04:33 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '60' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_engagement_events.yaml b/tests/fixtures/cassettes/activity_get_engagement_events.yaml index 9a4c2f9..f267225 100644 --- a/tests/fixtures/cassettes/activity_get_engagement_events.yaml +++ b/tests/fixtures/cassettes/activity_get_engagement_events.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750862891&date_to=1750949291&event%5B0%5D=opened&event%5B1%5D=clicked&event%5B2%5D=unsubscribed&event%5B3%5D=spam_complaints response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' headers: CF-RAY: - - 966d76f1ec70e298-BEG + - a16ed0dadd69b01b-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:44 GMT + - Mon, 06 Jul 2026 13:04:32 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '54' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_max_limit.yaml b/tests/fixtures/cassettes/activity_get_max_limit.yaml index b8af689..7b386e2 100644 --- a/tests/fixtures/cassettes/activity_get_max_limit.yaml +++ b/tests/fixtures/cassettes/activity_get_max_limit.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=100&date_from=1750862870&date_to=1750949270 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":100,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":100,"to":null}}' headers: CF-RAY: - - 966d76f538b13267-BEG + - a16ed0dc88af0380-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:44 GMT + - Mon, 06 Jul 2026 13:04:32 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '54' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_min_limit.yaml b/tests/fixtures/cassettes/activity_get_min_limit.yaml index 9c74524..85c0884 100644 --- a/tests/fixtures/cassettes/activity_get_min_limit.yaml +++ b/tests/fixtures/cassettes/activity_get_min_limit.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=10&date_from=1750862892&date_to=1750949292 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":10,"to":null}}' headers: CF-RAY: - - 966d76f6baa70a8e-BEG + - a16ed0dd6c8855ad-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:44 GMT + - Mon, 06 Jul 2026 13:04:32 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '60' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_single_event.yaml b/tests/fixtures/cassettes/activity_get_single_event.yaml index a00e6ae..2ad2b67 100644 --- a/tests/fixtures/cassettes/activity_get_single_event.yaml +++ b/tests/fixtures/cassettes/activity_get_single_event.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750862870&date_to=1750949270&event%5B0%5D=sent response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' headers: CF-RAY: - - 966d76eeef2be1a5-VIE + - a16ed0d8fdc58e88-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:43 GMT + - Mon, 06 Jul 2026 13:04:32 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '56' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_single_not_found.yaml b/tests/fixtures/cassettes/activity_get_single_not_found.yaml index fc38e1d..a65af86 100644 --- a/tests/fixtures/cassettes/activity_get_single_not_found.yaml +++ b/tests/fixtures/cassettes/activity_get_single_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activities/5ee0b166b251345e407c9207 response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d76fc3b3ed814-BEG + - a16ed0e24a7de290-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:45 GMT + - Mon, 06 Jul 2026 13:04:33 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '50' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/activity_get_with_datetime.yaml b/tests/fixtures/cassettes/activity_get_with_datetime.yaml index c60a612..3fede41 100644 --- a/tests/fixtures/cassettes/activity_get_with_datetime.yaml +++ b/tests/fixtures/cassettes/activity_get_with_datetime.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750927692&date_to=1750949292 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' headers: CF-RAY: - - 966d76f39c8dcf86-BEG + - a16ed0dbaca396e0-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:44 GMT + - Mon, 06 Jul 2026 13:04:32 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '55' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_with_events.yaml b/tests/fixtures/cassettes/activity_get_with_events.yaml index ce20136..93f35ce 100644 --- a/tests/fixtures/cassettes/activity_get_with_events.yaml +++ b/tests/fixtures/cassettes/activity_get_with_events.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750862861&date_to=1750949261&event%5B0%5D=sent&event%5B1%5D=delivered&event%5B2%5D=opened response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' headers: CF-RAY: - - 966d76ed5da025c0-VIE + - a16ed0d81f88e290-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:43 GMT + - Mon, 06 Jul 2026 13:04:32 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '59' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/activity_get_with_pagination.yaml b/tests/fixtures/cassettes/activity_get_with_pagination.yaml index 16bc383..8005c59 100644 --- a/tests/fixtures/cassettes/activity_get_with_pagination.yaml +++ b/tests/fixtures/cassettes/activity_get_with_pagination.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=2&limit=10&date_from=1750862844&date_to=1750949244 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","next":null},"meta":{"current_page":2,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","next":null},"meta":{"current_page":2,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=2","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":10,"to":null}}' headers: CF-RAY: - - 966d76eb8be15e99-VIE + - a16ed0d74f98c239-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:56:43 GMT + - Mon, 06 Jul 2026 13:04:31 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '58' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_comprehensive_test.yaml b/tests/fixtures/cassettes/analytics_comprehensive_test.yaml index bfb627b..2ae45a6 100644 --- a/tests/fixtures/cassettes/analytics_comprehensive_test.yaml +++ b/tests/fixtures/cassettes/analytics_comprehensive_test.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1746144000&date_to=1748736000&tags%5B%5D=integration-test&group_by=days&event%5B%5D=sent&event%5B%5D=delivered + uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&tags%5B%5D=integration-test&group_by=days&event%5B%5D=sent&event%5B%5D=delivered response: body: - string: '{"data":{"date_from":"1746144000","date_to":"1748822399","group_by":"days","stats":[{"date":"1746144000","sent":0,"delivered":0},{"date":"1746230400","sent":0,"delivered":0},{"date":"1746316800","sent":0,"delivered":0},{"date":"1746403200","sent":0,"delivered":0},{"date":"1746489600","sent":0,"delivered":0},{"date":"1746576000","sent":0,"delivered":0},{"date":"1746662400","sent":0,"delivered":0},{"date":"1746748800","sent":0,"delivered":0},{"date":"1746835200","sent":0,"delivered":0},{"date":"1746921600","sent":0,"delivered":0},{"date":"1747008000","sent":0,"delivered":0},{"date":"1747094400","sent":0,"delivered":0},{"date":"1747180800","sent":0,"delivered":0},{"date":"1747267200","sent":0,"delivered":0},{"date":"1747353600","sent":0,"delivered":0},{"date":"1747440000","sent":0,"delivered":0},{"date":"1747526400","sent":0,"delivered":0},{"date":"1747612800","sent":0,"delivered":0},{"date":"1747699200","sent":0,"delivered":0},{"date":"1747785600","sent":0,"delivered":0},{"date":"1747872000","sent":0,"delivered":0},{"date":"1747958400","sent":0,"delivered":0},{"date":"1748044800","sent":0,"delivered":0},{"date":"1748131200","sent":0,"delivered":0},{"date":"1748217600","sent":0,"delivered":0},{"date":"1748304000","sent":0,"delivered":0},{"date":"1748390400","sent":0,"delivered":0},{"date":"1748476800","sent":0,"delivered":0},{"date":"1748563200","sent":0,"delivered":0},{"date":"1748649600","sent":0,"delivered":0},{"date":"1748736000","sent":0,"delivered":0}]}}' + string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"days","stats":[{"date":"1777680000","sent":0,"delivered":0},{"date":"1777766400","sent":0,"delivered":0},{"date":"1777852800","sent":0,"delivered":0},{"date":"1777939200","sent":0,"delivered":0},{"date":"1778025600","sent":0,"delivered":0},{"date":"1778112000","sent":0,"delivered":0},{"date":"1778198400","sent":0,"delivered":0},{"date":"1778284800","sent":0,"delivered":0},{"date":"1778371200","sent":0,"delivered":0},{"date":"1778457600","sent":0,"delivered":0},{"date":"1778544000","sent":0,"delivered":0},{"date":"1778630400","sent":0,"delivered":0},{"date":"1778716800","sent":0,"delivered":0},{"date":"1778803200","sent":0,"delivered":0},{"date":"1778889600","sent":0,"delivered":0},{"date":"1778976000","sent":0,"delivered":0},{"date":"1779062400","sent":0,"delivered":0},{"date":"1779148800","sent":0,"delivered":0},{"date":"1779235200","sent":0,"delivered":0},{"date":"1779321600","sent":0,"delivered":0},{"date":"1779408000","sent":0,"delivered":0},{"date":"1779494400","sent":0,"delivered":0},{"date":"1779580800","sent":0,"delivered":0},{"date":"1779667200","sent":0,"delivered":0},{"date":"1779753600","sent":0,"delivered":0},{"date":"1779840000","sent":0,"delivered":0},{"date":"1779926400","sent":0,"delivered":0},{"date":"1780012800","sent":0,"delivered":0},{"date":"1780099200","sent":0,"delivered":0},{"date":"1780185600","sent":0,"delivered":0},{"date":"1780272000","sent":0,"delivered":0}]}}' headers: CF-RAY: - - 966c83efa81db01e-BEG + - a16ed0ef7af7dfc0-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:50 GMT + - Mon, 06 Jul 2026 13:04:35 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '60' status: code: 200 message: OK @@ -57,15 +59,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/country?date_from=1746144000&date_to=1748736000&tags%5B%5D=integration-test + uri: https://api.mailersend.com/v1/analytics/country?date_from=1777680000&date_to=1780272000&tags%5B%5D=integration-test response: body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[]}}' + string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' headers: CF-RAY: - - 966c83f0c8dd0db0-BEG + - a16ed0f06f69fa43-BEG Cache-Control: - no-cache, private Connection: @@ -75,19 +77,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:50 GMT + - Mon, 06 Jul 2026 13:04:36 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '54' status: code: 200 message: OK @@ -103,15 +107,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/ua-name?date_from=1746144000&date_to=1748736000&tags%5B%5D=integration-test + uri: https://api.mailersend.com/v1/analytics/ua-name?date_from=1777680000&date_to=1780272000&tags%5B%5D=integration-test response: body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[]}}' + string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' headers: CF-RAY: - - 966c83f1df95e290-BEG + - a16ed0f14d9cc239-BEG Cache-Control: - no-cache, private Connection: @@ -121,19 +125,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:50 GMT + - Mon, 06 Jul 2026 13:04:36 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '59' status: code: 200 message: OK @@ -149,15 +155,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/ua-type?date_from=1746144000&date_to=1748736000&tags%5B%5D=integration-test + uri: https://api.mailersend.com/v1/analytics/ua-type?date_from=1777680000&date_to=1780272000&tags%5B%5D=integration-test response: body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[]}}' + string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' headers: CF-RAY: - - 966c83f30d98d814-BEG + - a16ed0f23edde296-BEG Cache-Control: - no-cache, private Connection: @@ -167,19 +173,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:50 GMT + - Mon, 06 Jul 2026 13:04:36 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '95' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_country_basic.yaml b/tests/fixtures/cassettes/analytics_country_basic.yaml index 4db06f6..c6b4f79 100644 --- a/tests/fixtures/cassettes/analytics_country_basic.yaml +++ b/tests/fixtures/cassettes/analytics_country_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/country?date_from=1746144000&date_to=1748736000 + uri: https://api.mailersend.com/v1/analytics/country?date_from=1777680000&date_to=1780272000 response: body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"RS","count":1},{"name":"US","count":1}]}}' + string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' headers: CF-RAY: - - 966c83e4bade870d-BEG + - a16ed0e6e955e293-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:48 GMT + - Mon, 06 Jul 2026 13:04:34 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '52' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_country_with_tags.yaml b/tests/fixtures/cassettes/analytics_country_with_tags.yaml index 404341a..56a432b 100644 --- a/tests/fixtures/cassettes/analytics_country_with_tags.yaml +++ b/tests/fixtures/cassettes/analytics_country_with_tags.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/country?date_from=1746144000&date_to=1748736000&tags%5B%5D=newsletter + uri: https://api.mailersend.com/v1/analytics/country?date_from=1777680000&date_to=1780272000&tags%5B%5D=newsletter response: body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[]}}' + string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' headers: CF-RAY: - - 966c83e5bd2871a6-BEG + - a16ed0e7df87e296-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:48 GMT + - Mon, 06 Jul 2026 13:04:34 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '52' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_date_all_events.yaml b/tests/fixtures/cassettes/analytics_date_all_events.yaml index 674dcdf..e2b52d7 100644 --- a/tests/fixtures/cassettes/analytics_date_all_events.yaml +++ b/tests/fixtures/cassettes/analytics_date_all_events.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1746144000&date_to=1748736000&group_by=days&event%5B%5D=sent&event%5B%5D=delivered&event%5B%5D=opened&event%5B%5D=clicked&event%5B%5D=hard_bounced&event%5B%5D=soft_bounced&event%5B%5D=unsubscribed&event%5B%5D=spam_complaints + uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&group_by=days&event%5B%5D=sent&event%5B%5D=delivered&event%5B%5D=opened&event%5B%5D=clicked&event%5B%5D=hard_bounced&event%5B%5D=soft_bounced&event%5B%5D=unsubscribed&event%5B%5D=spam_complaints response: body: - string: '{"data":{"date_from":"1746144000","date_to":"1748822399","group_by":"days","stats":[{"date":"1746144000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1746230400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1746316800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1746403200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1746489600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1746576000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1746662400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1746748800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1746835200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1746921600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747008000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747094400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747180800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747267200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747353600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747440000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747526400","sent":1,"delivered":1,"opened":2,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747612800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747699200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747785600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747872000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1747958400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748044800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748131200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748217600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748304000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748390400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748476800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748563200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748649600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748736000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0}]}}' + string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"days","stats":[{"date":"1777680000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1777766400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1777852800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1777939200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778025600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778112000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778198400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778284800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778371200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778457600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778544000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778630400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778716800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778803200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778889600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778976000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779062400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779148800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779235200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779321600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779408000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779494400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779580800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779667200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779753600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779840000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779926400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780012800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780099200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780185600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780272000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0}]}}' headers: CF-RAY: - - 966c83e39c510a8e-BEG + - a16ed0e5fea43267-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:48 GMT + - Mon, 06 Jul 2026 13:04:34 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '59' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_date_basic.yaml b/tests/fixtures/cassettes/analytics_date_basic.yaml index 0e5f7bd..ab3f1c3 100644 --- a/tests/fixtures/cassettes/analytics_date_basic.yaml +++ b/tests/fixtures/cassettes/analytics_date_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1746144000&date_to=1748736000&group_by=days&event%5B%5D=sent&event%5B%5D=delivered&event%5B%5D=opened + uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&group_by=days&event%5B%5D=sent&event%5B%5D=delivered&event%5B%5D=opened response: body: - string: '{"data":{"date_from":"1746144000","date_to":"1748822399","group_by":"days","stats":[{"date":"1746144000","sent":0,"delivered":0,"opened":0},{"date":"1746230400","sent":0,"delivered":0,"opened":0},{"date":"1746316800","sent":0,"delivered":0,"opened":0},{"date":"1746403200","sent":0,"delivered":0,"opened":0},{"date":"1746489600","sent":0,"delivered":0,"opened":0},{"date":"1746576000","sent":0,"delivered":0,"opened":0},{"date":"1746662400","sent":0,"delivered":0,"opened":0},{"date":"1746748800","sent":0,"delivered":0,"opened":0},{"date":"1746835200","sent":0,"delivered":0,"opened":0},{"date":"1746921600","sent":0,"delivered":0,"opened":0},{"date":"1747008000","sent":0,"delivered":0,"opened":0},{"date":"1747094400","sent":0,"delivered":0,"opened":0},{"date":"1747180800","sent":0,"delivered":0,"opened":0},{"date":"1747267200","sent":0,"delivered":0,"opened":0},{"date":"1747353600","sent":0,"delivered":0,"opened":0},{"date":"1747440000","sent":0,"delivered":0,"opened":0},{"date":"1747526400","sent":1,"delivered":1,"opened":2},{"date":"1747612800","sent":0,"delivered":0,"opened":0},{"date":"1747699200","sent":0,"delivered":0,"opened":0},{"date":"1747785600","sent":0,"delivered":0,"opened":0},{"date":"1747872000","sent":0,"delivered":0,"opened":0},{"date":"1747958400","sent":0,"delivered":0,"opened":0},{"date":"1748044800","sent":0,"delivered":0,"opened":0},{"date":"1748131200","sent":0,"delivered":0,"opened":0},{"date":"1748217600","sent":0,"delivered":0,"opened":0},{"date":"1748304000","sent":0,"delivered":0,"opened":0},{"date":"1748390400","sent":0,"delivered":0,"opened":0},{"date":"1748476800","sent":0,"delivered":0,"opened":0},{"date":"1748563200","sent":0,"delivered":0,"opened":0},{"date":"1748649600","sent":0,"delivered":0,"opened":0},{"date":"1748736000","sent":0,"delivered":0,"opened":0}]}}' + string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"days","stats":[{"date":"1777680000","sent":0,"delivered":0,"opened":0},{"date":"1777766400","sent":0,"delivered":0,"opened":0},{"date":"1777852800","sent":0,"delivered":0,"opened":0},{"date":"1777939200","sent":0,"delivered":0,"opened":0},{"date":"1778025600","sent":0,"delivered":0,"opened":0},{"date":"1778112000","sent":0,"delivered":0,"opened":0},{"date":"1778198400","sent":0,"delivered":0,"opened":0},{"date":"1778284800","sent":0,"delivered":0,"opened":0},{"date":"1778371200","sent":0,"delivered":0,"opened":0},{"date":"1778457600","sent":0,"delivered":0,"opened":0},{"date":"1778544000","sent":0,"delivered":0,"opened":0},{"date":"1778630400","sent":0,"delivered":0,"opened":0},{"date":"1778716800","sent":0,"delivered":0,"opened":0},{"date":"1778803200","sent":0,"delivered":0,"opened":0},{"date":"1778889600","sent":0,"delivered":0,"opened":0},{"date":"1778976000","sent":0,"delivered":0,"opened":0},{"date":"1779062400","sent":0,"delivered":0,"opened":0},{"date":"1779148800","sent":0,"delivered":0,"opened":0},{"date":"1779235200","sent":0,"delivered":0,"opened":0},{"date":"1779321600","sent":0,"delivered":0,"opened":0},{"date":"1779408000","sent":0,"delivered":0,"opened":0},{"date":"1779494400","sent":0,"delivered":0,"opened":0},{"date":"1779580800","sent":0,"delivered":0,"opened":0},{"date":"1779667200","sent":0,"delivered":0,"opened":0},{"date":"1779753600","sent":0,"delivered":0,"opened":0},{"date":"1779840000","sent":0,"delivered":0,"opened":0},{"date":"1779926400","sent":0,"delivered":0,"opened":0},{"date":"1780012800","sent":0,"delivered":0,"opened":0},{"date":"1780099200","sent":0,"delivered":0,"opened":0},{"date":"1780185600","sent":0,"delivered":0,"opened":0},{"date":"1780272000","sent":0,"delivered":0,"opened":0}]}}' headers: CF-RAY: - - 966c83aed9ca8e88-BEG + - a16ed0e33861e293-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:40 GMT + - Mon, 06 Jul 2026 13:04:33 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '57' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_date_builder_helpers.yaml b/tests/fixtures/cassettes/analytics_date_builder_helpers.yaml index 725aabf..4d96df1 100644 --- a/tests/fixtures/cassettes/analytics_date_builder_helpers.yaml +++ b/tests/fixtures/cassettes/analytics_date_builder_helpers.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1748131200&date_to=1748736000&group_by=days&event%5B%5D=sent&event%5B%5D=delivered + uri: https://api.mailersend.com/v1/analytics/date?date_from=1779667200&date_to=1780272000&group_by=days&event%5B%5D=sent&event%5B%5D=delivered response: body: - string: '{"data":{"date_from":"1748131200","date_to":"1748822399","group_by":"days","stats":[{"date":"1748131200","sent":0,"delivered":0},{"date":"1748217600","sent":0,"delivered":0},{"date":"1748304000","sent":0,"delivered":0},{"date":"1748390400","sent":0,"delivered":0},{"date":"1748476800","sent":0,"delivered":0},{"date":"1748563200","sent":0,"delivered":0},{"date":"1748649600","sent":0,"delivered":0},{"date":"1748736000","sent":0,"delivered":0}]}}' + string: '{"data":{"date_from":"1779667200","date_to":"1780358399","group_by":"days","stats":[{"date":"1779667200","sent":0,"delivered":0},{"date":"1779753600","sent":0,"delivered":0},{"date":"1779840000","sent":0,"delivered":0},{"date":"1779926400","sent":0,"delivered":0},{"date":"1780012800","sent":0,"delivered":0},{"date":"1780099200","sent":0,"delivered":0},{"date":"1780185600","sent":0,"delivered":0},{"date":"1780272000","sent":0,"delivered":0}]}}' headers: CF-RAY: - - 966c83ec5fdfe295-BEG + - a16ed0ec7dc30a8e-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:49 GMT + - Mon, 06 Jul 2026 13:04:35 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '54' status: code: 200 message: OK @@ -57,15 +59,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1747526400&date_to=1748736000&group_by=days&event%5B%5D=opened&event%5B%5D=clicked + uri: https://api.mailersend.com/v1/analytics/date?date_from=1779062400&date_to=1780272000&group_by=days&event%5B%5D=opened&event%5B%5D=clicked response: body: - string: '{"data":{"date_from":"1747526400","date_to":"1748822399","group_by":"days","stats":[{"date":"1747526400","opened":2,"clicked":0},{"date":"1747612800","opened":0,"clicked":0},{"date":"1747699200","opened":0,"clicked":0},{"date":"1747785600","opened":0,"clicked":0},{"date":"1747872000","opened":0,"clicked":0},{"date":"1747958400","opened":0,"clicked":0},{"date":"1748044800","opened":0,"clicked":0},{"date":"1748131200","opened":0,"clicked":0},{"date":"1748217600","opened":0,"clicked":0},{"date":"1748304000","opened":0,"clicked":0},{"date":"1748390400","opened":0,"clicked":0},{"date":"1748476800","opened":0,"clicked":0},{"date":"1748563200","opened":0,"clicked":0},{"date":"1748649600","opened":0,"clicked":0},{"date":"1748736000","opened":0,"clicked":0}]}}' + string: '{"data":{"date_from":"1779062400","date_to":"1780358399","group_by":"days","stats":[{"date":"1779062400","opened":0,"clicked":0},{"date":"1779148800","opened":0,"clicked":0},{"date":"1779235200","opened":0,"clicked":0},{"date":"1779321600","opened":0,"clicked":0},{"date":"1779408000","opened":0,"clicked":0},{"date":"1779494400","opened":0,"clicked":0},{"date":"1779580800","opened":0,"clicked":0},{"date":"1779667200","opened":0,"clicked":0},{"date":"1779753600","opened":0,"clicked":0},{"date":"1779840000","opened":0,"clicked":0},{"date":"1779926400","opened":0,"clicked":0},{"date":"1780012800","opened":0,"clicked":0},{"date":"1780099200","opened":0,"clicked":0},{"date":"1780185600","opened":0,"clicked":0},{"date":"1780272000","opened":0,"clicked":0}]}}' headers: CF-RAY: - - 966c83ed6f6fe297-BEG + - a16ed0ed6e0ee297-BEG Cache-Control: - no-cache, private Connection: @@ -75,19 +77,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:49 GMT + - Mon, 06 Jul 2026 13:04:35 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '51' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_date_with_domain.yaml b/tests/fixtures/cassettes/analytics_date_with_domain.yaml index b6aac4c..b9f0723 100644 --- a/tests/fixtures/cassettes/analytics_date_with_domain.yaml +++ b/tests/fixtures/cassettes/analytics_date_with_domain.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/date?domain_id=your-domain-id&date_from=1746144000&date_to=1748736000&group_by=months&event%5B%5D=opened&event%5B%5D=clicked&event%5B%5D=unsubscribed&event%5B%5D=spam_complaints + uri: https://api.mailersend.com/v1/analytics/date?domain_id=your-domain-id&date_from=1777680000&date_to=1780272000&group_by=months&event%5B%5D=opened&event%5B%5D=clicked&event%5B%5D=unsubscribed&event%5B%5D=spam_complaints response: body: - string: '{"data":{"date_from":"1746144000","date_to":"1748822399","group_by":"months","stats":[{"date":"1746057600","opened":2,"clicked":0,"unsubscribed":0,"spam_complaints":0},{"date":"1748736000","opened":0,"clicked":0,"unsubscribed":0,"spam_complaints":0}]}}' + string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"months","stats":[{"date":"1777593600","opened":0,"clicked":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780272000","opened":0,"clicked":0,"unsubscribed":0,"spam_complaints":0}]}}' headers: CF-RAY: - - 966c83e14e86e294-BEG + - a16ed0e5093d5165-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:48 GMT + - Mon, 06 Jul 2026 13:04:34 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '57' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_date_with_tags.yaml b/tests/fixtures/cassettes/analytics_date_with_tags.yaml index 6c1f12b..6f6fd64 100644 --- a/tests/fixtures/cassettes/analytics_date_with_tags.yaml +++ b/tests/fixtures/cassettes/analytics_date_with_tags.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1746144000&date_to=1748736000&tags%5B%5D=newsletter&tags%5B%5D=marketing&group_by=weeks&event%5B%5D=sent&event%5B%5D=delivered&event%5B%5D=opened&event%5B%5D=clicked + uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&tags%5B%5D=newsletter&tags%5B%5D=marketing&group_by=weeks&event%5B%5D=sent&event%5B%5D=delivered&event%5B%5D=opened&event%5B%5D=clicked response: body: - string: '{"data":{"date_from":"1746144000","date_to":"1748822399","group_by":"weeks","stats":[{"date":"1745798400","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1746403200","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1747008000","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1747612800","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1748217600","sent":0,"delivered":0,"opened":0,"clicked":0}]}}' + string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"weeks","stats":[{"date":"1777248000","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1777852800","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1778457600","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1779062400","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1779667200","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1780272000","sent":0,"delivered":0,"opened":0,"clicked":0}]}}' headers: CF-RAY: - - 966c83df2f9e126d-BEG + - a16ed0e41a8396e0-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:47 GMT + - Mon, 06 Jul 2026 13:04:34 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '55' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_error_no_events.yaml b/tests/fixtures/cassettes/analytics_error_no_events.yaml index a2b96e2..860ccc9 100644 --- a/tests/fixtures/cassettes/analytics_error_no_events.yaml +++ b/tests/fixtures/cassettes/analytics_error_no_events.yaml @@ -11,37 +11,40 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1746144000&date_to=1748736000&group_by=days + uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&group_by=days response: body: - string: '{"message":"The event must be an array.","errors":{"event":["The event - must be an array."]}}' + string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"days","stats":[{"date":"1777680000"},{"date":"1777766400"},{"date":"1777852800"},{"date":"1777939200"},{"date":"1778025600"},{"date":"1778112000"},{"date":"1778198400"},{"date":"1778284800"},{"date":"1778371200"},{"date":"1778457600"},{"date":"1778544000"},{"date":"1778630400"},{"date":"1778716800"},{"date":"1778803200"},{"date":"1778889600"},{"date":"1778976000"},{"date":"1779062400"},{"date":"1779148800"},{"date":"1779235200"},{"date":"1779321600"},{"date":"1779408000"},{"date":"1779494400"},{"date":"1779580800"},{"date":"1779667200"},{"date":"1779753600"},{"date":"1779840000"},{"date":"1779926400"},{"date":"1780012800"},{"date":"1780099200"},{"date":"1780185600"},{"date":"1780272000"}]}}' headers: CF-RAY: - - 966c83ee79895165-BEG + - a16ed0ee5bdacf86-BEG Cache-Control: - no-cache, private Connection: - keep-alive + Content-Encoding: + - gzip Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:50 GMT + - Mon, 06 Jul 2026 13:04:35 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '51' status: - code: 422 - message: Unprocessable Entity + code: 200 + message: OK version: 1 diff --git a/tests/fixtures/cassettes/analytics_reading_env_basic.yaml b/tests/fixtures/cassettes/analytics_reading_env_basic.yaml index a1d9877..79a0265 100644 --- a/tests/fixtures/cassettes/analytics_reading_env_basic.yaml +++ b/tests/fixtures/cassettes/analytics_reading_env_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/ua-type?date_from=1746144000&date_to=1748736000 + uri: https://api.mailersend.com/v1/analytics/ua-type?date_from=1777680000&date_to=1780272000 response: body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"desktop","count":1},{"name":"webmail","count":1}]}}' + string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' headers: CF-RAY: - - 966c83e9f8dedfc0-BEG + - a16ed0eaab1f1f09-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:49 GMT + - Mon, 06 Jul 2026 13:04:35 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '54' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_reading_env_with_recipients.yaml b/tests/fixtures/cassettes/analytics_reading_env_with_recipients.yaml index 07cffb5..d1b538c 100644 --- a/tests/fixtures/cassettes/analytics_reading_env_with_recipients.yaml +++ b/tests/fixtures/cassettes/analytics_reading_env_with_recipients.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/ua-type?recipient_id%5B%5D=recipient-1&recipient_id%5B%5D=recipient-2&date_from=1746144000&date_to=1748736000 + uri: https://api.mailersend.com/v1/analytics/ua-type?recipient_id%5B%5D=recipient-1&recipient_id%5B%5D=recipient-2&date_from=1777680000&date_to=1780272000 response: body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"desktop","count":1},{"name":"webmail","count":1}]}}' + string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' headers: CF-RAY: - - 966c83eb293ee296-BEG + - a16ed0eb9862562e-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:49 GMT + - Mon, 06 Jul 2026 13:04:35 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '56' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_user_agent_basic.yaml b/tests/fixtures/cassettes/analytics_user_agent_basic.yaml index 5156a1f..87814c5 100644 --- a/tests/fixtures/cassettes/analytics_user_agent_basic.yaml +++ b/tests/fixtures/cassettes/analytics_user_agent_basic.yaml @@ -11,16 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/ua-name?date_from=1746144000&date_to=1748736000 + uri: https://api.mailersend.com/v1/analytics/ua-name?date_from=1777680000&date_to=1780272000 response: body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"UNK","count":1},{"name":"Microsoft - Edge","count":1}]}}' + string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' headers: CF-RAY: - - 966c83e77d87e290-BEG + - a16ed0e8becc126d-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:49 GMT + - Mon, 06 Jul 2026 13:04:34 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '53' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/analytics_user_agent_with_domain.yaml b/tests/fixtures/cassettes/analytics_user_agent_with_domain.yaml index d442229..ac821b2 100644 --- a/tests/fixtures/cassettes/analytics_user_agent_with_domain.yaml +++ b/tests/fixtures/cassettes/analytics_user_agent_with_domain.yaml @@ -11,16 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/analytics/ua-name?domain_id=your-domain-id&date_from=1746144000&date_to=1748736000 + uri: https://api.mailersend.com/v1/analytics/ua-name?domain_id=your-domain-id&date_from=1777680000&date_to=1780272000 response: body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"UNK","count":1},{"name":"Microsoft - Edge","count":1}]}}' + string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' headers: CF-RAY: - - 966c83e88fd0c687-BEG + - a16ed0e9bf943267-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:10:49 GMT + - Mon, 06 Jul 2026 13:04:34 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '63' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_create_minimal.yaml b/tests/fixtures/cassettes/domains_create_minimal.yaml index f43ae08..1e9e5bf 100644 --- a/tests/fixtures/cassettes/domains_create_minimal.yaml +++ b/tests/fixtures/cassettes/domains_create_minimal.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"name": "hrcek.info"}' + body: '{"name": "test.fail"}' headers: Accept: - application/json @@ -9,21 +9,21 @@ interactions: Connection: - keep-alive Content-Length: - - '22' + - '21' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/domains response: body: - string: '{"data":{"id":"y7zpl98d72545vx6","name":"hrcek.info","dkim":null,"spf":null,"mx":null,"tracking":null,"is_verified":false,"is_dns_active":false,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click + string: '{"data":{"id":"3m5jgr9n7rxgdpyo","name":"test.fail","dkim":null,"spf":null,"mx":null,"tracking":null,"is_verified":false,"is_dns_active":false,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":null,"show_dkim_info":false,"is_being_verified":false}}' + here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"can":{"manage":true},"totals":[],"is_dkim_txt":null,"show_dkim_info":false,"is_being_verified":false,"is_custom_links_available":false}}' headers: CF-RAY: - - 966c87d49a4b562e-BEG + - a16ed0f859ec0a8e-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:50 GMT + - Mon, 06 Jul 2026 13:04:57 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '20311' status: code: 201 message: Created @@ -61,31 +63,33 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE - uri: https://api.mailersend.com/v1/domains/y7zpl98d72545vx6 + uri: https://api.mailersend.com/v1/domains/3m5jgr9n7rxgdpyo response: body: string: '' headers: CF-RAY: - - 966c8855eac871a6-BEG + - a16ed177e889e296-BEG Cache-Control: - no-cache, private Connection: - keep-alive Date: - - Tue, 29 Jul 2025 12:13:50 GMT + - Mon, 06 Jul 2026 13:04:57 GMT Server: - cloudflare + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '117' status: code: 204 message: No Content diff --git a/tests/fixtures/cassettes/domains_delete_not_found.yaml b/tests/fixtures/cassettes/domains_delete_not_found.yaml index 2e71c9a..e5beffb 100644 --- a/tests/fixtures/cassettes/domains_delete_not_found.yaml +++ b/tests/fixtures/cassettes/domains_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/domains/non-existent-domain-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966c886b6dd0c687-BEG + - a16ed18759d28e88-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:53 GMT + - Mon, 06 Jul 2026 13:05:00 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/domains_delete_success.yaml b/tests/fixtures/cassettes/domains_delete_success.yaml index 81912ea..71f9a3d 100644 --- a/tests/fixtures/cassettes/domains_delete_success.yaml +++ b/tests/fixtures/cassettes/domains_delete_success.yaml @@ -13,17 +13,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/domains response: body: - string: '{"data":{"id":"vz9dlem9wn14kj50","name":"somerandomdomain.com","dkim":null,"spf":null,"mx":null,"tracking":null,"is_verified":false,"is_dns_active":false,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click + string: '{"data":{"id":"q3enl6x2jrml2vwr","name":"somerandomdomain.com","dkim":null,"spf":null,"mx":null,"tracking":null,"is_verified":false,"is_dns_active":false,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":null,"show_dkim_info":false,"is_being_verified":false}}' + here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"can":{"manage":true},"totals":[],"is_dkim_txt":null,"show_dkim_info":false,"is_being_verified":false,"is_custom_links_available":false}}' headers: CF-RAY: - - 966c8866b8fb870d-BEG + - a16ed1846f70aeaa-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:53 GMT + - Mon, 06 Jul 2026 13:04:59 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '176' status: code: 201 message: Created @@ -61,31 +63,33 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE - uri: https://api.mailersend.com/v1/domains/vz9dlem9wn14kj50 + uri: https://api.mailersend.com/v1/domains/q3enl6x2jrml2vwr response: body: string: '' headers: CF-RAY: - - 966c8869fbe6cf86-BEG + - a16ed1860b065165-BEG Cache-Control: - no-cache, private Connection: - keep-alive Date: - - Tue, 29 Jul 2025 12:13:53 GMT + - Mon, 06 Jul 2026 13:05:00 GMT Server: - cloudflare + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '111' status: code: 204 message: No Content diff --git a/tests/fixtures/cassettes/domains_dns_records_not_found.yaml b/tests/fixtures/cassettes/domains_dns_records_not_found.yaml index 1c577ea..1b7e2b6 100644 --- a/tests/fixtures/cassettes/domains_dns_records_not_found.yaml +++ b/tests/fixtures/cassettes/domains_dns_records_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/non-existent-domain-id/dns-records response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966c885c3be6f339-BEG + - a16ed17cfe46d814-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:51 GMT + - Mon, 06 Jul 2026 13:04:58 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/domains_dns_records_success.yaml b/tests/fixtures/cassettes/domains_dns_records_success.yaml index b25b162..a1a9940 100644 --- a/tests/fixtures/cassettes/domains_dns_records_success.yaml +++ b/tests/fixtures/cassettes/domains_dns_records_success.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/dns-records response: @@ -21,7 +21,7 @@ interactions: a mx include:_spf.mlsend.com ~all"},"dkim":{"hostname":"mlsend2._domainkey.igor.fail","type":"CNAME","value":"mlsend2._domainkey.mailersend.net"},"return_path":{"hostname":"mta.igor.fail","type":"CNAME","value":"mailersend.net"},"custom_tracking":{"hostname":"track.igor.fail","type":"CNAME","value":"links.mailersend.net"},"inbound_routing":{"hostname":"inbound.igor.fail","type":"MX","value":"inbound.mailersend.net","priority":"10"}}}' headers: CF-RAY: - - 966c885aa96be297-BEG + - a16ed17bfae8aeaa-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:51 GMT + - Mon, 06 Jul 2026 13:04:58 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '74' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_get_not_found.yaml b/tests/fixtures/cassettes/domains_get_not_found.yaml index dbe60ec..4c0db10 100644 --- a/tests/fixtures/cassettes/domains_get_not_found.yaml +++ b/tests/fixtures/cassettes/domains_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/non-existent-domain-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966c87d39ef0b01b-BEG + - a16ed0f778001b8b-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:29 GMT + - Mon, 06 Jul 2026 13:04:37 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/domains_get_success.yaml b/tests/fixtures/cassettes/domains_get_success.yaml index 00b5387..565027c 100644 --- a/tests/fixtures/cassettes/domains_get_success.yaml +++ b/tests/fixtures/cassettes/domains_get_success.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12 response: body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-28T12:22:48.000000Z","totals":{"sent":0,"delivered":47,"hard_bounced":2,"soft_bounced":0}}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:02:21.000000Z","totals":{"sent":0,"delivered":94,"hard_bounced":2,"soft_bounced":0}}}' headers: CF-RAY: - - 966c878a5e434f59-VIE + - a16ed0f6aba0dfc0-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:17 GMT + - Mon, 06 Jul 2026 13:04:36 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_list_basic.yaml b/tests/fixtures/cassettes/domains_list_basic.yaml index 64d5d07..785cdfb 100644 --- a/tests/fixtures/cassettes/domains_list_basic.yaml +++ b/tests/fixtures/cassettes/domains_list_basic.yaml @@ -11,21 +11,23 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains?page=1&limit=10 response: body: - string: '{"data":[{"id":"xkjn41mjxp94z781","name":"bob.fail","dkim":true,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":false,"is_cname_active":true,"is_tracking_allowed":false,"domain_stats":{"total":0,"queued":0,"sent":0,"rejected":0,"delivered":0},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click + string: '{"data":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":1,"queued":0,"sent":0,"rejected":0,"delivered":1},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-28T12:20:46.000000Z","totals":[]},{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":true,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z","totals":[]},{"id":"xkjn41mjxp94z781","name":"bob.fail","dkim":false,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":2,"queued":0,"sent":0,"rejected":0,"delivered":2},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click + here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click + here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z","totals":[]},{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-28T12:22:48.000000Z","totals":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":10,"to":2,"total":2}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:02:21.000000Z","totals":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":10,"to":3,"total":3}}' headers: CF-RAY: - - 966c87ce4fede28f-BEG + - a16ed0f36e7355ad-BEG Cache-Control: - no-cache, private Connection: @@ -35,19 +37,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:28 GMT + - Mon, 06 Jul 2026 13:04:36 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_list_builder.yaml b/tests/fixtures/cassettes/domains_list_builder.yaml index 6563d00..557d58e 100644 --- a/tests/fixtures/cassettes/domains_list_builder.yaml +++ b/tests/fixtures/cassettes/domains_list_builder.yaml @@ -11,21 +11,23 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains?page=1&limit=15 response: body: - string: '{"data":[{"id":"xkjn41mjxp94z781","name":"bob.fail","dkim":true,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":false,"is_cname_active":true,"is_tracking_allowed":false,"domain_stats":{"total":0,"queued":0,"sent":0,"rejected":0,"delivered":0},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click + string: '{"data":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":1,"queued":0,"sent":0,"rejected":0,"delivered":1},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-28T12:20:46.000000Z","totals":[]},{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":true,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z","totals":[]},{"id":"xkjn41mjxp94z781","name":"bob.fail","dkim":false,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":2,"queued":0,"sent":0,"rejected":0,"delivered":2},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click + here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click + here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z","totals":[]},{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-28T12:22:48.000000Z","totals":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":15,"to":2,"total":2}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:02:21.000000Z","totals":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":15,"to":3,"total":3}}' headers: CF-RAY: - - 966c87d2acddc687-BEG + - a16ed0f5da270db0-BEG Cache-Control: - no-cache, private Connection: @@ -35,19 +37,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:29 GMT + - Mon, 06 Jul 2026 13:04:36 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_list_pagination.yaml b/tests/fixtures/cassettes/domains_list_pagination.yaml index 86a9410..869e6a2 100644 --- a/tests/fixtures/cassettes/domains_list_pagination.yaml +++ b/tests/fixtures/cassettes/domains_list_pagination.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains?page=2&limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":"https:\/\/api.mailersend.com\/v1\/domains?page=1","next":null},"meta":{"current_page":2,"from":null,"last_page":1,"links":[{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","active":false},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":10,"to":null,"total":2}}' + Previous","page":1,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","page":1,"active":false},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":10,"to":null,"total":3}}' headers: CF-RAY: - - 966c87cfa9eeb30f-BEG + - a16ed0f438ca8e88-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:29 GMT + - Mon, 06 Jul 2026 13:04:36 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_list_verified.yaml b/tests/fixtures/cassettes/domains_list_verified.yaml index b682f6f..802f456 100644 --- a/tests/fixtures/cassettes/domains_list_verified.yaml +++ b/tests/fixtures/cassettes/domains_list_verified.yaml @@ -11,21 +11,23 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains?page=1&limit=10 response: body: - string: '{"data":[{"id":"xkjn41mjxp94z781","name":"bob.fail","dkim":true,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":false,"is_cname_active":true,"is_tracking_allowed":false,"domain_stats":{"total":0,"queued":0,"sent":0,"rejected":0,"delivered":0},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click + string: '{"data":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":1,"queued":0,"sent":0,"rejected":0,"delivered":1},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-28T12:20:46.000000Z","totals":[]},{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":true,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z","totals":[]},{"id":"xkjn41mjxp94z781","name":"bob.fail","dkim":false,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":2,"queued":0,"sent":0,"rejected":0,"delivered":2},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click + here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click + here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z","totals":[]},{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-28T12:22:48.000000Z","totals":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":10,"to":2,"total":2}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:02:21.000000Z","totals":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":10,"to":3,"total":3}}' headers: CF-RAY: - - 966c87d14e06aeaa-BEG + - a16ed0f50d4dcf86-BEG Cache-Control: - no-cache, private Connection: @@ -35,19 +37,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:29 GMT + - Mon, 06 Jul 2026 13:04:36 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_recipients_basic.yaml b/tests/fixtures/cassettes/domains_recipients_basic.yaml index 0cafcb7..e886407 100644 --- a/tests/fixtures/cassettes/domains_recipients_basic.yaml +++ b/tests/fixtures/cassettes/domains_recipients_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/recipients?page=1&limit=25 response: body: - string: '{"data":[{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa816963207eb25a039f5","email":"ms-sdk-bcc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients","per_page":25,"to":5}}' + string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients","per_page":25,"to":9}}' headers: CF-RAY: - - 966c8863de5ae293-BEG + - a16ed181bd83f339-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:52 GMT + - Mon, 06 Jul 2026 13:04:59 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_recipients_builder.yaml b/tests/fixtures/cassettes/domains_recipients_builder.yaml index 2e6f557..a48dc22 100644 --- a/tests/fixtures/cassettes/domains_recipients_builder.yaml +++ b/tests/fixtures/cassettes/domains_recipients_builder.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/recipients?page=1&limit=20 response: body: - string: '{"data":[{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa816963207eb25a039f5","email":"ms-sdk-bcc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients","per_page":20,"to":5}}' + string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients","per_page":20,"to":9}}' headers: CF-RAY: - - 966c8865cc57e28f-BEG + - a16ed18388d2c239-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:53 GMT + - Mon, 06 Jul 2026 13:04:59 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_recipients_pagination.yaml b/tests/fixtures/cassettes/domains_recipients_pagination.yaml index d44c2f5..cd9a82e 100644 --- a/tests/fixtures/cassettes/domains_recipients_pagination.yaml +++ b/tests/fixtures/cassettes/domains_recipients_pagination.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/recipients?page=2&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","last":null,"prev":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","next":null},"meta":{"current_page":2,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","last":null,"prev":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","next":null},"meta":{"current_page":2,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=2","from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients","per_page":10,"to":null}}' headers: CF-RAY: - - 966c8864dad496e0-BEG + - a16ed182af131f09-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:52 GMT + - Mon, 06 Jul 2026 13:04:59 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '49' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_settings_workflow.yaml b/tests/fixtures/cassettes/domains_settings_workflow.yaml index 95e7859..ae39b7b 100644 --- a/tests/fixtures/cassettes/domains_settings_workflow.yaml +++ b/tests/fixtures/cassettes/domains_settings_workflow.yaml @@ -14,17 +14,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings response: body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:13:52.000000Z","totals":[]}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:58.000000Z","totals":[]}}' headers: CF-RAY: - - 966c886c28ec562e-BEG + - a16ed1883ff9126d-BEG Cache-Control: - no-cache, private Connection: @@ -34,19 +34,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:54 GMT + - Mon, 06 Jul 2026 13:05:00 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '45' status: code: 200 message: OK @@ -62,17 +64,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12 response: body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:13:52.000000Z","totals":{"sent":0,"delivered":47,"hard_bounced":2,"soft_bounced":0}}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:58.000000Z","totals":{"sent":0,"delivered":94,"hard_bounced":2,"soft_bounced":0}}}' headers: CF-RAY: - - 966c886d5f429857-BEG + - a16ed1891bb8e291-BEG Cache-Control: - no-cache, private Connection: @@ -82,19 +84,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:54 GMT + - Mon, 06 Jul 2026 13:05:00 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '49' status: code: 200 message: OK @@ -113,17 +117,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings response: body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:13:54.000000Z","totals":[]}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z","totals":[]}}' headers: CF-RAY: - - 966c886e597a96e0-BEG + - a16ed189e82eb01e-BEG Cache-Control: - no-cache, private Connection: @@ -133,19 +137,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:54 GMT + - Mon, 06 Jul 2026 13:05:00 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '55' status: code: 200 message: OK @@ -161,17 +167,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12 response: body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:13:54.000000Z","totals":{"sent":0,"delivered":47,"hard_bounced":2,"soft_bounced":0}}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z","totals":{"sent":0,"delivered":94,"hard_bounced":2,"soft_bounced":0}}}' headers: CF-RAY: - - 966c886f3875e296-BEG + - a16ed18aefd9d814-BEG Cache-Control: - no-cache, private Connection: @@ -181,19 +187,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:54 GMT + - Mon, 06 Jul 2026 13:05:00 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '43' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_update_settings_builder.yaml b/tests/fixtures/cassettes/domains_update_settings_builder.yaml index ea49673..39369e2 100644 --- a/tests/fixtures/cassettes/domains_update_settings_builder.yaml +++ b/tests/fixtures/cassettes/domains_update_settings_builder.yaml @@ -14,17 +14,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings response: body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:13:51.000000Z","totals":[]}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:58.000000Z","totals":[]}}' headers: CF-RAY: - - 966c88597b74f339-BEG + - a16ed17af81fe297-BEG Cache-Control: - no-cache, private Connection: @@ -34,19 +34,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:51 GMT + - Mon, 06 Jul 2026 13:04:58 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '55' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_update_settings_pause.yaml b/tests/fixtures/cassettes/domains_update_settings_pause.yaml index 11dadcc..71b474d 100644 --- a/tests/fixtures/cassettes/domains_update_settings_pause.yaml +++ b/tests/fixtures/cassettes/domains_update_settings_pause.yaml @@ -13,17 +13,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings response: body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:13:50.000000Z","totals":[]}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:58.000000Z","totals":[]}}' headers: CF-RAY: - - 966c88588816e295-BEG + - a16ed17a1d88e294-BEG Cache-Control: - no-cache, private Connection: @@ -33,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:50 GMT + - Mon, 06 Jul 2026 13:04:58 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_update_settings_tracking.yaml b/tests/fixtures/cassettes/domains_update_settings_tracking.yaml index 10df4b8..7de3065 100644 --- a/tests/fixtures/cassettes/domains_update_settings_tracking.yaml +++ b/tests/fixtures/cassettes/domains_update_settings_tracking.yaml @@ -16,17 +16,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings response: body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":49,"queued":0,"sent":0,"rejected":2,"delivered":47},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:13:50.000000Z","totals":[]}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:57.000000Z","totals":[]}}' headers: CF-RAY: - - 966c88576be5f969-BEG + - a16ed1793bd35165-BEG Cache-Control: - no-cache, private Connection: @@ -36,19 +36,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:50 GMT + - Mon, 06 Jul 2026 13:04:57 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '53' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/domains_verification_not_found.yaml b/tests/fixtures/cassettes/domains_verification_not_found.yaml index 4cc2b23..f243a59 100644 --- a/tests/fixtures/cassettes/domains_verification_not_found.yaml +++ b/tests/fixtures/cassettes/domains_verification_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/non-existent-domain-id/verify response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966c8862e9dcc239-BEG + - a16ed180fa779857-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:52 GMT + - Mon, 06 Jul 2026 13:04:59 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '35' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/domains_verification_status.yaml b/tests/fixtures/cassettes/domains_verification_status.yaml index ed38bbe..51dd44b 100644 --- a/tests/fixtures/cassettes/domains_verification_status.yaml +++ b/tests/fixtures/cassettes/domains_verification_status.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/verify response: @@ -19,7 +19,7 @@ interactions: string: '{"message":"The domain is verified.","data":{"dkim":true,"spf":true,"mx":true,"tracking":false,"cname":false,"rp_cname":true}}' headers: CF-RAY: - - 966c885d1a2ee291-BEG + - a16ed17dbcb8f339-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:13:52 GMT + - Mon, 06 Jul 2026 13:04:58 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '422' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/email_send_bulk.yaml b/tests/fixtures/cassettes/email_send_bulk.yaml index 30789b1..695ac90 100644 --- a/tests/fixtures/cassettes/email_send_bulk.yaml +++ b/tests/fixtures/cassettes/email_send_bulk.yaml @@ -1,10 +1,10 @@ interactions: - request: - body: '[{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "html": - "

First Email

"}, {"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, - "to": [{"email": "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test - Email", "html": "

Second Email

"}]' + body: '[{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

First + Email

"}, {"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

Second + Email

"}]' headers: Accept: - application/json @@ -13,19 +13,19 @@ interactions: Connection: - keep-alive Content-Length: - - '355' + - '337' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/bulk-email response: body: - string: '{"message":"The bulk email is being processed.","bulk_email_id":"6888dfbc0beb2661ce76f512"}' + string: '{"message":"The bulk email is being processed.","bulk_email_id":"6a4ba7fecead680ed75f1be3"}' headers: CF-RAY: - - 966d6dfb6ca1126d-BEG + - a16ed1964d77c687-BEG Cache-Control: - no-cache, private Connection: @@ -33,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:50:36 GMT + - Mon, 06 Jul 2026 13:05:02 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '60' status: code: 202 message: Accepted diff --git a/tests/fixtures/cassettes/email_send_bulk_workflow.yaml b/tests/fixtures/cassettes/email_send_bulk_workflow.yaml index 753fb65..bd55da1 100644 --- a/tests/fixtures/cassettes/email_send_bulk_workflow.yaml +++ b/tests/fixtures/cassettes/email_send_bulk_workflow.yaml @@ -1,10 +1,10 @@ interactions: - request: - body: '[{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "html": - "

First Email

"}, {"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, - "to": [{"email": "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test - Email", "html": "

Second Email

"}]' + body: '[{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

First + Email

"}, {"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

Second + Email

"}]' headers: Accept: - application/json @@ -13,19 +13,19 @@ interactions: Connection: - keep-alive Content-Length: - - '355' + - '337' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/bulk-email response: body: - string: '{"message":"The bulk email is being processed.","bulk_email_id":"6888dfbd45fcac796bfecfb6"}' + string: '{"message":"The bulk email is being processed.","bulk_email_id":"6a4ba7fe601233499cce2610"}' headers: CF-RAY: - - 966d6dfcc8e8aeaa-BEG + - a16ed1973dff562e-BEG Cache-Control: - no-cache, private Connection: @@ -33,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:50:37 GMT + - Mon, 06 Jul 2026 13:05:02 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '65' status: code: 202 message: Accepted @@ -61,15 +63,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/bulk-email/6888dfbd45fcac796bfecfb6 + uri: https://api.mailersend.com/v1/bulk-email/6a4ba7fe601233499cce2610 response: body: - string: '{"data":{"id":"6888dfbd45fcac796bfecfb6","state":"queued","total_recipients_count":2,"suppressed_recipients_count":0,"suppressed_recipients":null,"validation_errors_count":0,"validation_errors":null,"messages_id":null,"created_at":"2025-07-29T14:50:37.000000Z","updated_at":"2025-07-29T14:50:37.000000Z"}}' + string: '{"data":{"id":"6a4ba7fe601233499cce2610","state":"queued","total_recipients_count":2,"suppressed_recipients_count":0,"suppressed_recipients":null,"validation_errors_count":0,"validation_errors":null,"messages_id":null,"created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"}}' headers: CF-RAY: - - 966d6dfddaabe294-BEG + - a16ed1980d99e295-BEG Cache-Control: - no-cache, private Connection: @@ -79,19 +81,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:50:37 GMT + - Mon, 06 Jul 2026 13:05:02 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '47' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/email_send_text_only.yaml b/tests/fixtures/cassettes/email_send_text_only.yaml index 88c8c5a..0ecad1e 100644 --- a/tests/fixtures/cassettes/email_send_text_only.yaml +++ b/tests/fixtures/cassettes/email_send_text_only.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "text": - "This is a test email"}' + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "text": "This + is a test email"}' headers: Accept: - application/json @@ -11,11 +11,11 @@ interactions: Connection: - keep-alive Content-Length: - - '177' + - '168' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -23,29 +23,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6deabfd9dcf8-VIE + - a16ed18cd81af339-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:34 GMT + - Mon, 06 Jul 2026 13:05:01 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '82' x-message-id: - - 6888dfbaf3cba3da787e6017 + - 6a4ba7fda0a5e230c0a64b6d x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_attachments.yaml b/tests/fixtures/cassettes/email_send_with_attachments.yaml index c1bad49..5b1263e 100644 --- a/tests/fixtures/cassettes/email_send_with_attachments.yaml +++ b/tests/fixtures/cassettes/email_send_with_attachments.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "html": - "

This is a test email

", "attachments": [{"content": "VGhpcyBpcyBhIHRlc3QgYXR0YWNobWVudCBmaWxlLg==", + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This + is a test email

", "attachments": [{"content": "VGhpcyBpcyBhIHRlc3QgYXR0YWNobWVudCBmaWxlLg==", "disposition": "attachment", "filename": "test_attachment.txt"}]}' headers: Accept: @@ -12,11 +12,11 @@ interactions: Connection: - keep-alive Content-Length: - - '326' + - '317' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -24,29 +24,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6defe93fbbed-BEG + - a16ed18f1c1e8e88-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:35 GMT + - Mon, 06 Jul 2026 13:05:01 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '102' x-message-id: - - 6888dfbbfdf2d4b386c9ef6e + - 6a4ba7fdf9f7d7c86a80e254 x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_base_params.yaml b/tests/fixtures/cassettes/email_send_with_base_params.yaml index 41ef1a3..306964b 100644 --- a/tests/fixtures/cassettes/email_send_with_base_params.yaml +++ b/tests/fixtures/cassettes/email_send_with_base_params.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "html": - "

This is a test email

"}' + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This + is a test email

"}' headers: Accept: - application/json @@ -11,11 +11,11 @@ interactions: Connection: - keep-alive Content-Length: - - '184' + - '175' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -23,29 +23,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6de8cca4b654-VIE + - a16ed18bca86d814-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:33 GMT + - Mon, 06 Jul 2026 13:05:00 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '79' x-message-id: - - 6888dfb97e2b7a6ce588f6de + - 6a4ba7fc3d9443c28e9a2d19 x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_cc_bcc.yaml b/tests/fixtures/cassettes/email_send_with_cc_bcc.yaml index c77e3bd..5995358 100644 --- a/tests/fixtures/cassettes/email_send_with_cc_bcc.yaml +++ b/tests/fixtures/cassettes/email_send_with_cc_bcc.yaml @@ -1,9 +1,9 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "cc": [{"email": "ms-sdk-cc@igor.fail", - "name": "Recipient"}], "bcc": [{"email": "ms-sdk-bcc@igor.fail", "name": "Recipient"}], - "subject": "Test Email", "html": "

This is a test email

"}' + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "cc": [{"email": "cc@igor.fail", "name": + "Recipient"}], "bcc": [{"email": "bcc@igor.fail", "name": "Recipient"}], "subject": + "Test Email", "html": "

This is a test email

"}' headers: Accept: - application/json @@ -12,11 +12,11 @@ interactions: Connection: - keep-alive Content-Length: - - '312' + - '289' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -24,29 +24,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6dec8b5aa2c1-VIE + - a16eda733ad81f09-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:34 GMT + - Mon, 06 Jul 2026 13:11:05 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '100' x-message-id: - - 6888dfbac89a067d6f805520 + - 6a4ba969f1ad063e8c7d47af x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_headers.yaml b/tests/fixtures/cassettes/email_send_with_headers.yaml index 3db6aa9..698496f 100644 --- a/tests/fixtures/cassettes/email_send_with_headers.yaml +++ b/tests/fixtures/cassettes/email_send_with_headers.yaml @@ -1,9 +1,9 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "html": - "

This is a test email

", "headers": [{"name": "X-Custom-Header", "value": - "Custom Value"}]}' + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This + is a test email

", "headers": [{"name": "X-Custom-Header", "value": "Custom + Value"}]}' headers: Accept: - application/json @@ -12,11 +12,11 @@ interactions: Connection: - keep-alive Content-Length: - - '251' + - '242' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -24,29 +24,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6df75d1871a6-BEG + - a16ed1933ed7e293-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:36 GMT + - Mon, 06 Jul 2026 13:05:02 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '84' x-message-id: - - 6888dfbc49f14409301e4d5c + - 6a4ba7fe89757eb80bdfbffe x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_reply_to.yaml b/tests/fixtures/cassettes/email_send_with_reply_to.yaml index 46bb11a..94ceac6 100644 --- a/tests/fixtures/cassettes/email_send_with_reply_to.yaml +++ b/tests/fixtures/cassettes/email_send_with_reply_to.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "reply_to": {"email": "ms-sdk-replyto@igor.fail", + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "reply_to": {"email": "replyto@igor.fail", "name": "Reply Handler"}, "subject": "Test Email", "html": "

This is a test email

"}' headers: @@ -12,11 +12,11 @@ interactions: Connection: - keep-alive Content-Length: - - '260' + - '244' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -24,29 +24,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6df8e8a60a8e-BEG + - a16ed1943d9ee28f-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:36 GMT + - Mon, 06 Jul 2026 13:05:02 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '78' x-message-id: - - 6888dfbc1b82c3def7569208 + - 6a4ba7fe257e065d3cdcc01e x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_tags.yaml b/tests/fixtures/cassettes/email_send_with_tags.yaml index 39f7dd9..7688e3e 100644 --- a/tests/fixtures/cassettes/email_send_with_tags.yaml +++ b/tests/fixtures/cassettes/email_send_with_tags.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "html": - "

This is a test email

", "tags": ["test", "automation", "api-test"]}' + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This + is a test email

", "tags": ["test", "automation", "api-test"]}' headers: Accept: - application/json @@ -11,11 +11,11 @@ interactions: Connection: - keep-alive Content-Length: - - '228' + - '219' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -23,29 +23,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6df208bfe290-BEG + - a16ed19048a0aeaa-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:35 GMT + - Mon, 06 Jul 2026 13:05:01 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '76' x-message-id: - - 6888dfbb37648449d59f51ac + - 6a4ba7fd18eecf5fff31b852 x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_template.yaml b/tests/fixtures/cassettes/email_send_with_template.yaml index 8170bba..be7dff0 100644 --- a/tests/fixtures/cassettes/email_send_with_template.yaml +++ b/tests/fixtures/cassettes/email_send_with_template.yaml @@ -1,9 +1,9 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "html": - "

This is a test email

", "template_id": "351ndgwkr8xgzqx8", "personalization": - [{"email": "igor@mailerlite.com", "data": {"name": "Recipient Name"}}]}' + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This + is a test email

", "personalization": [{"email": "to@igor.fail", "data": + {"name": "Recipient Name"}}]}' headers: Accept: - application/json @@ -12,11 +12,11 @@ interactions: Connection: - keep-alive Content-Length: - - '310' + - '259' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -24,29 +24,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6df59c8acf86-BEG + - a16ed192386755ad-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:36 GMT + - Mon, 06 Jul 2026 13:05:01 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '89' x-message-id: - - 6888dfbb94808450972a2cb5 + - 6a4ba7fd8bf4b9799385c29e x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_text_priority.yaml b/tests/fixtures/cassettes/email_send_with_text_priority.yaml index 7a819b2..b17a22e 100644 --- a/tests/fixtures/cassettes/email_send_with_text_priority.yaml +++ b/tests/fixtures/cassettes/email_send_with_text_priority.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "text": - "This is a plain text email for testing.", "html": "

This is a test email

", + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "text": "This + is a plain text email for testing.", "html": "

This is a test email

", "precedence_bulk": true}' headers: Accept: @@ -12,11 +12,11 @@ interactions: Connection: - keep-alive Content-Length: - - '260' + - '251' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -24,29 +24,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6dee582ff832-VIE + - a16ed18dfacfa8bc-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:34 GMT + - Mon, 06 Jul 2026 13:05:01 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '82' x-message-id: - - 6888dfba8942efdecfd82b5c + - 6a4ba7fdb8148e47a0a27202 x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_threading.yaml b/tests/fixtures/cassettes/email_send_with_threading.yaml index 2bdde8c..cb7c6da 100644 --- a/tests/fixtures/cassettes/email_send_with_threading.yaml +++ b/tests/fixtures/cassettes/email_send_with_threading.yaml @@ -1,9 +1,8 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "html": - "

This is a test email

", "in_reply_to": "ms-sdk-replyto@igor.fail", "references": - ["123456"]}' + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This + is a test email

", "in_reply_to": "replyto@igor.fail", "references": ["123456"]}' headers: Accept: - application/json @@ -12,11 +11,11 @@ interactions: Connection: - keep-alive Content-Length: - - '253' + - '237' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -24,29 +23,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6dfa3afcdfc0-BEG + - a16ed1953dc70380-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:36 GMT + - Mon, 06 Jul 2026 13:05:02 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '90' x-message-id: - - 6888dfbccbaaa97910fa1420 + - 6a4ba7fe5d67d4122d52ef46 x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_send_with_tracking.yaml b/tests/fixtures/cassettes/email_send_with_tracking.yaml index dfb6e4b..99cd035 100644 --- a/tests/fixtures/cassettes/email_send_with_tracking.yaml +++ b/tests/fixtures/cassettes/email_send_with_tracking.yaml @@ -1,9 +1,9 @@ interactions: - request: - body: '{"from": {"email": "ms-sdk@igor.fail", "name": "Sender"}, "to": [{"email": - "igor@mailerlite.com", "name": "Recipient"}], "subject": "Test Email", "html": - "

This is a test email

", "settings": {"track_clicks": true, "track_opens": - true, "track_content": false}}' + body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": + "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This + is a test email

", "settings": {"track_clicks": true, "track_opens": true, + "track_content": false}}' headers: Accept: - application/json @@ -12,11 +12,11 @@ interactions: Connection: - keep-alive Content-Length: - - '265' + - '256' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email response: @@ -24,29 +24,31 @@ interactions: string: '' headers: CF-RAY: - - 966d6df3ef4955ad-BEG + - a16ed1912e1d96e0-BEG Cache-Control: - no-cache, private Connection: - keep-alive Content-Type: - - text/html; charset=UTF-8 + - text/html; charset=utf-8 Date: - - Tue, 29 Jul 2025 14:50:35 GMT + - Mon, 06 Jul 2026 13:05:01 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '82' x-message-id: - - 6888dfbb555eb58cce8aeabe + - 6a4ba7fd29cbd2c32f82e6e2 x-send-paused: - 'true' status: diff --git a/tests/fixtures/cassettes/email_verification_api_response_structure.yaml b/tests/fixtures/cassettes/email_verification_api_response_structure.yaml index 3820f06..4ba79ab 100644 --- a/tests/fixtures/cassettes/email_verification_api_response_structure.yaml +++ b/tests/fixtures/cassettes/email_verification_api_response_structure.yaml @@ -11,16 +11,24 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/email-verification?page=1&limit=10 response: body: - string: '{"data":[{"id":"k68zxl2805lj9057","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2025-07-29T12:22:38.000000Z","updated_at":"2025-07-29T12:22:39.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xr9249yjre","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2025-07-29T12:22:40.000000Z","updated_at":"2025-07-29T12:22:40.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":2}}' + string: '{"data":[{"id":"ynrw7gym99jg2k8e","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:51:56.000000Z","updated_at":"2026-07-06T12:51:57.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"v69oxl5e22kl785k","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:51:57.000000Z","verification_ended":"2026-07-06T12:52:57.000000Z","created_at":"2026-07-06T12:51:57.000000Z","updated_at":"2026-07-06T12:52:57.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"z86org8e221gew13","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:53:09.000000Z","updated_at":"2026-07-06T12:53:09.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"zr6ke4n1xxvgon12","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:53:10.000000Z","verification_ended":"2026-07-06T12:54:10.000000Z","created_at":"2026-07-06T12:53:10.000000Z","updated_at":"2026-07-06T12:54:10.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"pxkjn41m2204z781","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:55:31.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"vywj2lpnqqmg7oqz","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:55:32.000000Z","verification_ended":"2026-07-06T12:56:32.000000Z","created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:56:32.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"0r83ql3pwwzgzw1j","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:57:23.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"k68zxl27rrk4j905","name":"Comprehensive + Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:24.000000Z","updated_at":"2026-07-06T12:57:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xw117g9yjr","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:02:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"neqvygm0z0zl0p7w","name":"Comprehensive + Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:24.000000Z","updated_at":"2026-07-06T13:02:25.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/email-verification?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":10}}' headers: CF-RAY: - - 966c9547ef9fbbed-BEG + - a16ed1a39cc7fa43-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +38,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:22:40 GMT + - Mon, 06 Jul 2026 13:05:04 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/email_verification_comprehensive_workflow.yaml b/tests/fixtures/cassettes/email_verification_comprehensive_workflow.yaml index eafa82a..0318362 100644 --- a/tests/fixtures/cassettes/email_verification_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/email_verification_comprehensive_workflow.yaml @@ -14,15 +14,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email-verification response: body: - string: '{"data":{"id":"neqvygmw1840p7w2","name":"Comprehensive Test List","total":0,"verification_started":null,"verification_ended":null,"created_at":"2025-07-29T12:25:11.000000Z","updated_at":"2025-07-29T12:25:11.000000Z","status":{"name":"uploading","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}}}' + string: '{"data":{"id":"351ndgwv7vrlzqx8","name":"Comprehensive Test List","total":0,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:03.000000Z","status":{"name":"uploading","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}}}' headers: CF-RAY: - - 966c98f8bdfb9d41-VIE + - a16ed19f2ec4a8bc-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:25:12 GMT + - Mon, 06 Jul 2026 13:05:04 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '218' status: code: 201 message: Created @@ -58,15 +60,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/email-verification/neqvygmw1840p7w2 + uri: https://api.mailersend.com/v1/email-verification/351ndgwv7vrlzqx8 response: body: - string: '{"data":{"id":"neqvygmw1840p7w2","name":"Comprehensive Test List","total":0,"verification_started":null,"verification_ended":null,"created_at":"2025-07-29T12:25:11.000000Z","updated_at":"2025-07-29T12:25:11.000000Z","status":{"name":"uploading","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}}}' + string: '{"data":{"id":"351ndgwv7vrlzqx8","name":"Comprehensive Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:04.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}}' headers: CF-RAY: - - 966c98fb4801d87b-VIE + - a16ed1a108ede295-BEG Cache-Control: - no-cache, private Connection: @@ -76,19 +78,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:25:12 GMT + - Mon, 06 Jul 2026 13:05:04 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 200 message: OK @@ -104,39 +108,42 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/email-verification/neqvygmw1840p7w2/verify + uri: https://api.mailersend.com/v1/email-verification/351ndgwv7vrlzqx8/verify response: body: - string: '{"message":"The email addresses are still being uploaded, wait for - the upload to finish to continue."}' + string: '{"data":{"id":"351ndgwv7vrlzqx8","name":"Comprehensive Test List","total":4,"verification_started":"2026-07-06T13:05:04.000000Z","verification_ended":null,"created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:04.000000Z","status":{"name":"verifying","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}}' headers: CF-RAY: - - 966c98fcba1a1479-VIE + - a16ed1a1b83b3267-BEG Cache-Control: - no-cache, private Connection: - keep-alive + Content-Encoding: + - gzip Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:25:12 GMT + - Mon, 06 Jul 2026 13:05:04 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '66' status: - code: 202 - message: Accepted + code: 200 + message: OK - request: body: null headers: @@ -149,15 +156,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET - uri: https://api.mailersend.com/v1/email-verification/neqvygmw1840p7w2/results?page=1&limit=10 + uri: https://api.mailersend.com/v1/email-verification/351ndgwv7vrlzqx8/results?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification\/neqvygmw1840p7w2\/results?1=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/email-verification\/neqvygmw1840p7w2\/results","per_page":"10","to":null}}' + string: '{"data":[{"address":"test1@example.com","result":null},{"address":"test2@example.com","result":null},{"address":"invalid-email","result":null},{"address":"test3@validexample.com","result":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification\/351ndgwv7vrlzqx8\/results?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification\/351ndgwv7vrlzqx8\/results?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification\/351ndgwv7vrlzqx8\/results","per_page":"10","to":4}}' headers: CF-RAY: - - 966c98fe3f273a0d-VIE + - a16ed1a29a50e28f-BEG Cache-Control: - no-cache, private Connection: @@ -167,19 +174,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:25:12 GMT + - Mon, 06 Jul 2026 13:05:04 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '73' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/email_verification_create_list.yaml b/tests/fixtures/cassettes/email_verification_create_list.yaml index ae1f093..b2cf696 100644 --- a/tests/fixtures/cassettes/email_verification_create_list.yaml +++ b/tests/fixtures/cassettes/email_verification_create_list.yaml @@ -14,15 +14,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/email-verification response: body: - string: '{"data":{"id":"k68zxl2805lj9057","name":"Test Verification List","total":0,"verification_started":null,"verification_ended":null,"created_at":"2025-07-29T12:22:38.000000Z","updated_at":"2025-07-29T12:22:38.000000Z","status":{"name":"uploading","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}}}' + string: '{"data":{"id":"z3m5jgro7oogdpyo","name":"Test Verification List","total":0,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:03.000000Z","status":{"name":"uploading","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}}}' headers: CF-RAY: - - 966c953c19250db0-BEG + - a16ed19a69530380-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:22:39 GMT + - Mon, 06 Jul 2026 13:05:03 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '219' status: code: 201 message: Created diff --git a/tests/fixtures/cassettes/email_verification_empty_list.yaml b/tests/fixtures/cassettes/email_verification_empty_list.yaml index 290d495..e684a98 100644 --- a/tests/fixtures/cassettes/email_verification_empty_list.yaml +++ b/tests/fixtures/cassettes/email_verification_empty_list.yaml @@ -11,16 +11,24 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/email-verification?page=1&limit=10 response: body: - string: '{"data":[{"id":"k68zxl2805lj9057","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2025-07-29T12:22:38.000000Z","updated_at":"2025-07-29T12:22:39.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xr9249yjre","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2025-07-29T12:22:40.000000Z","updated_at":"2025-07-29T12:22:40.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":2}}' + string: '{"data":[{"id":"ynrw7gym99jg2k8e","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:51:56.000000Z","updated_at":"2026-07-06T12:51:57.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"v69oxl5e22kl785k","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:51:57.000000Z","verification_ended":"2026-07-06T12:52:57.000000Z","created_at":"2026-07-06T12:51:57.000000Z","updated_at":"2026-07-06T12:52:57.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"z86org8e221gew13","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:53:09.000000Z","updated_at":"2026-07-06T12:53:09.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"zr6ke4n1xxvgon12","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:53:10.000000Z","verification_ended":"2026-07-06T12:54:10.000000Z","created_at":"2026-07-06T12:53:10.000000Z","updated_at":"2026-07-06T12:54:10.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"pxkjn41m2204z781","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:55:31.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"vywj2lpnqqmg7oqz","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:55:32.000000Z","verification_ended":"2026-07-06T12:56:32.000000Z","created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:56:32.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"0r83ql3pwwzgzw1j","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:57:23.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"k68zxl27rrk4j905","name":"Comprehensive + Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:24.000000Z","updated_at":"2026-07-06T12:57:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xw117g9yjr","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:02:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"neqvygm0z0zl0p7w","name":"Comprehensive + Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:24.000000Z","updated_at":"2026-07-06T13:02:25.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/email-verification?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":10}}' headers: CF-RAY: - - 966c9548cd8c9857-BEG + - a16ed1a46cc0b30f-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +38,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:22:40 GMT + - Mon, 06 Jul 2026 13:05:04 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/email_verification_get_not_found.yaml b/tests/fixtures/cassettes/email_verification_get_not_found.yaml index 94b98ca..fe3a0ec 100644 --- a/tests/fixtures/cassettes/email_verification_get_not_found.yaml +++ b/tests/fixtures/cassettes/email_verification_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/email-verification/non-existent-list-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966c95400fade28f-BEG + - a16ed19d0c70dfc0-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:22:39 GMT + - Mon, 06 Jul 2026 13:05:03 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/email_verification_get_results.yaml b/tests/fixtures/cassettes/email_verification_get_results.yaml index 8f1e7db..bc6a035 100644 --- a/tests/fixtures/cassettes/email_verification_get_results.yaml +++ b/tests/fixtures/cassettes/email_verification_get_results.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/email-verification/test-verification-list-id/results?page=1&limit=10 response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966c97f00914babc-VIE + - a16ed19e6f299857-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:24:29 GMT + - Mon, 06 Jul 2026 13:05:03 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/email_verification_get_single.yaml b/tests/fixtures/cassettes/email_verification_get_single.yaml index d9b33fb..ec8c910 100644 --- a/tests/fixtures/cassettes/email_verification_get_single.yaml +++ b/tests/fixtures/cassettes/email_verification_get_single.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/email-verification/test-verification-list-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966c953eebfde290-BEG + - a16ed19c58585165-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:22:39 GMT + - Mon, 06 Jul 2026 13:05:03 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/email_verification_list_basic.yaml b/tests/fixtures/cassettes/email_verification_list_basic.yaml index b458276..41da8f7 100644 --- a/tests/fixtures/cassettes/email_verification_list_basic.yaml +++ b/tests/fixtures/cassettes/email_verification_list_basic.yaml @@ -11,15 +11,24 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/email-verification?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":null}}' + string: '{"data":[{"id":"ynrw7gym99jg2k8e","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:51:56.000000Z","updated_at":"2026-07-06T12:51:57.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"v69oxl5e22kl785k","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:51:57.000000Z","verification_ended":"2026-07-06T12:52:57.000000Z","created_at":"2026-07-06T12:51:57.000000Z","updated_at":"2026-07-06T12:52:57.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"z86org8e221gew13","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:53:09.000000Z","updated_at":"2026-07-06T12:53:09.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"zr6ke4n1xxvgon12","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:53:10.000000Z","verification_ended":"2026-07-06T12:54:10.000000Z","created_at":"2026-07-06T12:53:10.000000Z","updated_at":"2026-07-06T12:54:10.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"pxkjn41m2204z781","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:55:31.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"vywj2lpnqqmg7oqz","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:55:32.000000Z","verification_ended":"2026-07-06T12:56:32.000000Z","created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:56:32.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"0r83ql3pwwzgzw1j","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:57:23.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"k68zxl27rrk4j905","name":"Comprehensive + Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:24.000000Z","updated_at":"2026-07-06T12:57:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xw117g9yjr","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:02:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"neqvygm0z0zl0p7w","name":"Comprehensive + Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:24.000000Z","updated_at":"2026-07-06T13:02:25.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/email-verification?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":10}}' headers: CF-RAY: - - 966c94ec299fc1f9-VIE + - a16ed198d8aee291-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +38,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:22:26 GMT + - Mon, 06 Jul 2026 13:05:02 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '51' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/email_verification_list_with_pagination.yaml b/tests/fixtures/cassettes/email_verification_list_with_pagination.yaml index 9d69b6e..0a06f92 100644 --- a/tests/fixtures/cassettes/email_verification_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/email_verification_list_with_pagination.yaml @@ -11,16 +11,24 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/email-verification?page=1&limit=10 response: body: - string: '{"data":[{"id":"k68zxl2805lj9057","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2025-07-29T12:22:38.000000Z","updated_at":"2025-07-29T12:22:39.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xr9249yjre","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2025-07-29T12:22:40.000000Z","updated_at":"2025-07-29T12:22:40.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":2}}' + string: '{"data":[{"id":"ynrw7gym99jg2k8e","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:51:56.000000Z","updated_at":"2026-07-06T12:51:57.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"v69oxl5e22kl785k","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:51:57.000000Z","verification_ended":"2026-07-06T12:52:57.000000Z","created_at":"2026-07-06T12:51:57.000000Z","updated_at":"2026-07-06T12:52:57.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"z86org8e221gew13","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:53:09.000000Z","updated_at":"2026-07-06T12:53:09.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"zr6ke4n1xxvgon12","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:53:10.000000Z","verification_ended":"2026-07-06T12:54:10.000000Z","created_at":"2026-07-06T12:53:10.000000Z","updated_at":"2026-07-06T12:54:10.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"pxkjn41m2204z781","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:55:31.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"vywj2lpnqqmg7oqz","name":"Comprehensive + Test List","total":4,"verification_started":"2026-07-06T12:55:32.000000Z","verification_ended":"2026-07-06T12:56:32.000000Z","created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:56:32.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"0r83ql3pwwzgzw1j","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:57:23.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"k68zxl27rrk4j905","name":"Comprehensive + Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:24.000000Z","updated_at":"2026-07-06T12:57:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xw117g9yjr","name":"Test + Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:02:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"neqvygm0z0zl0p7w","name":"Comprehensive + Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:24.000000Z","updated_at":"2026-07-06T13:02:25.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/email-verification?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":10}}' headers: CF-RAY: - - 966c97ee7eff8f2b-VIE + - a16ed199ab2a1f09-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +38,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:24:29 GMT + - Mon, 06 Jul 2026 13:05:03 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/email_verification_verify_list.yaml b/tests/fixtures/cassettes/email_verification_verify_list.yaml index 4523d68..c717479 100644 --- a/tests/fixtures/cassettes/email_verification_verify_list.yaml +++ b/tests/fixtures/cassettes/email_verification_verify_list.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/email-verification/test-verification-list-id/verify response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966c9540c9d5e295-BEG + - a16ed19dbdb7e290-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:22:39 GMT + - Mon, 06 Jul 2026 13:05:03 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '35' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/identities_create_not_available.yaml b/tests/fixtures/cassettes/identities_create_not_available.yaml index 7a2beb5..12fd0ad 100644 --- a/tests/fixtures/cassettes/identities_create_not_available.yaml +++ b/tests/fixtures/cassettes/identities_create_not_available.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"domain_id": "65qngkdovk8lwr12", "name": "Test Identity", "email": "ms-sdk@igor.fail", - "reply_to_email": "ms-sdk@igor.fail", "reply_to_name": "Reply Test", "add_note": + body: '{"domain_id": "65qngkdovk8lwr12", "name": "Test Identity", "email": "from@igor.fail", + "reply_to_email": "from@igor.fail", "reply_to_name": "Reply Test", "add_note": true, "personal_note": "Test identity for integration testing"}' headers: Accept: @@ -11,11 +11,11 @@ interactions: Connection: - keep-alive Content-Length: - - '232' + - '228' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/identities response: @@ -24,7 +24,7 @@ interactions: email has already been taken."]}}' headers: CF-RAY: - - 9684c6c4badff339-BEG + - a16ed1a52dbe1f09-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +32,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:50:46 GMT + - Mon, 06 Jul 2026 13:05:04 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '101' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/identities_delete_by_email.yaml b/tests/fixtures/cassettes/identities_delete_by_email.yaml index c91eece..e56b89a 100644 --- a/tests/fixtures/cassettes/identities_delete_by_email.yaml +++ b/tests/fixtures/cassettes/identities_delete_by_email.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/identities/email/test@example.com response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c6ccfcd5bbed-BEG + - a16ed1a9fcc53267-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:50:47 GMT + - Mon, 06 Jul 2026 13:05:05 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '35' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/identities_delete_by_id.yaml b/tests/fixtures/cassettes/identities_delete_by_id.yaml index fd9d0e2..ffde7f6 100644 --- a/tests/fixtures/cassettes/identities_delete_by_id.yaml +++ b/tests/fixtures/cassettes/identities_delete_by_id.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/identities/test-identity-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c6cc0ca3076b-BEG + - a16ed1a9480ce294-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:50:47 GMT + - Mon, 06 Jul 2026 13:05:05 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/identities_get_by_email.yaml b/tests/fixtures/cassettes/identities_get_by_email.yaml index aca4701..8f0d095 100644 --- a/tests/fixtures/cassettes/identities_get_by_email.yaml +++ b/tests/fixtures/cassettes/identities_get_by_email.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/identities/email/test@example.com response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c6c85d461f09-BEG + - a16ed1a70a900a8e-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:50:46 GMT + - Mon, 06 Jul 2026 13:05:05 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/identities_get_single.yaml b/tests/fixtures/cassettes/identities_get_single.yaml index b536d1f..2b11502 100644 --- a/tests/fixtures/cassettes/identities_get_single.yaml +++ b/tests/fixtures/cassettes/identities_get_single.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/identities/test-identity-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c6c70b1ce296-BEG + - a16ed1a65883e294-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:50:46 GMT + - Mon, 06 Jul 2026 13:05:05 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/identities_update_by_email.yaml b/tests/fixtures/cassettes/identities_update_by_email.yaml index 1caae89..835bf68 100644 --- a/tests/fixtures/cassettes/identities_update_by_email.yaml +++ b/tests/fixtures/cassettes/identities_update_by_email.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/identities/email/test@example.com response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c6cb0b621b8b-BEG + - a16ed1a8aef11778-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:50:47 GMT + - Mon, 06 Jul 2026 13:05:05 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/identities_update_by_id.yaml b/tests/fixtures/cassettes/identities_update_by_id.yaml index 2a92dad..ee8af40 100644 --- a/tests/fixtures/cassettes/identities_update_by_id.yaml +++ b/tests/fixtures/cassettes/identities_update_by_id.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/identities/test-identity-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c6c9b884f969-BEG + - a16ed1a7cfdb870d-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:50:46 GMT + - Mon, 06 Jul 2026 13:05:05 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '50' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/inbound_api_response_structure.yaml b/tests/fixtures/cassettes/inbound_api_response_structure.yaml index 65cf752..e45465a 100644 --- a/tests/fixtures/cassettes/inbound_api_response_structure.yaml +++ b/tests/fixtures/cassettes/inbound_api_response_structure.yaml @@ -11,17 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":null,"total":0}}' + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: CF-RAY: - - 966cbd2d1e0371a6-BEG + - a16ed1b0bab3b01e-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:54 GMT + - Mon, 06 Jul 2026 13:05:06 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '56' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/inbound_builder_create_invalid_domain.yaml b/tests/fixtures/cassettes/inbound_builder_create_invalid_domain.yaml index d2ed22a..f03ad44 100644 --- a/tests/fixtures/cassettes/inbound_builder_create_invalid_domain.yaml +++ b/tests/fixtures/cassettes/inbound_builder_create_invalid_domain.yaml @@ -15,105 +15,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/inbound - response: - body: - string: "{\n \"message\": \"You cannot create a resource at the moment. Please - wait a while before retrying.\"\n}" - headers: - CF-RAY: - - 9684ca5098130380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:53:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2025-08-02T00:00:00Z' - status: - code: 429 - message: Too Many Requests -- request: - body: '{"domain_id": "invalid-domain-id", "name": "Test Route", "domain_enabled": - false, "catch_filter": {"type": "catch_all"}, "match_filter": {"type": "match_all"}, - "forwards": [{"type": "email", "value": "test@example.com"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '221' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/inbound - response: - body: - string: "{\n \"message\": \"You cannot create a resource at the moment. Please - wait a while before retrying.\"\n}" - headers: - CF-RAY: - - 9684ca520f3f0a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:53:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2025-08-02T00:00:00Z' - status: - code: 429 - message: Too Many Requests -- request: - body: '{"domain_id": "invalid-domain-id", "name": "Test Route", "domain_enabled": - false, "catch_filter": {"type": "catch_all"}, "match_filter": {"type": "match_all"}, - "forwards": [{"type": "email", "value": "test@example.com"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '221' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/inbound response: @@ -122,7 +24,7 @@ interactions: domain id field is required. #MS42209"]}}' headers: CF-RAY: - - 9684ca572aad9857-BEG + - a16ed1b4fb141f09-BEG Cache-Control: - no-cache, private Connection: @@ -130,19 +32,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:53:12 GMT + - Mon, 06 Jul 2026 13:05:07 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '59' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/inbound_builder_get_not_found.yaml b/tests/fixtures/cassettes/inbound_builder_get_not_found.yaml index f748364..3a9e8ca 100644 --- a/tests/fixtures/cassettes/inbound_builder_get_not_found.yaml +++ b/tests/fixtures/cassettes/inbound_builder_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/inbound/test-inbound-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966cbd319c948e88-BEG + - a16ed1b42bd41b8b-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:55 GMT + - Mon, 06 Jul 2026 13:05:07 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/inbound_builder_list_basic.yaml b/tests/fixtures/cassettes/inbound_builder_list_basic.yaml index 5c7924f..b19d7b9 100644 --- a/tests/fixtures/cassettes/inbound_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/inbound_builder_list_basic.yaml @@ -11,17 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":null,"total":0}}' + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: CF-RAY: - - 966cbd2f9c02c687-BEG + - a16ed1b28c0e3267-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:55 GMT + - Mon, 06 Jul 2026 13:05:07 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '53' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml b/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml index 526eb6b..6319087 100644 --- a/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml +++ b/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml @@ -11,17 +11,18 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/inbound?page=1&limit=10&domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":null,"total":0}}' + string: '{"data":[{"id":"7dnvo4d971xg5r86","name":"My Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":2,"total":2}}' headers: CF-RAY: - - 966cbd308f235165-BEG + - a16ed1b35fba5165-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +32,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:55 GMT + - Mon, 06 Jul 2026 13:05:07 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '55' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/inbound_comprehensive_workflow.yaml b/tests/fixtures/cassettes/inbound_comprehensive_workflow.yaml deleted file mode 100644 index b2d2f5d..0000000 --- a/tests/fixtures/cassettes/inbound_comprehensive_workflow.yaml +++ /dev/null @@ -1,140 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound?page=1&limit=10&domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - 966cbe9f7caddfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:50:54 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2025-07-30T00:00:00Z' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound?page=1&limit=10&domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - 966cbea08e64e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:50:54 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2025-07-30T00:00:00Z' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966cbea1ba5871a3-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:50:54 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/inbound_create_invalid_domain.yaml b/tests/fixtures/cassettes/inbound_create_invalid_domain.yaml index 7ff1503..094e3b1 100644 --- a/tests/fixtures/cassettes/inbound_create_invalid_domain.yaml +++ b/tests/fixtures/cassettes/inbound_create_invalid_domain.yaml @@ -3,7 +3,7 @@ interactions: body: '{"domain_id": "invalid-domain-id", "name": "Test Inbound Route", "domain_enabled": false, "catch_filter": {"type": "catch_all"}, "catch_type": "all", "match_filter": {"type": "match_all"}, "match_type": "all", "forwards": [{"type": "email", "value": - "ms-sdk@igor.fail"}]}' + "from@igor.fail"}]}' headers: Accept: - application/json @@ -12,11 +12,11 @@ interactions: Connection: - keep-alive Content-Length: - - '271' + - '269' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/inbound response: @@ -25,7 +25,7 @@ interactions: domain id field is required. #MS42209"]}}' headers: CF-RAY: - - 9684ca4d2ae2b018-BEG + - a16ed1ae28ee870d-BEG Cache-Control: - no-cache, private Connection: @@ -33,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:53:10 GMT + - Mon, 06 Jul 2026 13:05:06 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '57' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/inbound_delete_not_found.yaml b/tests/fixtures/cassettes/inbound_delete_not_found.yaml index ceddac2..8a28292 100644 --- a/tests/fixtures/cassettes/inbound_delete_not_found.yaml +++ b/tests/fixtures/cassettes/inbound_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/inbound/test-inbound-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966cbd2c5abf55ad-BEG + - a16ed1afeaf3cf86-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:54 GMT + - Mon, 06 Jul 2026 13:05:06 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '51' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/inbound_empty_result.yaml b/tests/fixtures/cassettes/inbound_empty_result.yaml index d695b91..864af90 100644 --- a/tests/fixtures/cassettes/inbound_empty_result.yaml +++ b/tests/fixtures/cassettes/inbound_empty_result.yaml @@ -11,17 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":null,"total":0}}' + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: CF-RAY: - - 966cbd2e98cfc687-BEG + - a16ed1b19bb1e297-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:55 GMT + - Mon, 06 Jul 2026 13:05:06 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '60' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/inbound_get_not_found.yaml b/tests/fixtures/cassettes/inbound_get_not_found.yaml index c570d02..646de4a 100644 --- a/tests/fixtures/cassettes/inbound_get_not_found.yaml +++ b/tests/fixtures/cassettes/inbound_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/inbound/test-inbound-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966cbd2879dce295-BEG + - a16ed1ad5c290380-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:54 GMT + - Mon, 06 Jul 2026 13:05:06 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '48' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/inbound_list_basic.yaml b/tests/fixtures/cassettes/inbound_list_basic.yaml index d89c02b..4d2e2b1 100644 --- a/tests/fixtures/cassettes/inbound_list_basic.yaml +++ b/tests/fixtures/cassettes/inbound_list_basic.yaml @@ -11,17 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":null,"total":0}}' + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: CF-RAY: - - 966cbd242e1ef969-BEG + - a16ed1aabd13e28f-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:53 GMT + - Mon, 06 Jul 2026 13:05:05 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '51' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml b/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml index fe22ff4..a257a44 100644 --- a/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml +++ b/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml @@ -11,17 +11,18 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/inbound?page=1&limit=10&domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":null,"total":0}}' + string: '{"data":[{"id":"7dnvo4d971xg5r86","name":"My Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":2,"total":2}}' headers: CF-RAY: - - 966cbd277a6a0380-BEG + - a16ed1ac797ee28f-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +32,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:53 GMT + - Mon, 06 Jul 2026 13:05:06 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '54' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/inbound_list_with_pagination.yaml b/tests/fixtures/cassettes/inbound_list_with_pagination.yaml index 13bcfb0..1d3e81b 100644 --- a/tests/fixtures/cassettes/inbound_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/inbound_list_with_pagination.yaml @@ -11,17 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":null,"total":0}}' + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: CF-RAY: - - 966cbd25fe38b01e-BEG + - a16ed1ab9ea4e298-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:49:53 GMT + - Mon, 06 Jul 2026 13:05:05 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '62' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/inbound_update_not_found.yaml b/tests/fixtures/cassettes/inbound_update_not_found.yaml index 908309e..c9cb33c 100644 --- a/tests/fixtures/cassettes/inbound_update_not_found.yaml +++ b/tests/fixtures/cassettes/inbound_update_not_found.yaml @@ -2,7 +2,7 @@ interactions: - request: body: '{"name": "Test Inbound Route", "domain_enabled": false, "catch_filter": {"type": "catch_all"}, "catch_type": "all", "match_filter": {"type": "match_all"}, - "match_type": "all", "forwards": [{"type": "email", "value": "ms-sdk@igor.fail"}]}' + "match_type": "all", "forwards": [{"type": "email", "value": "from@igor.fail"}]}' headers: Accept: - application/json @@ -11,11 +11,11 @@ interactions: Connection: - keep-alive Content-Length: - - '237' + - '235' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/inbound/test-inbound-id response: @@ -23,7 +23,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684ca4eea11f969-BEG + - a16ed1af095ca8bc-BEG Cache-Control: - no-cache, private Connection: @@ -33,15 +33,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:53:11 GMT + - Mon, 06 Jul 2026 13:05:06 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '53' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/invites_cancel.yaml b/tests/fixtures/cassettes/invites_cancel.yaml index 7881e2f..4e7fbd4 100644 --- a/tests/fixtures/cassettes/invites_cancel.yaml +++ b/tests/fixtures/cassettes/invites_cancel.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/invites/test-invite-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d3dcfff125165-BEG + - a16ed239cfc6e28f-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:43 GMT + - Mon, 06 Jul 2026 13:05:28 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/invites_get_single.yaml b/tests/fixtures/cassettes/invites_get_single.yaml index 5c9bccc..aec1e1d 100644 --- a/tests/fixtures/cassettes/invites_get_single.yaml +++ b/tests/fixtures/cassettes/invites_get_single.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/invites/test-invite-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d3dcd8e9b8e88-BEG + - a16ed2385f23f339-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:43 GMT + - Mon, 06 Jul 2026 13:05:28 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '40' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/invites_list_basic.yaml b/tests/fixtures/cassettes/invites_list_basic.yaml index 8f6712b..d6c41f1 100644 --- a/tests/fixtures/cassettes/invites_list_basic.yaml +++ b/tests/fixtures/cassettes/invites_list_basic.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/invites?limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/invites?page=1","last":"https:\/\/api.mailersend.com\/v1\/invites?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/invites?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/invites","per_page":10,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/invites?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/invites","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d3dcc8f53e297-BEG + - a16ed2379eb79857-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:43 GMT + - Mon, 06 Jul 2026 13:05:28 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/invites_resend.yaml b/tests/fixtures/cassettes/invites_resend.yaml index d0f7a5f..c6263f5 100644 --- a/tests/fixtures/cassettes/invites_resend.yaml +++ b/tests/fixtures/cassettes/invites_resend.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/invites/test-invite-id/resend response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d3dced892f339-BEG + - a16ed2391a0ce294-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:43 GMT + - Mon, 06 Jul 2026 13:05:28 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/messages_api_response_structure.yaml b/tests/fixtures/cassettes/messages_api_response_structure.yaml index f88a5ad..cd7c998 100644 --- a/tests/fixtures/cassettes/messages_api_response_structure.yaml +++ b/tests/fixtures/cassettes/messages_api_response_structure.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages?page=1&limit=10 response: body: - string: '{"data":[{"id":"6888bb9efa41a66318120533","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bb9ee6a7f64df5de96ad","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bc42dbd40844151919b7","created_at":"2025-07-29T12:19:14.000000Z","updated_at":"2025-07-29T12:19:14.000000Z"},{"id":"6888bb59bbd49a78d3334484","created_at":"2025-07-29T12:15:21.000000Z","updated_at":"2025-07-29T12:15:21.000000Z"},{"id":"6888bbb9b713a022b0acd094","created_at":"2025-07-29T12:16:57.000000Z","updated_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":5}}' + string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' headers: CF-RAY: - - 966d2816ee94dfc0-BEG + - a16ed1b8fc1ea8bc-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:54 GMT + - Mon, 06 Jul 2026 13:05:08 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '50' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/messages_builder_get_not_found.yaml b/tests/fixtures/cassettes/messages_builder_get_not_found.yaml index e02a75f..38ec285 100644 --- a/tests/fixtures/cassettes/messages_builder_get_not_found.yaml +++ b/tests/fixtures/cassettes/messages_builder_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages/test-message-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d281c5e83126d-BEG + - a16ed1bc496ddfc0-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:54 GMT + - Mon, 06 Jul 2026 13:05:08 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '47' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/messages_builder_list_basic.yaml b/tests/fixtures/cassettes/messages_builder_list_basic.yaml index 89c2b3b..4f30476 100644 --- a/tests/fixtures/cassettes/messages_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/messages_builder_list_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages?page=1&limit=10 response: body: - string: '{"data":[{"id":"6888bb9efa41a66318120533","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bb9ee6a7f64df5de96ad","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bc42dbd40844151919b7","created_at":"2025-07-29T12:19:14.000000Z","updated_at":"2025-07-29T12:19:14.000000Z"},{"id":"6888bb59bbd49a78d3334484","created_at":"2025-07-29T12:15:21.000000Z","updated_at":"2025-07-29T12:15:21.000000Z"},{"id":"6888bbb9b713a022b0acd094","created_at":"2025-07-29T12:16:57.000000Z","updated_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":5}}' + string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' headers: CF-RAY: - - 966d281a0b580db0-BEG + - a16ed1ba9efebbed-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:54 GMT + - Mon, 06 Jul 2026 13:05:08 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '52' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/messages_builder_list_with_custom_limit.yaml b/tests/fixtures/cassettes/messages_builder_list_with_custom_limit.yaml index b5a4658..ff67284 100644 --- a/tests/fixtures/cassettes/messages_builder_list_with_custom_limit.yaml +++ b/tests/fixtures/cassettes/messages_builder_list_with_custom_limit.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages?page=1&limit=50 response: body: - string: '{"data":[{"id":"6888bb9efa41a66318120533","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bb9ee6a7f64df5de96ad","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bc42dbd40844151919b7","created_at":"2025-07-29T12:19:14.000000Z","updated_at":"2025-07-29T12:19:14.000000Z"},{"id":"6888bb59bbd49a78d3334484","created_at":"2025-07-29T12:15:21.000000Z","updated_at":"2025-07-29T12:15:21.000000Z"},{"id":"6888bbb9b713a022b0acd094","created_at":"2025-07-29T12:16:57.000000Z","updated_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":50,"to":5}}' + string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2c2e6b9b53356cbff","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1fbedf140a2b0dbed","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c20177de662f3db3a3","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c28348ff065eb1121e","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2fe9099c351f54f82","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba632004badd365b44374","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63146a4165473302091","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba633bd923db80f5a6251","created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632888abafb5a5a32e5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6310a4b8a2879f705b5","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63151e50cf2b3cb2559","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631911f4baa390dc243","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631db3afb306eb3415d","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6325c2cb15ea31dc0d7","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63280cc4753b40972c5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632b3a5034416588e3e","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632d5f22702b2612a33","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63368a5216de94f4267","created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba75e907cfdf50292e5fc","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75faa37a22449f58734","created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75e48249ee995199c66","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75eedcba7918ae37054","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba7fdb8148e47a0a27202","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fd8bf4b9799385c29e","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fffa0835ce18da847d","created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:03.000000Z"},{"id":"6a4ba7fda0a5e230c0a64b6d","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fc3d9443c28e9a2d19","created_at":"2026-07-06T13:05:00.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"6a4ba75d4252c69473584e14","created_at":"2026-07-06T13:02:21.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75db9cdb689ca850767","created_at":"2026-07-06T13:02:21.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75de37a63aad0569ac4","created_at":"2026-07-06T13:02:21.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75e6ca896bf12848b5e","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75e84b64ff660bd66b7","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75ec1cfe2b68e6ea48c","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba7fd29cbd2c32f82e6e2","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fe5d67d4122d52ef46","created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"},{"id":"6a4ba7fed7659d937361ec56","created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"},{"id":"6a4ba7fe0ece81c23c7dd18c","created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"},{"id":"6a4ba7ffbb0c377478310fed","created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:03.000000Z"},{"id":"6a4ba7fd18eecf5fff31b852","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fe257e065d3cdcc01e","created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":50,"to":50}}' headers: CF-RAY: - - 966d281b2ec90380-BEG + - a16ed1bb6c44076b-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:54 GMT + - Mon, 06 Jul 2026 13:05:08 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '52' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/messages_comprehensive_workflow.yaml b/tests/fixtures/cassettes/messages_comprehensive_workflow.yaml index 4e3aa74..dee875b 100644 --- a/tests/fixtures/cassettes/messages_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/messages_comprehensive_workflow.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages?page=1&limit=10 response: body: - string: '{"data":[{"id":"6888bb9efa41a66318120533","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bb9ee6a7f64df5de96ad","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bc42dbd40844151919b7","created_at":"2025-07-29T12:19:14.000000Z","updated_at":"2025-07-29T12:19:14.000000Z"},{"id":"6888bb59bbd49a78d3334484","created_at":"2025-07-29T12:15:21.000000Z","updated_at":"2025-07-29T12:15:21.000000Z"},{"id":"6888bbb9b713a022b0acd094","created_at":"2025-07-29T12:16:57.000000Z","updated_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":5}}' + string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' headers: CF-RAY: - - 966d281d4e841b8b-BEG + - a16ed1bd1b55e28f-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:55 GMT + - Mon, 06 Jul 2026 13:05:08 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '51' status: code: 200 message: OK @@ -57,15 +59,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages?page=1&limit=25 response: body: - string: '{"data":[{"id":"6888bb9efa41a66318120533","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bb9ee6a7f64df5de96ad","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bc42dbd40844151919b7","created_at":"2025-07-29T12:19:14.000000Z","updated_at":"2025-07-29T12:19:14.000000Z"},{"id":"6888bb59bbd49a78d3334484","created_at":"2025-07-29T12:15:21.000000Z","updated_at":"2025-07-29T12:15:21.000000Z"},{"id":"6888bbb9b713a022b0acd094","created_at":"2025-07-29T12:16:57.000000Z","updated_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":25,"to":5}}' + string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2c2e6b9b53356cbff","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1fbedf140a2b0dbed","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c20177de662f3db3a3","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c28348ff065eb1121e","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2fe9099c351f54f82","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba632004badd365b44374","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63146a4165473302091","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba633bd923db80f5a6251","created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632888abafb5a5a32e5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6310a4b8a2879f705b5","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63151e50cf2b3cb2559","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631911f4baa390dc243","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631db3afb306eb3415d","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6325c2cb15ea31dc0d7","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63280cc4753b40972c5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":25,"to":25}}' headers: CF-RAY: - - 966d281ebed8d814-BEG + - a16ed1bde951562e-BEG Cache-Control: - no-cache, private Connection: @@ -75,19 +77,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:55 GMT + - Mon, 06 Jul 2026 13:05:08 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '51' status: code: 200 message: OK @@ -103,7 +107,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages/non-existent-id response: @@ -111,7 +115,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d281fde9d8e88-BEG + - a16ed1beae370380-BEG Cache-Control: - no-cache, private Connection: @@ -121,15 +125,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:55 GMT + - Mon, 06 Jul 2026 13:05:09 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 404 message: Not Found @@ -145,7 +155,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages/another-non-existent-id response: @@ -153,7 +163,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2820d8d6e28f-BEG + - a16ed1bf6f32a8bc-BEG Cache-Control: - no-cache, private Connection: @@ -163,15 +173,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:55 GMT + - Mon, 06 Jul 2026 13:05:09 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '56' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/messages_empty_result.yaml b/tests/fixtures/cassettes/messages_empty_result.yaml index 269d7ca..3a2c04d 100644 --- a/tests/fixtures/cassettes/messages_empty_result.yaml +++ b/tests/fixtures/cassettes/messages_empty_result.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages?page=1&limit=10 response: body: - string: '{"data":[{"id":"6888bb9efa41a66318120533","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bb9ee6a7f64df5de96ad","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bc42dbd40844151919b7","created_at":"2025-07-29T12:19:14.000000Z","updated_at":"2025-07-29T12:19:14.000000Z"},{"id":"6888bb59bbd49a78d3334484","created_at":"2025-07-29T12:15:21.000000Z","updated_at":"2025-07-29T12:15:21.000000Z"},{"id":"6888bbb9b713a022b0acd094","created_at":"2025-07-29T12:16:57.000000Z","updated_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":5}}' + string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' headers: CF-RAY: - - 966d2818ab22076b-BEG + - a16ed1b9cd1b126d-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:54 GMT + - Mon, 06 Jul 2026 13:05:08 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '47' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/messages_get_not_found.yaml b/tests/fixtures/cassettes/messages_get_not_found.yaml index ba26203..455b71e 100644 --- a/tests/fixtures/cassettes/messages_get_not_found.yaml +++ b/tests/fixtures/cassettes/messages_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages/test-message-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d28159a8adfc0-BEG + - a16ed1b82eeae28f-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:53 GMT + - Mon, 06 Jul 2026 13:05:07 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/messages_list_basic.yaml b/tests/fixtures/cassettes/messages_list_basic.yaml index 48f8f80..377e8a1 100644 --- a/tests/fixtures/cassettes/messages_list_basic.yaml +++ b/tests/fixtures/cassettes/messages_list_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages?page=1&limit=10 response: body: - string: '{"data":[{"id":"6888bb9efa41a66318120533","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bb9ee6a7f64df5de96ad","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bc42dbd40844151919b7","created_at":"2025-07-29T12:19:14.000000Z","updated_at":"2025-07-29T12:19:14.000000Z"},{"id":"6888bb59bbd49a78d3334484","created_at":"2025-07-29T12:15:21.000000Z","updated_at":"2025-07-29T12:15:21.000000Z"},{"id":"6888bbb9b713a022b0acd094","created_at":"2025-07-29T12:16:57.000000Z","updated_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":5}}' + string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' headers: CF-RAY: - - 966d28106b321f09-BEG + - a16ed1b5ca7cbbed-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:53 GMT + - Mon, 06 Jul 2026 13:05:07 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '48' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/messages_list_different_limit.yaml b/tests/fixtures/cassettes/messages_list_different_limit.yaml index 127b643..4eba7df 100644 --- a/tests/fixtures/cassettes/messages_list_different_limit.yaml +++ b/tests/fixtures/cassettes/messages_list_different_limit.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages?page=1&limit=25 response: body: - string: '{"data":[{"id":"6888bb9efa41a66318120533","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bb9ee6a7f64df5de96ad","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bc42dbd40844151919b7","created_at":"2025-07-29T12:19:14.000000Z","updated_at":"2025-07-29T12:19:14.000000Z"},{"id":"6888bb59bbd49a78d3334484","created_at":"2025-07-29T12:15:21.000000Z","updated_at":"2025-07-29T12:15:21.000000Z"},{"id":"6888bbb9b713a022b0acd094","created_at":"2025-07-29T12:16:57.000000Z","updated_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":25,"to":5}}' + string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2c2e6b9b53356cbff","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1fbedf140a2b0dbed","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c20177de662f3db3a3","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c28348ff065eb1121e","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2fe9099c351f54f82","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba632004badd365b44374","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63146a4165473302091","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba633bd923db80f5a6251","created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632888abafb5a5a32e5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6310a4b8a2879f705b5","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63151e50cf2b3cb2559","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631911f4baa390dc243","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631db3afb306eb3415d","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6325c2cb15ea31dc0d7","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63280cc4753b40972c5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":25,"to":25}}' headers: CF-RAY: - - 966d2813d9160380-BEG + - a16ed1b74dedf339-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:53 GMT + - Mon, 06 Jul 2026 13:05:07 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '56' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/messages_list_with_pagination.yaml b/tests/fixtures/cassettes/messages_list_with_pagination.yaml index 734d87b..67ff439 100644 --- a/tests/fixtures/cassettes/messages_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/messages_list_with_pagination.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/messages?page=1&limit=10 response: body: - string: '{"data":[{"id":"6888bb9efa41a66318120533","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bb9ee6a7f64df5de96ad","created_at":"2025-07-29T12:16:30.000000Z","updated_at":"2025-07-29T12:16:30.000000Z"},{"id":"6888bc42dbd40844151919b7","created_at":"2025-07-29T12:19:14.000000Z","updated_at":"2025-07-29T12:19:14.000000Z"},{"id":"6888bb59bbd49a78d3334484","created_at":"2025-07-29T12:15:21.000000Z","updated_at":"2025-07-29T12:15:21.000000Z"},{"id":"6888bbb9b713a022b0acd094","created_at":"2025-07-29T12:16:57.000000Z","updated_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":5}}' + string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' headers: CF-RAY: - - 966d28124ca3e298-BEG + - a16ed1b68f8d8e88-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:02:53 GMT + - Mon, 06 Jul 2026 13:05:07 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '50' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/recipients_add_hard_bounces.yaml b/tests/fixtures/cassettes/recipients_add_hard_bounces.yaml index ff7f045..96ed99e 100644 --- a/tests/fixtures/cassettes/recipients_add_hard_bounces.yaml +++ b/tests/fixtures/cassettes/recipients_add_hard_bounces.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/suppressions/hard-bounces response: @@ -22,7 +22,7 @@ interactions: domain id field is required. #MS42209"]}}' headers: CF-RAY: - - 966ca7f02ace4341-VIE + - a16ed1c7d831dfc0-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:35:24 GMT + - Mon, 06 Jul 2026 13:05:10 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/recipients_add_spam_complaints.yaml b/tests/fixtures/cassettes/recipients_add_spam_complaints.yaml index 49179ba..d28c4e9 100644 --- a/tests/fixtures/cassettes/recipients_add_spam_complaints.yaml +++ b/tests/fixtures/cassettes/recipients_add_spam_complaints.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/suppressions/spam-complaints response: @@ -22,7 +22,7 @@ interactions: domain id field is required. #MS42209"]}}' headers: CF-RAY: - - 966ca7f1986b1ef8-VIE + - a16ed1c89d300a8e-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:35:25 GMT + - Mon, 06 Jul 2026 13:05:10 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/recipients_add_to_blocklist.yaml b/tests/fixtures/cassettes/recipients_add_to_blocklist.yaml index 4099dd3..c6b07fd 100644 --- a/tests/fixtures/cassettes/recipients_add_to_blocklist.yaml +++ b/tests/fixtures/cassettes/recipients_add_to_blocklist.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/suppressions/blocklist response: @@ -22,7 +22,7 @@ interactions: selected domain id is invalid."]}}' headers: CF-RAY: - - 966ca7eedfdc23b5-VIE + - a16ed1c72a041778-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:35:24 GMT + - Mon, 06 Jul 2026 13:05:10 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/recipients_add_unsubscribes.yaml b/tests/fixtures/cassettes/recipients_add_unsubscribes.yaml index f6f85c5..a4baf41 100644 --- a/tests/fixtures/cassettes/recipients_add_unsubscribes.yaml +++ b/tests/fixtures/cassettes/recipients_add_unsubscribes.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/suppressions/unsubscribes response: @@ -22,7 +22,7 @@ interactions: domain id field is required. #MS42209"]}}' headers: CF-RAY: - - 966ca7f2fd05cb7b-VIE + - a16ed1c95ce9dfc0-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:35:25 GMT + - Mon, 06 Jul 2026 13:05:10 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '33' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/recipients_api_response_structure.yaml b/tests/fixtures/cassettes/recipients_api_response_structure.yaml index 94ecf90..7a41042 100644 --- a/tests/fixtures/cassettes/recipients_api_response_structure.yaml +++ b/tests/fixtures/cassettes/recipients_api_response_structure.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/recipients?page=1&limit=10 response: body: - string: '{"data":[{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa816963207eb25a039f5","email":"ms-sdk-bcc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":5}}' + string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""},{"id":"6977580d0e29e82266465bdd","email":"igor@mailerlite.com","created_at":"2026-01-26T12:03:25.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/recipients?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":10}}' headers: CF-RAY: - - 966ca5d4deb8b01e-BEG + - a16ed1cb6ba4e28f-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:58 GMT + - Mon, 06 Jul 2026 13:05:11 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/recipients_blocklist_basic.yaml b/tests/fixtures/cassettes/recipients_blocklist_basic.yaml index b910de7..b7c1e99 100644 --- a/tests/fixtures/cassettes/recipients_blocklist_basic.yaml +++ b/tests/fixtures/cassettes/recipients_blocklist_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/suppressions/blocklist?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/blocklist?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/blocklist","per_page":10,"to":null}}' + string: '{"data":[{"id":"688ec2bbe0b75b54b0119874","type":"exact","pattern":"ms-sdk-bcc@igor.fail","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},"created_at":"2025-08-03T02:00:27.000000Z","updated_at":"2025-08-03T02:00:27.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/blocklist?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/suppressions\/blocklist?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/blocklist","per_page":10,"to":1}}' headers: CF-RAY: - - 966ca5c7bc02126d-BEG + - a16ed1c32a53d814-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:56 GMT + - Mon, 06 Jul 2026 13:05:09 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '167' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/recipients_comprehensive_workflow.yaml b/tests/fixtures/cassettes/recipients_comprehensive_workflow.yaml index d5c908a..e091e07 100644 --- a/tests/fixtures/cassettes/recipients_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/recipients_comprehensive_workflow.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/suppressions/blocklist response: @@ -22,7 +22,7 @@ interactions: selected domain id is invalid."]}}' headers: CF-RAY: - - 966ca7f5db07562e-BEG + - a16ed1cabc1f55ad-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:35:25 GMT + - Mon, 06 Jul 2026 13:05:10 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/recipients_delete_from_blocklist.yaml b/tests/fixtures/cassettes/recipients_delete_from_blocklist.yaml index 5980e78..15b6762 100644 --- a/tests/fixtures/cassettes/recipients_delete_from_blocklist.yaml +++ b/tests/fixtures/cassettes/recipients_delete_from_blocklist.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/suppressions/blocklist response: @@ -22,7 +22,7 @@ interactions: selected domain id is invalid."],"ids.0":["The selected ids.0 is invalid."]}}' headers: CF-RAY: - - 966ca7f45aeac0d0-VIE + - a16ed1c9fdc79857-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:35:25 GMT + - Mon, 06 Jul 2026 13:05:10 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '51' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/recipients_delete_success.yaml b/tests/fixtures/cassettes/recipients_delete_success.yaml index f0e5690..c4e61a9 100644 --- a/tests/fixtures/cassettes/recipients_delete_success.yaml +++ b/tests/fixtures/cassettes/recipients_delete_success.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/recipients/test-recipient-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966ca5c6db5de290-BEG + - a16ed1c27bcf076b-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:56 GMT + - Mon, 06 Jul 2026 13:05:09 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/recipients_empty_list.yaml b/tests/fixtures/cassettes/recipients_empty_list.yaml index 2ddaa70..2e2e014 100644 --- a/tests/fixtures/cassettes/recipients_empty_list.yaml +++ b/tests/fixtures/cassettes/recipients_empty_list.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/recipients?page=1&limit=10 response: body: - string: '{"data":[{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa816963207eb25a039f5","email":"ms-sdk-bcc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":5}}' + string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""},{"id":"6977580d0e29e82266465bdd","email":"igor@mailerlite.com","created_at":"2026-01-26T12:03:25.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/recipients?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":10}}' headers: CF-RAY: - - 966ca5d5bfccb30f-BEG + - a16ed1cc194dbbed-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:58 GMT + - Mon, 06 Jul 2026 13:05:11 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '48' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/recipients_get_single.yaml b/tests/fixtures/cassettes/recipients_get_single.yaml index 233bffd..ab9f668 100644 --- a/tests/fixtures/cassettes/recipients_get_single.yaml +++ b/tests/fixtures/cassettes/recipients_get_single.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/recipients/test-recipient-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966ca5c578ed3267-BEG + - a16ed1c1def4126d-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:56 GMT + - Mon, 06 Jul 2026 13:05:09 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/recipients_hard_bounces_basic.yaml b/tests/fixtures/cassettes/recipients_hard_bounces_basic.yaml index 8e256cb..fc1f3e1 100644 --- a/tests/fixtures/cassettes/recipients_hard_bounces_basic.yaml +++ b/tests/fixtures/cassettes/recipients_hard_bounces_basic.yaml @@ -11,19 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/suppressions/hard-bounces?page=1&limit=10 response: body: string: '{"data":[{"id":"67efa6f1b810e35168ead88e","reason":"The email account that you tried to reach does not exist. Please try double-checking the recipient''s - email address for typos or unnecessary spaces.","created_at":"2025-04-04T09:31:29.000000Z","recipient":{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":"","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}}},{"id":"67efa6f13f3ebb599dc1210e","reason":"The + email address for typos or unnecessary spaces.","created_at":"2025-04-04T09:31:29.000000Z","recipient":{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":"","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}},{"id":"67efa6f13f3ebb599dc1210e","reason":"The email account that you tried to reach does not exist. Please try double-checking - the recipient''s email address for typos or unnecessary spaces.","created_at":"2025-04-04T09:31:29.000000Z","recipient":{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":"","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/hard-bounces?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/hard-bounces","per_page":10,"to":2}}' + the recipient''s email address for typos or unnecessary spaces.","created_at":"2025-04-04T09:31:29.000000Z","recipient":{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":"","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/hard-bounces?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/suppressions\/hard-bounces?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/hard-bounces","per_page":10,"to":2}}' headers: CF-RAY: - - 966ca5c8ada5fa43-BEG + - a16ed1c4bcbee28f-BEG Cache-Control: - no-cache, private Connection: @@ -33,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:56 GMT + - Mon, 06 Jul 2026 13:05:09 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '52' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/recipients_list_basic.yaml b/tests/fixtures/cassettes/recipients_list_basic.yaml index e1e20d8..7584e2a 100644 --- a/tests/fixtures/cassettes/recipients_list_basic.yaml +++ b/tests/fixtures/cassettes/recipients_list_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/recipients?page=1&limit=10 response: body: - string: '{"data":[{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa816963207eb25a039f5","email":"ms-sdk-bcc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":5}}' + string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""},{"id":"6977580d0e29e82266465bdd","email":"igor@mailerlite.com","created_at":"2026-01-26T12:03:25.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/recipients?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":10}}' headers: CF-RAY: - - 966ca5a73abc8e61-VIE + - a16ed1c04d08e294-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:51 GMT + - Mon, 06 Jul 2026 13:05:09 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/recipients_list_with_pagination.yaml b/tests/fixtures/cassettes/recipients_list_with_pagination.yaml index d2185b5..e8ff552 100644 --- a/tests/fixtures/cassettes/recipients_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/recipients_list_with_pagination.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/recipients?page=1&limit=10 response: body: - string: '{"data":[{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa816963207eb25a039f5","email":"ms-sdk-bcc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":5}}' + string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""},{"id":"6977580d0e29e82266465bdd","email":"igor@mailerlite.com","created_at":"2026-01-26T12:03:25.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/recipients?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":10}}' headers: CF-RAY: - - 966ca5c3f89a96e0-BEG + - a16ed1c10da2e290-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:56 GMT + - Mon, 06 Jul 2026 13:05:09 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '54' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/recipients_spam_complaints_basic.yaml b/tests/fixtures/cassettes/recipients_spam_complaints_basic.yaml index 9213503..0f219b1 100644 --- a/tests/fixtures/cassettes/recipients_spam_complaints_basic.yaml +++ b/tests/fixtures/cassettes/recipients_spam_complaints_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/suppressions/spam-complaints?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/spam-complaints?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/spam-complaints","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/spam-complaints?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/suppressions\/spam-complaints?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/spam-complaints","per_page":10,"to":null}}' headers: CF-RAY: - - 966ca5ca3c6ae295-BEG + - a16ed1c59da2e298-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:57 GMT + - Mon, 06 Jul 2026 13:05:10 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '43' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/recipients_unsubscribes_basic.yaml b/tests/fixtures/cassettes/recipients_unsubscribes_basic.yaml index 33cade8..029ed38 100644 --- a/tests/fixtures/cassettes/recipients_unsubscribes_basic.yaml +++ b/tests/fixtures/cassettes/recipients_unsubscribes_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/suppressions/unsubscribes?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/unsubscribes?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/unsubscribes","per_page":10,"to":null}}' + string: '{"data":[{"id":"688bd436557b3f31bfb99c31","reason":null,"readable_reason":null,"recipient":{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":"","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},"created_at":"2025-07-31T20:38:14.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/unsubscribes?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/suppressions\/unsubscribes?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/unsubscribes","per_page":10,"to":1}}' headers: CF-RAY: - - 966ca5cbae405165-BEG + - a16ed1c65b56bbed-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:33:57 GMT + - Mon, 06 Jul 2026 13:05:10 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '47' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/schedules_api_response_structure.yaml b/tests/fixtures/cassettes/schedules_api_response_structure.yaml index 2e76bfa..82bd0c4 100644 --- a/tests/fixtures/cassettes/schedules_api_response_structure.yaml +++ b/tests/fixtures/cassettes/schedules_api_response_structure.yaml @@ -11,18 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/message-schedules?page=1&limit=10 response: body: - string: '{"data":[{"message_id":"6888bb59bbd49a78d3334484","subject":"Test Email","send_at":"2025-07-30T12:15:21.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:15:21.000000Z"},{"message_id":"6888bbb9b713a022b0acd094","subject":"Test - Email","send_at":"2025-07-30T12:16:57.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":2,"total":2}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d2ecd8f40e297-BEG + - a16ed1d16da90db0-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:29 GMT + - Mon, 06 Jul 2026 13:05:11 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '45' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/schedules_delete.yaml b/tests/fixtures/cassettes/schedules_delete.yaml index 2ac7341..fd9c73f 100644 --- a/tests/fixtures/cassettes/schedules_delete.yaml +++ b/tests/fixtures/cassettes/schedules_delete.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/message-schedules/test-message-id response: @@ -22,7 +22,7 @@ interactions: or has already been sent, it's not possible to delete it.\"\n}" headers: CF-RAY: - - 966d2ecbffe3e296-BEG + - a16ed1d0ae6d870d-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +32,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:28 GMT + - Mon, 06 Jul 2026 13:05:11 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '43' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/schedules_empty_result.yaml b/tests/fixtures/cassettes/schedules_empty_result.yaml index bcb68f8..2d32ce4 100644 --- a/tests/fixtures/cassettes/schedules_empty_result.yaml +++ b/tests/fixtures/cassettes/schedules_empty_result.yaml @@ -11,18 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/message-schedules?page=1&limit=10 response: body: - string: '{"data":[{"message_id":"6888bb59bbd49a78d3334484","subject":"Test Email","send_at":"2025-07-30T12:15:21.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:15:21.000000Z"},{"message_id":"6888bbb9b713a022b0acd094","subject":"Test - Email","send_at":"2025-07-30T12:16:57.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":2,"total":2}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d2ece7865d814-BEG + - a16ed1d23d8c126d-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:29 GMT + - Mon, 06 Jul 2026 13:05:12 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/schedules_get_single.yaml b/tests/fixtures/cassettes/schedules_get_single.yaml index 4bb9c51..225fbdd 100644 --- a/tests/fixtures/cassettes/schedules_get_single.yaml +++ b/tests/fixtures/cassettes/schedules_get_single.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/message-schedules/test-message-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2ecb1c39aeaa-BEG + - a16ed1cfea19fa43-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:28 GMT + - Mon, 06 Jul 2026 13:05:11 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/schedules_list_basic.yaml b/tests/fixtures/cassettes/schedules_list_basic.yaml index 1c06432..9867f5c 100644 --- a/tests/fixtures/cassettes/schedules_list_basic.yaml +++ b/tests/fixtures/cassettes/schedules_list_basic.yaml @@ -11,18 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/message-schedules?page=1&limit=10 response: body: - string: '{"data":[{"message_id":"6888bb59bbd49a78d3334484","subject":"Test Email","send_at":"2025-07-30T12:15:21.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:15:21.000000Z"},{"message_id":"6888bbb9b713a022b0acd094","subject":"Test - Email","send_at":"2025-07-30T12:16:57.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":2,"total":2}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d2d97deaee296-BEG + - a16ed1cceb7571a6-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:06:39 GMT + - Mon, 06 Jul 2026 13:05:11 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '49' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/schedules_list_with_domain_filter.yaml b/tests/fixtures/cassettes/schedules_list_with_domain_filter.yaml index a29622a..34948ef 100644 --- a/tests/fixtures/cassettes/schedules_list_with_domain_filter.yaml +++ b/tests/fixtures/cassettes/schedules_list_with_domain_filter.yaml @@ -11,18 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/message-schedules?domain_id=65qngkdovk8lwr12&page=1&limit=10 response: body: - string: '{"data":[{"message_id":"6888bb59bbd49a78d3334484","subject":"Test Email","send_at":"2025-07-30T12:15:21.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:15:21.000000Z"},{"message_id":"6888bbb9b713a022b0acd094","subject":"Test - Email","send_at":"2025-07-30T12:16:57.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":2,"total":2}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d2ec87a65c239-BEG + - a16ed1ce7b59e295-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:28 GMT + - Mon, 06 Jul 2026 13:05:11 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '45' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/schedules_list_with_pagination.yaml b/tests/fixtures/cassettes/schedules_list_with_pagination.yaml index a650403..04cb914 100644 --- a/tests/fixtures/cassettes/schedules_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/schedules_list_with_pagination.yaml @@ -11,18 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/message-schedules?page=1&limit=10 response: body: - string: '{"data":[{"message_id":"6888bb59bbd49a78d3334484","subject":"Test Email","send_at":"2025-07-30T12:15:21.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:15:21.000000Z"},{"message_id":"6888bbb9b713a022b0acd094","subject":"Test - Email","send_at":"2025-07-30T12:16:57.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":2,"total":2}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d2ec709ed1b8b-BEG + - a16ed1cdbae7aeaa-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:28 GMT + - Mon, 06 Jul 2026 13:05:11 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '52' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/schedules_list_with_status_filter.yaml b/tests/fixtures/cassettes/schedules_list_with_status_filter.yaml index a5707ef..ab06d2a 100644 --- a/tests/fixtures/cassettes/schedules_list_with_status_filter.yaml +++ b/tests/fixtures/cassettes/schedules_list_with_status_filter.yaml @@ -11,18 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/message-schedules?status=scheduled&page=1&limit=10 response: body: - string: '{"data":[{"message_id":"6888bb59bbd49a78d3334484","subject":"Test Email","send_at":"2025-07-30T12:15:21.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:15:21.000000Z"},{"message_id":"6888bbb9b713a022b0acd094","subject":"Test - Email","send_at":"2025-07-30T12:16:57.000000Z","status":"scheduled","status_message":null,"created_at":"2025-07-29T12:16:57.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":2,"total":2}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d2eca1b761b8b-BEG + - a16ed1cf2885e290-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:28 GMT + - Mon, 06 Jul 2026 13:05:11 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '43' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_activity_api_response_structure.yaml b/tests/fixtures/cassettes/sms_activity_api_response_structure.yaml index 5f6d1a0..e1cfa9d 100644 --- a/tests/fixtures/cassettes/sms_activity_api_response_structure.yaml +++ b/tests/fixtures/cassettes/sms_activity_api_response_structure.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' headers: CF-RAY: - - 966d5dfa9bf3e296-BEG + - a16ed1d7ca9c126d-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:41 GMT + - Mon, 06 Jul 2026 13:05:13 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '52' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_activity_builder_get_not_found.yaml b/tests/fixtures/cassettes/sms_activity_builder_get_not_found.yaml index 34a8dd3..bdb3741 100644 --- a/tests/fixtures/cassettes/sms_activity_builder_get_not_found.yaml +++ b/tests/fixtures/cassettes/sms_activity_builder_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages/test-sms-message-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d5e000bddbbed-BEG + - a16ed1dbaa6abbed-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:42 GMT + - Mon, 06 Jul 2026 13:05:13 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml b/tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml index 28638c8..fb35768 100644 --- a/tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' headers: CF-RAY: - - 966d5dfcac06c687-BEG + - a16ed1d96c89870d-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:41 GMT + - Mon, 06 Jul 2026 13:05:13 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_activity_builder_list_with_filters.yaml b/tests/fixtures/cassettes/sms_activity_builder_list_with_filters.yaml index 8269e54..9f4b308 100644 --- a/tests/fixtures/cassettes/sms_activity_builder_list_with_filters.yaml +++ b/tests/fixtures/cassettes/sms_activity_builder_list_with_filters.yaml @@ -11,38 +11,41 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?date_from=1753195200&date_to=1753800000&status%5B%5D=sent&status%5B%5D=delivered&page=1&limit=25 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":25,"to":null}}' + string: '{"message":"Date selection out of range. Your account has a 30-day + data retention limit. Upgrade your plan or acquire a data retention addon.","errors":{"date_from":["Date + selection out of range. Your account has a 30-day data retention limit. Upgrade + your plan or acquire a data retention addon."]}}' headers: CF-RAY: - - 966d60908826b01b-BEG + - a16ed1da2e34e293-BEG Cache-Control: - no-cache, private Connection: - keep-alive - Content-Encoding: - - gzip Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:41:27 GMT + - Mon, 06 Jul 2026 13:05:13 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '59' status: - code: 200 - message: OK + code: 422 + message: Unprocessable Entity version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_builder_list_with_sms_number.yaml b/tests/fixtures/cassettes/sms_activity_builder_list_with_sms_number.yaml index 827c0c1..8f24563 100644 --- a/tests/fixtures/cassettes/sms_activity_builder_list_with_sms_number.yaml +++ b/tests/fixtures/cassettes/sms_activity_builder_list_with_sms_number.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?sms_number_id=test-sms-number-id&page=1&limit=10 response: @@ -20,7 +20,7 @@ interactions: selected sms number id is invalid."]}}' headers: CF-RAY: - - 966d5dff2a3f55ad-BEG + - a16ed1dafeb5c239-BEG Cache-Control: - no-cache, private Connection: @@ -28,19 +28,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:42 GMT + - Mon, 06 Jul 2026 13:05:13 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_activity_comprehensive_workflow.yaml b/tests/fixtures/cassettes/sms_activity_comprehensive_workflow.yaml index 7443cb5..8cf1f7c 100644 --- a/tests/fixtures/cassettes/sms_activity_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/sms_activity_comprehensive_workflow.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' headers: CF-RAY: - - 966d6091cd1e8e88-BEG + - a16ed1dc588be290-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:41:27 GMT + - Mon, 06 Jul 2026 13:05:13 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 200 message: OK @@ -57,40 +59,43 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?date_from=1753195200&date_to=1753800000&status%5B%5D=sent&page=1&limit=25 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":25,"to":null}}' + string: '{"message":"Date selection out of range. Your account has a 30-day + data retention limit. Upgrade your plan or acquire a data retention addon.","errors":{"date_from":["Date + selection out of range. Your account has a 30-day data retention limit. Upgrade + your plan or acquire a data retention addon."]}}' headers: CF-RAY: - - 966d60937a5a870d-BEG + - a16ed1dd1cd8cf86-BEG Cache-Control: - no-cache, private Connection: - keep-alive - Content-Encoding: - - gzip Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:41:27 GMT + - Mon, 06 Jul 2026 13:05:13 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: - code: 200 - message: OK + code: 422 + message: Unprocessable Entity - request: body: null headers: @@ -103,7 +108,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages/non-existent-id response: @@ -111,7 +116,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d6094bdf6870d-BEG + - a16ed1ddcc70e290-BEG Cache-Control: - no-cache, private Connection: @@ -121,15 +126,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:41:27 GMT + - Mon, 06 Jul 2026 13:05:13 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found @@ -145,7 +156,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages/another-non-existent-id response: @@ -153,7 +164,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d609608e2562e-BEG + - a16ed1de8a5dd814-BEG Cache-Control: - no-cache, private Connection: @@ -163,15 +174,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:41:28 GMT + - Mon, 06 Jul 2026 13:05:14 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_activity_empty_result.yaml b/tests/fixtures/cassettes/sms_activity_empty_result.yaml index ee36d8e..3bdafcb 100644 --- a/tests/fixtures/cassettes/sms_activity_empty_result.yaml +++ b/tests/fixtures/cassettes/sms_activity_empty_result.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' headers: CF-RAY: - - 966d5dfb8912b30c-BEG + - a16ed1d8a96e0db0-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:41 GMT + - Mon, 06 Jul 2026 13:05:13 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_activity_get_message_not_found.yaml b/tests/fixtures/cassettes/sms_activity_get_message_not_found.yaml index 9cb4920..71b4e96 100644 --- a/tests/fixtures/cassettes/sms_activity_get_message_not_found.yaml +++ b/tests/fixtures/cassettes/sms_activity_get_message_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages/test-sms-message-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d5df98e27b311-BEG + - a16ed1d70b8fe290-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:41 GMT + - Mon, 06 Jul 2026 13:05:12 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_activity_list_basic.yaml b/tests/fixtures/cassettes/sms_activity_list_basic.yaml index 59ee2a0..ddc105a 100644 --- a/tests/fixtures/cassettes/sms_activity_list_basic.yaml +++ b/tests/fixtures/cassettes/sms_activity_list_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' headers: CF-RAY: - - 966d5df24b8faeaa-BEG + - a16ed1d3091cf969-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:40 GMT + - Mon, 06 Jul 2026 13:05:12 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '54' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_activity_list_with_date_range.yaml b/tests/fixtures/cassettes/sms_activity_list_with_date_range.yaml index 8a10b3c..443a0c5 100644 --- a/tests/fixtures/cassettes/sms_activity_list_with_date_range.yaml +++ b/tests/fixtures/cassettes/sms_activity_list_with_date_range.yaml @@ -11,38 +11,41 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?date_from=1753195200&date_to=1753800000&page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' + string: '{"message":"Date selection out of range. Your account has a 30-day + data retention limit. Upgrade your plan or acquire a data retention addon.","errors":{"date_from":["Date + selection out of range. Your account has a 30-day data retention limit. Upgrade + your plan or acquire a data retention addon."]}}' headers: CF-RAY: - - 966d608eb816c239-BEG + - a16ed1d57efedfc0-BEG Cache-Control: - no-cache, private Connection: - keep-alive - Content-Encoding: - - gzip Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:41:27 GMT + - Mon, 06 Jul 2026 13:05:12 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: - code: 200 - message: OK + code: 422 + message: Unprocessable Entity version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_list_with_pagination.yaml b/tests/fixtures/cassettes/sms_activity_list_with_pagination.yaml index 52018d3..071b656 100644 --- a/tests/fixtures/cassettes/sms_activity_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/sms_activity_list_with_pagination.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=25 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":25,"to":null}}' headers: CF-RAY: - - 966d5df42e5f1f09-BEG + - a16ed1d3edd9bbed-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:40 GMT + - Mon, 06 Jul 2026 13:05:12 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_activity_list_with_sms_number_filter.yaml b/tests/fixtures/cassettes/sms_activity_list_with_sms_number_filter.yaml index 00c5e67..a2868ff 100644 --- a/tests/fixtures/cassettes/sms_activity_list_with_sms_number_filter.yaml +++ b/tests/fixtures/cassettes/sms_activity_list_with_sms_number_filter.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?sms_number_id=test-sms-number-id&page=1&limit=10 response: @@ -20,7 +20,7 @@ interactions: selected sms number id is invalid."]}}' headers: CF-RAY: - - 966d5df59edee295-BEG + - a16ed1d4a83cbbed-BEG Cache-Control: - no-cache, private Connection: @@ -28,19 +28,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:40 GMT + - Mon, 06 Jul 2026 13:05:12 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_activity_list_with_status_filter.yaml b/tests/fixtures/cassettes/sms_activity_list_with_status_filter.yaml index 8b8ff37..c7c21b6 100644 --- a/tests/fixtures/cassettes/sms_activity_list_with_status_filter.yaml +++ b/tests/fixtures/cassettes/sms_activity_list_with_status_filter.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-activity?status%5B%5D=queued&status%5B%5D=sent&page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' headers: CF-RAY: - - 966d5df808defa43-BEG + - a16ed1d63c5de296-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:39:41 GMT + - Mon, 06 Jul 2026 13:05:12 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_messages_api_response_structure.yaml b/tests/fixtures/cassettes/sms_messages_api_response_structure.yaml index 0ba8225..f17f5d8 100644 --- a/tests/fixtures/cassettes/sms_messages_api_response_structure.yaml +++ b/tests/fixtures/cassettes/sms_messages_api_response_structure.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages?limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966caa4b8e7daeaa-BEG + - a16ed1e2df635165-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:37:01 GMT + - Mon, 06 Jul 2026 13:05:14 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_messages_comprehensive_workflow.yaml b/tests/fixtures/cassettes/sms_messages_comprehensive_workflow.yaml index 2b1eba8..00f3262 100644 --- a/tests/fixtures/cassettes/sms_messages_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/sms_messages_comprehensive_workflow.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages?limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966caa4c9e36cf86-BEG + - a16ed1e39f89d814-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:37:01 GMT + - Mon, 06 Jul 2026 13:05:14 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_messages_get_not_found.yaml b/tests/fixtures/cassettes/sms_messages_get_not_found.yaml deleted file mode 100644 index 9ccf7cd..0000000 --- a/tests/fixtures/cassettes/sms_messages_get_not_found.yaml +++ /dev/null @@ -1,44 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages/non-existent-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966caa491ebfa8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:37:01 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_messages_get_single.yaml b/tests/fixtures/cassettes/sms_messages_get_single.yaml index 0390ba5..893f849 100644 --- a/tests/fixtures/cassettes/sms_messages_get_single.yaml +++ b/tests/fixtures/cassettes/sms_messages_get_single.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages/test-sms-message-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966caa47ddaee28f-BEG + - a16ed1e16ea7a8bc-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:37:00 GMT + - Mon, 06 Jul 2026 13:05:14 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '43' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_messages_list_basic.yaml b/tests/fixtures/cassettes/sms_messages_list_basic.yaml index 8e55ce5..b5b6827 100644 --- a/tests/fixtures/cassettes/sms_messages_list_basic.yaml +++ b/tests/fixtures/cassettes/sms_messages_list_basic.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages?limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966ca9f5db1adfc0-BEG + - a16ed1df3d7e870d-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:36:47 GMT + - Mon, 06 Jul 2026 13:05:14 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '48' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_messages_list_empty.yaml b/tests/fixtures/cassettes/sms_messages_list_empty.yaml index 2b1a4cb..19f8210 100644 --- a/tests/fixtures/cassettes/sms_messages_list_empty.yaml +++ b/tests/fixtures/cassettes/sms_messages_list_empty.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages?limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966caa458c881b8b-BEG + - a16ed1e0ab32076b-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:37:00 GMT + - Mon, 06 Jul 2026 13:05:14 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_messages_list_with_filters.yaml b/tests/fixtures/cassettes/sms_messages_list_with_filters.yaml index 1e23b1b..741a005 100644 --- a/tests/fixtures/cassettes/sms_messages_list_with_filters.yaml +++ b/tests/fixtures/cassettes/sms_messages_list_with_filters.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":25,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":25,"to":null,"total":0}}' headers: CF-RAY: - - 966caa4a5d1b126d-BEG + - a16ed1e22a78e292-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:37:01 GMT + - Mon, 06 Jul 2026 13:05:14 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_messages_list_with_pagination.yaml b/tests/fixtures/cassettes/sms_messages_list_with_pagination.yaml index 061a6d1..20a3922 100644 --- a/tests/fixtures/cassettes/sms_messages_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/sms_messages_list_with_pagination.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-messages?limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966caa43dfca076b-BEG + - a16ed1dffc12e298-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 12:37:00 GMT + - Mon, 06 Jul 2026 13:05:14 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_numbers_api_response_structure.yaml b/tests/fixtures/cassettes/sms_numbers_api_response_structure.yaml index 87e0ebc..546be1c 100644 --- a/tests/fixtures/cassettes/sms_numbers_api_response_structure.yaml +++ b/tests/fixtures/cassettes/sms_numbers_api_response_structure.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-numbers response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":15,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":15,"to":null,"total":0}}' headers: CF-RAY: - - 966d57d00f301f09-BEG + - a16ed1eadb00e298-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:28 GMT + - Mon, 06 Jul 2026 13:05:16 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_numbers_delete_not_found.yaml b/tests/fixtures/cassettes/sms_numbers_delete_not_found.yaml index 3eff10d..a2b9a5e 100644 --- a/tests/fixtures/cassettes/sms_numbers_delete_not_found.yaml +++ b/tests/fixtures/cassettes/sms_numbers_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d57cf2e01f339-BEG + - a16ed1ea1b4271a6-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:28 GMT + - Mon, 06 Jul 2026 13:05:15 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '35' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_numbers_empty_result.yaml b/tests/fixtures/cassettes/sms_numbers_empty_result.yaml index 3d88607..386d62c 100644 --- a/tests/fixtures/cassettes/sms_numbers_empty_result.yaml +++ b/tests/fixtures/cassettes/sms_numbers_empty_result.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-numbers response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":15,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":15,"to":null,"total":0}}' headers: CF-RAY: - - 966d57d0fca61b8b-BEG + - a16ed1eb8d96f339-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:28 GMT + - Mon, 06 Jul 2026 13:05:16 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '35' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_numbers_get_not_found.yaml b/tests/fixtures/cassettes/sms_numbers_get_not_found.yaml index 17b79a6..3a74f2e 100644 --- a/tests/fixtures/cassettes/sms_numbers_get_not_found.yaml +++ b/tests/fixtures/cassettes/sms_numbers_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d57cb3beafa43-BEG + - a16ed1e73dd8dfc0-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:27 GMT + - Mon, 06 Jul 2026 13:05:15 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '40' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_numbers_list_active_only.yaml b/tests/fixtures/cassettes/sms_numbers_list_active_only.yaml index 902680b..4e39fbb 100644 --- a/tests/fixtures/cassettes/sms_numbers_list_active_only.yaml +++ b/tests/fixtures/cassettes/sms_numbers_list_active_only.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-numbers?paused=false&limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":10,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d57c9ef058e88-BEG + - a16ed1e67f521b8b-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:27 GMT + - Mon, 06 Jul 2026 13:05:15 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_numbers_list_basic.yaml b/tests/fixtures/cassettes/sms_numbers_list_basic.yaml index 7bf3ef9..a1cc6c1 100644 --- a/tests/fixtures/cassettes/sms_numbers_list_basic.yaml +++ b/tests/fixtures/cassettes/sms_numbers_list_basic.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-numbers response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":15,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":15,"to":null,"total":0}}' headers: CF-RAY: - - 966d5780d8b0e292-BEG + - a16ed1e44c6be291-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:16 GMT + - Mon, 06 Jul 2026 13:05:15 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_numbers_list_paused_only.yaml b/tests/fixtures/cassettes/sms_numbers_list_paused_only.yaml index 257ac2d..418e291 100644 --- a/tests/fixtures/cassettes/sms_numbers_list_paused_only.yaml +++ b/tests/fixtures/cassettes/sms_numbers_list_paused_only.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-numbers?paused=true&limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":10,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d57c80972076b-BEG + - a16ed1e5bf580380-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:27 GMT + - Mon, 06 Jul 2026 13:05:15 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_numbers_list_with_filters.yaml b/tests/fixtures/cassettes/sms_numbers_list_with_filters.yaml index 402b566..3d540f7 100644 --- a/tests/fixtures/cassettes/sms_numbers_list_with_filters.yaml +++ b/tests/fixtures/cassettes/sms_numbers_list_with_filters.yaml @@ -11,17 +11,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-numbers?paused=false&page=1&limit=10 response: body: string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":10,"to":null,"total":0}}' + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":10,"to":null,"total":0}}' headers: CF-RAY: - - 966d57c71b8ce292-BEG + - a16ed1e50befc239-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:27 GMT + - Mon, 06 Jul 2026 13:05:15 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_numbers_update_not_found.yaml b/tests/fixtures/cassettes/sms_numbers_update_not_found.yaml index 62803b9..cfcac2c 100644 --- a/tests/fixtures/cassettes/sms_numbers_update_not_found.yaml +++ b/tests/fixtures/cassettes/sms_numbers_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d57cbfe4896e0-BEG + - a16ed1e7efa5bbed-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:28 GMT + - Mon, 06 Jul 2026 13:05:15 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_numbers_update_pause.yaml b/tests/fixtures/cassettes/sms_numbers_update_pause.yaml index c92c497..9890d4e 100644 --- a/tests/fixtures/cassettes/sms_numbers_update_pause.yaml +++ b/tests/fixtures/cassettes/sms_numbers_update_pause.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d57cd78d78e88-BEG + - a16ed1e889f3e293-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:28 GMT + - Mon, 06 Jul 2026 13:05:15 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_numbers_update_unpause.yaml b/tests/fixtures/cassettes/sms_numbers_update_unpause.yaml index efcae5e..df37d89 100644 --- a/tests/fixtures/cassettes/sms_numbers_update_unpause.yaml +++ b/tests/fixtures/cassettes/sms_numbers_update_unpause.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d57ce49ace291-BEG + - a16ed1e9489ce290-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:35:28 GMT + - Mon, 06 Jul 2026 13:05:15 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '40' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml b/tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml index d292388..f720f47 100644 --- a/tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml +++ b/tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' headers: CF-RAY: - - 966d52917c9c076b-BEG + - a16ed1f10e29cf86-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:54 GMT + - Mon, 06 Jul 2026 13:05:17 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_recipients_builder_get_not_found.yaml b/tests/fixtures/cassettes/sms_recipients_builder_get_not_found.yaml index 165d581..6fe53e6 100644 --- a/tests/fixtures/cassettes/sms_recipients_builder_get_not_found.yaml +++ b/tests/fixtures/cassettes/sms_recipients_builder_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients/test-sms-recipient-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d52981e38870d-BEG + - a16ed1f48b9c1b8b-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:55 GMT + - Mon, 06 Jul 2026 13:05:17 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml b/tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml index 0e14efe..f483eed 100644 --- a/tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' headers: CF-RAY: - - 966d52940e9fbbed-BEG + - a16ed1f26ad2562e-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:54 GMT + - Mon, 06 Jul 2026 13:05:17 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_recipients_builder_list_with_sms_number.yaml b/tests/fixtures/cassettes/sms_recipients_builder_list_with_sms_number.yaml index 7b423e6..6a62442 100644 --- a/tests/fixtures/cassettes/sms_recipients_builder_list_with_sms_number.yaml +++ b/tests/fixtures/cassettes/sms_recipients_builder_list_with_sms_number.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?sms_number_id=test-sms-number-id&limit=10 response: @@ -20,7 +20,7 @@ interactions: selected sms number id is invalid."]}}' headers: CF-RAY: - - 966d54ecac96b018-BEG + - a16ed1f3ed85c239-BEG Cache-Control: - no-cache, private Connection: @@ -28,19 +28,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:33:30 GMT + - Mon, 06 Jul 2026 13:05:17 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '35' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_recipients_builder_list_with_status.yaml b/tests/fixtures/cassettes/sms_recipients_builder_list_with_status.yaml index ccc798b..df7329c 100644 --- a/tests/fixtures/cassettes/sms_recipients_builder_list_with_status.yaml +++ b/tests/fixtures/cassettes/sms_recipients_builder_list_with_status.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?status=active response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":25,"to":null}}' headers: CF-RAY: - - 966d52950c425165-BEG + - a16ed1f32d429857-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:54 GMT + - Mon, 06 Jul 2026 13:05:17 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_recipients_builder_update_not_found.yaml b/tests/fixtures/cassettes/sms_recipients_builder_update_not_found.yaml index f650ca9..a1492b7 100644 --- a/tests/fixtures/cassettes/sms_recipients_builder_update_not_found.yaml +++ b/tests/fixtures/cassettes/sms_recipients_builder_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/sms-recipients/test-sms-recipient-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d529919e2b01d-BEG + - a16ed1f538f6cf86-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:55 GMT + - Mon, 06 Jul 2026 13:05:17 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '45' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml b/tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml index 1f189d2..c575977 100644 --- a/tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' headers: CF-RAY: - - 966d54ee3c053267-BEG + - a16ed1f5f9f90380-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:33:30 GMT + - Mon, 06 Jul 2026 13:05:17 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '40' status: code: 200 message: OK @@ -57,15 +59,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?status=active response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":25,"to":null}}' headers: CF-RAY: - - 966d54efba6bf969-BEG + - a16ed1f6bdc1562e-BEG Cache-Control: - no-cache, private Connection: @@ -75,19 +77,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:33:30 GMT + - Mon, 06 Jul 2026 13:05:17 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 200 message: OK @@ -103,7 +107,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients/non-existent-id response: @@ -111,7 +115,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d54f0bd42f969-BEG + - a16ed1f77bbce293-BEG Cache-Control: - no-cache, private Connection: @@ -121,15 +125,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:33:31 GMT + - Mon, 06 Jul 2026 13:05:18 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 404 message: Not Found @@ -145,7 +155,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients/another-non-existent-id response: @@ -153,7 +163,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d54f16ca4dfc0-BEG + - a16ed1f82adfe291-BEG Cache-Control: - no-cache, private Connection: @@ -163,15 +173,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:33:31 GMT + - Mon, 06 Jul 2026 13:05:18 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '63' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_recipients_empty_result.yaml b/tests/fixtures/cassettes/sms_recipients_empty_result.yaml index 071a578..b958d95 100644 --- a/tests/fixtures/cassettes/sms_recipients_empty_result.yaml +++ b/tests/fixtures/cassettes/sms_recipients_empty_result.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' headers: CF-RAY: - - 966d5292ea9be297-BEG + - a16ed1f1bc6ce28f-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:54 GMT + - Mon, 06 Jul 2026 13:05:17 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_recipients_get_not_found.yaml b/tests/fixtures/cassettes/sms_recipients_get_not_found.yaml index 0d81ef3..be2fbd7 100644 --- a/tests/fixtures/cassettes/sms_recipients_get_not_found.yaml +++ b/tests/fixtures/cassettes/sms_recipients_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients/test-sms-recipient-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d528f28afc747-VIE + - a16ed1ef8cd8e298-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:53 GMT + - Mon, 06 Jul 2026 13:05:16 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '52' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_recipients_list_basic.yaml b/tests/fixtures/cassettes/sms_recipients_list_basic.yaml index 8389af4..35c582e 100644 --- a/tests/fixtures/cassettes/sms_recipients_list_basic.yaml +++ b/tests/fixtures/cassettes/sms_recipients_list_basic.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' headers: CF-RAY: - - 966d52896efd8eb1-VIE + - a16ed1ec58791f09-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:52 GMT + - Mon, 06 Jul 2026 13:05:16 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_recipients_list_with_pagination.yaml b/tests/fixtures/cassettes/sms_recipients_list_with_pagination.yaml index 01d725e..f4b1f81 100644 --- a/tests/fixtures/cassettes/sms_recipients_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/sms_recipients_list_with_pagination.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":25,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":25,"to":null}}' headers: CF-RAY: - - 966d528ac84011d5-VIE + - a16ed1ed1b98bbed-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:52 GMT + - Mon, 06 Jul 2026 13:05:16 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '55' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_recipients_list_with_sms_number_filter.yaml b/tests/fixtures/cassettes/sms_recipients_list_with_sms_number_filter.yaml index 41b7776..b040589 100644 --- a/tests/fixtures/cassettes/sms_recipients_list_with_sms_number_filter.yaml +++ b/tests/fixtures/cassettes/sms_recipients_list_with_sms_number_filter.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?sms_number_id=test-sms-number-id&limit=10 response: @@ -20,7 +20,7 @@ interactions: selected sms number id is invalid."]}}' headers: CF-RAY: - - 966d54eb3a0a8e88-BEG + - a16ed1eed8a6c687-BEG Cache-Control: - no-cache, private Connection: @@ -28,19 +28,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:33:30 GMT + - Mon, 06 Jul 2026 13:05:16 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_recipients_list_with_status_filter.yaml b/tests/fixtures/cassettes/sms_recipients_list_with_status_filter.yaml index f486c7c..b3fd562 100644 --- a/tests/fixtures/cassettes/sms_recipients_list_with_status_filter.yaml +++ b/tests/fixtures/cassettes/sms_recipients_list_with_status_filter.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-recipients?status=active&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' headers: CF-RAY: - - 966d528c7ec30b0f-VIE + - a16ed1edef831778-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:53 GMT + - Mon, 06 Jul 2026 13:05:16 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '60' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/sms_recipients_update_not_found.yaml b/tests/fixtures/cassettes/sms_recipients_update_not_found.yaml index 0134a7c..f23a76c 100644 --- a/tests/fixtures/cassettes/sms_recipients_update_not_found.yaml +++ b/tests/fixtures/cassettes/sms_recipients_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/sms-recipients/test-sms-recipient-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d528ffb32d814-BEG + - a16ed1f04ca5fa43-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:31:53 GMT + - Mon, 06 Jul 2026 13:05:16 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '48' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_send_basic.yaml b/tests/fixtures/cassettes/sms_send_basic.yaml index 927143c..8b9ff5b 100644 --- a/tests/fixtures/cassettes/sms_send_basic.yaml +++ b/tests/fixtures/cassettes/sms_send_basic.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"from": "+1234567890", "to": ["+1234567890"], "text": "Hello, this - is a test SMS message!"}' + body: '{"from": "+1234567890", "to": ["+1234567890"], "text": "Hello, this is + a test SMS message!"}' headers: Accept: - application/json @@ -10,11 +10,11 @@ interactions: Connection: - keep-alive Content-Length: - - '96' + - '92' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/sms response: @@ -25,7 +25,7 @@ interactions: number."]}}' headers: CF-RAY: - - 966d52c86efaaeaa-BEG + - a16ed1f908add814-BEG Cache-Control: - no-cache, private Connection: @@ -33,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:32:02 GMT + - Mon, 06 Jul 2026 13:05:18 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '53' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_send_long_message.yaml b/tests/fixtures/cassettes/sms_send_long_message.yaml index 733e538..b065964 100644 --- a/tests/fixtures/cassettes/sms_send_long_message.yaml +++ b/tests/fixtures/cassettes/sms_send_long_message.yaml @@ -26,11 +26,11 @@ interactions: Connection: - keep-alive Content-Length: - - '1462' + - '1458' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/sms response: @@ -41,7 +41,7 @@ interactions: number."]}}' headers: CF-RAY: - - 966d533d3969e294-BEG + - a16ed1fad98cf339-BEG Cache-Control: - no-cache, private Connection: @@ -49,19 +49,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:32:21 GMT + - Mon, 06 Jul 2026 13:05:18 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_send_multiple_recipients.yaml b/tests/fixtures/cassettes/sms_send_multiple_recipients.yaml index 54c585b..62d7740 100644 --- a/tests/fixtures/cassettes/sms_send_multiple_recipients.yaml +++ b/tests/fixtures/cassettes/sms_send_multiple_recipients.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"from": "+1234567890", "to": ["+1234567890"], "text": "Message for - multiple recipients"}' + body: '{"from": "+1234567890", "to": ["+1234567890"], "text": "Message for multiple + recipients"}' headers: Accept: - application/json @@ -10,11 +10,11 @@ interactions: Connection: - keep-alive Content-Length: - - '93' + - '89' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/sms response: @@ -25,7 +25,7 @@ interactions: number."]}}' headers: CF-RAY: - - 966d533e5c36e294-BEG + - a16ed1fb9963076b-BEG Cache-Control: - no-cache, private Connection: @@ -33,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:32:21 GMT + - Mon, 06 Jul 2026 13:05:18 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '55' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_send_with_personalization.yaml b/tests/fixtures/cassettes/sms_send_with_personalization.yaml index 97b85ab..5d0cba7 100644 --- a/tests/fixtures/cassettes/sms_send_with_personalization.yaml +++ b/tests/fixtures/cassettes/sms_send_with_personalization.yaml @@ -11,11 +11,11 @@ interactions: Connection: - keep-alive Content-Length: - - '191' + - '185' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/sms response: @@ -26,7 +26,7 @@ interactions: number."]}}' headers: CF-RAY: - - 966d533c3e1cc687-BEG + - a16ed1f9db1b0380-BEG Cache-Control: - no-cache, private Connection: @@ -34,19 +34,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:32:21 GMT + - Mon, 06 Jul 2026 13:05:18 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '73' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_webhooks_create_invalid_sms_number.yaml b/tests/fixtures/cassettes/sms_webhooks_create_invalid_sms_number.yaml index 45c39dd..f19366a 100644 --- a/tests/fixtures/cassettes/sms_webhooks_create_invalid_sms_number.yaml +++ b/tests/fixtures/cassettes/sms_webhooks_create_invalid_sms_number.yaml @@ -15,16 +15,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/sms-webhooks response: body: - string: '{"message":"The sms number id field is required. #MS42209","errors":{"sms_number_id":["The - sms number id field is required. #MS42209"]}}' + string: '{"message":"The endpoint returned HTTP 405. (and 1 more error)","errors":{"url":["The + endpoint returned HTTP 405."],"sms_number_id":["The sms number id field is + required. #MS42209"]}}' headers: CF-RAY: - - 966d689b9b428e88-BEG + - a16ed1feaf34c687-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:46:56 GMT + - Mon, 06 Jul 2026 13:05:19 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '90' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_webhooks_create_with_all_events.yaml b/tests/fixtures/cassettes/sms_webhooks_create_with_all_events.yaml index 91f4ffc..a6624e6 100644 --- a/tests/fixtures/cassettes/sms_webhooks_create_with_all_events.yaml +++ b/tests/fixtures/cassettes/sms_webhooks_create_with_all_events.yaml @@ -15,16 +15,17 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/sms-webhooks response: body: - string: '{"message":"The sms number id field is required. #MS42209","errors":{"sms_number_id":["The - sms number id field is required. #MS42209"]}}' + string: '{"message":"The endpoint returned HTTP 405. (and 1 more error)","errors":{"url":["The + endpoint returned HTTP 405."],"sms_number_id":["The sms number id field is + required. #MS42209"]}}' headers: CF-RAY: - - 966d689d1ffa96e0-BEG + - a16ed1ffbde9aeaa-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:46:57 GMT + - Mon, 06 Jul 2026 13:05:19 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '108' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_webhooks_delete_not_found.yaml b/tests/fixtures/cassettes/sms_webhooks_delete_not_found.yaml index df7308d..97edcb7 100644 --- a/tests/fixtures/cassettes/sms_webhooks_delete_not_found.yaml +++ b/tests/fixtures/cassettes/sms_webhooks_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/sms-webhooks/test-sms-webhook-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d68a09990e295-BEG + - a16ed202587bfa43-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:46:57 GMT + - Mon, 06 Jul 2026 13:05:19 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '47' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_webhooks_get_not_found.yaml b/tests/fixtures/cassettes/sms_webhooks_get_not_found.yaml index aca5d4e..e208151 100644 --- a/tests/fixtures/cassettes/sms_webhooks_get_not_found.yaml +++ b/tests/fixtures/cassettes/sms_webhooks_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-webhooks/test-sms-webhook-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d689a2a27d814-BEG + - a16ed1fdec0e1f09-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:46:56 GMT + - Mon, 06 Jul 2026 13:05:19 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_webhooks_list_basic.yaml b/tests/fixtures/cassettes/sms_webhooks_list_basic.yaml index 63a7746..6231603 100644 --- a/tests/fixtures/cassettes/sms_webhooks_list_basic.yaml +++ b/tests/fixtures/cassettes/sms_webhooks_list_basic.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-webhooks?sms_number_id=test-sms-number-id response: @@ -20,7 +20,7 @@ interactions: sms number id field is required. #MS42209"]}}' headers: CF-RAY: - - 966d65a14e711b8b-BEG + - a16ed1fc78bd1b8b-BEG Cache-Control: - no-cache, private Connection: @@ -28,19 +28,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:44:54 GMT + - Mon, 06 Jul 2026 13:05:18 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_webhooks_list_with_invalid_sms_number.yaml b/tests/fixtures/cassettes/sms_webhooks_list_with_invalid_sms_number.yaml index 533b533..d1d14ff 100644 --- a/tests/fixtures/cassettes/sms_webhooks_list_with_invalid_sms_number.yaml +++ b/tests/fixtures/cassettes/sms_webhooks_list_with_invalid_sms_number.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/sms-webhooks?sms_number_id=invalid-sms-number-id response: @@ -20,7 +20,7 @@ interactions: sms number id field is required. #MS42209"]}}' headers: CF-RAY: - - 966d6898da8a076b-BEG + - a16ed1fd2ebff339-BEG Cache-Control: - no-cache, private Connection: @@ -28,19 +28,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:46:56 GMT + - Mon, 06 Jul 2026 13:05:18 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/sms_webhooks_update_disable.yaml b/tests/fixtures/cassettes/sms_webhooks_update_disable.yaml index 946785d..51b37db 100644 --- a/tests/fixtures/cassettes/sms_webhooks_update_disable.yaml +++ b/tests/fixtures/cassettes/sms_webhooks_update_disable.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/sms-webhooks/test-sms-webhook-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d689f5b4de291-BEG + - a16ed2018cb6126d-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:46:57 GMT + - Mon, 06 Jul 2026 13:05:19 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '49' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml b/tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml index 0f6141f..fe4c644 100644 --- a/tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml +++ b/tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/sms-webhooks/test-sms-webhook-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d689e6c28b01b-BEG + - a16ed200d871e291-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:46:57 GMT + - Mon, 06 Jul 2026 13:05:19 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml b/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml index f54876d..6940181 100644 --- a/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml +++ b/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml @@ -11,15 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":null}}' + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: - - 966d2f8bee235165-BEG + - a16ed2089eb3e297-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:59 GMT + - Mon, 06 Jul 2026 13:05:20 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/smtp_users_builder_create_invalid_domain.yaml b/tests/fixtures/cassettes/smtp_users_builder_create_invalid_domain.yaml index db686cc..e16f062 100644 --- a/tests/fixtures/cassettes/smtp_users_builder_create_invalid_domain.yaml +++ b/tests/fixtures/cassettes/smtp_users_builder_create_invalid_domain.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/domains/invalid-domain-id/smtp-users response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f915ae8c239-BEG + - a16ed20c6dd2e294-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:00 GMT + - Mon, 06 Jul 2026 13:05:21 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml b/tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml index 7bf3bf7..a59b96c 100644 --- a/tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml +++ b/tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f92e81ac239-BEG + - a16ed20ddf4d562e-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:00 GMT + - Mon, 06 Jul 2026 13:05:21 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_builder_get_not_found.yaml b/tests/fixtures/cassettes/smtp_users_builder_get_not_found.yaml index 35ab9b8..a04da24 100644 --- a/tests/fixtures/cassettes/smtp_users_builder_get_not_found.yaml +++ b/tests/fixtures/cassettes/smtp_users_builder_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f908cd99857-BEG + - a16ed20bbc8cc239-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:00 GMT + - Mon, 06 Jul 2026 13:05:21 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml b/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml index 58465c8..6b699c3 100644 --- a/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml @@ -11,15 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":null}}' + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: - - 966d2f8e382d076b-BEG + - a16ed20a4b81e291-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:59 GMT + - Mon, 06 Jul 2026 13:05:21 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml b/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml index bfef72b..31d1442 100644 --- a/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml +++ b/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml @@ -11,15 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=50 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":50,"to":null}}' + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":50,"to":1}}' headers: CF-RAY: - - 966d2f8f6a5d71a3-BEG + - a16ed20b0879e28f-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:00 GMT + - Mon, 06 Jul 2026 13:05:21 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/smtp_users_builder_update_not_found.yaml b/tests/fixtures/cassettes/smtp_users_builder_update_not_found.yaml index 769e42c..345c045 100644 --- a/tests/fixtures/cassettes/smtp_users_builder_update_not_found.yaml +++ b/tests/fixtures/cassettes/smtp_users_builder_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f922de60380-BEG + - a16ed20d2b12e297-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:00 GMT + - Mon, 06 Jul 2026 13:05:21 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml b/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml index a608e5e..e6fd7c5 100644 --- a/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml @@ -11,15 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":null}}' + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: - - 966d2f93adb7076b-BEG + - a16ed20eaa1955ad-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:00 GMT + - Mon, 06 Jul 2026 13:05:21 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 200 message: OK @@ -57,15 +60,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":25,"to":null}}' + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":25,"to":1}}' headers: CF-RAY: - - 966d2f948d30e292-BEG + - a16ed20f5db7bbed-BEG Cache-Control: - no-cache, private Connection: @@ -75,19 +79,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:00 GMT + - Mon, 06 Jul 2026 13:05:21 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '43' status: code: 200 message: OK @@ -103,7 +109,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/non-existent-id response: @@ -111,7 +117,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f955b36e297-BEG + - a16ed2102a3f9857-BEG Cache-Control: - no-cache, private Connection: @@ -121,15 +127,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:00 GMT + - Mon, 06 Jul 2026 13:05:22 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 404 message: Not Found @@ -147,7 +159,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/domains/invalid-domain/smtp-users response: @@ -155,7 +167,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f96198ce292-BEG + - a16ed210dda3126d-BEG Cache-Control: - no-cache, private Connection: @@ -165,15 +177,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:01 GMT + - Mon, 06 Jul 2026 13:05:22 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '52' status: code: 404 message: Not Found @@ -189,7 +207,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/another-non-existent-id response: @@ -197,7 +215,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f971a850a8e-BEG + - a16ed211a93ce298-BEG Cache-Control: - no-cache, private Connection: @@ -207,15 +225,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:08:01 GMT + - Mon, 06 Jul 2026 13:05:22 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml b/tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml index ec5ce11..98131df 100644 --- a/tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml +++ b/tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/domains/invalid-domain-id/smtp-users response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f88ce72af0a-VIE + - a16ed2062af355ad-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:58 GMT + - Mon, 06 Jul 2026 13:05:20 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '50' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_delete_not_found.yaml b/tests/fixtures/cassettes/smtp_users_delete_not_found.yaml index 6ed30d1..4db51a5 100644 --- a/tests/fixtures/cassettes/smtp_users_delete_not_found.yaml +++ b/tests/fixtures/cassettes/smtp_users_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f8b1806e295-BEG + - a16ed207c972e28f-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:59 GMT + - Mon, 06 Jul 2026 13:05:20 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '45' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_empty_result.yaml b/tests/fixtures/cassettes/smtp_users_empty_result.yaml index ab2e45a..98cc221 100644 --- a/tests/fixtures/cassettes/smtp_users_empty_result.yaml +++ b/tests/fixtures/cassettes/smtp_users_empty_result.yaml @@ -11,15 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":null}}' + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: - - 966d2f8cba1d8e88-BEG + - a16ed2096a9b1b8b-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:59 GMT + - Mon, 06 Jul 2026 13:05:20 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/smtp_users_get_not_found.yaml b/tests/fixtures/cassettes/smtp_users_get_not_found.yaml index a4cf791..6d1e0e0 100644 --- a/tests/fixtures/cassettes/smtp_users_get_not_found.yaml +++ b/tests/fixtures/cassettes/smtp_users_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f879f255db9-VIE + - a16ed2056abce293-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:58 GMT + - Mon, 06 Jul 2026 13:05:20 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_list_basic.yaml b/tests/fixtures/cassettes/smtp_users_list_basic.yaml index 858d5cd..16bc197 100644 --- a/tests/fixtures/cassettes/smtp_users_list_basic.yaml +++ b/tests/fixtures/cassettes/smtp_users_list_basic.yaml @@ -11,15 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":null}}' + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: - - 966d2f83cf2e3ec1-VIE + - a16ed203293f076b-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:58 GMT + - Mon, 06 Jul 2026 13:05:19 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/smtp_users_list_invalid_domain.yaml b/tests/fixtures/cassettes/smtp_users_list_invalid_domain.yaml index e755f28..f9a29c6 100644 --- a/tests/fixtures/cassettes/smtp_users_list_invalid_domain.yaml +++ b/tests/fixtures/cassettes/smtp_users_list_invalid_domain.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/invalid-domain-id/smtp-users?limit=10 response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f867de68eb1-VIE + - a16ed204acdba8bc-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:58 GMT + - Mon, 06 Jul 2026 13:05:20 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml b/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml index 87632ea..ae50ea0 100644 --- a/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml +++ b/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml @@ -11,15 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":25,"to":null}}' + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":25,"to":1}}' headers: CF-RAY: - - 966d2f850e51b654-VIE + - a16ed203e8b8e290-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:58 GMT + - Mon, 06 Jul 2026 13:05:20 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/smtp_users_update_not_found.yaml b/tests/fixtures/cassettes/smtp_users_update_not_found.yaml index 1e470e0..ab7aa89 100644 --- a/tests/fixtures/cassettes/smtp_users_update_not_found.yaml +++ b/tests/fixtures/cassettes/smtp_users_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d2f8a0d08afe9-VIE + - a16ed206fd1355ad-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:07:59 GMT + - Mon, 06 Jul 2026 13:05:20 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '47' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/templates_api_response_structure.yaml b/tests/fixtures/cassettes/templates_api_response_structure.yaml index a8e9893..f36c225 100644 --- a/tests/fixtures/cassettes/templates_api_response_structure.yaml +++ b/tests/fixtures/cassettes/templates_api_response_structure.yaml @@ -11,16 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/templates?page=1&limit=10 response: body: - string: '{"data":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","category":null,"categories":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","category":null,"categories":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","category":null,"categories":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","category":null,"categories":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":4}}' + string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":6}}' headers: CF-RAY: - - 966d35841d48d814-BEG + - a16ed21a5958dfc0-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:12:04 GMT + - Mon, 06 Jul 2026 13:05:23 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '213' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/templates_delete.yaml b/tests/fixtures/cassettes/templates_delete.yaml index d7a34d9..f529630 100644 --- a/tests/fixtures/cassettes/templates_delete.yaml +++ b/tests/fixtures/cassettes/templates_delete.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/templates/test-template-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d3582eb4b126d-BEG + - a16ed219ac8bc687-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:12:03 GMT + - Mon, 06 Jul 2026 13:05:23 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/templates_empty_result.yaml b/tests/fixtures/cassettes/templates_empty_result.yaml index 0f8e2f7..52e223e 100644 --- a/tests/fixtures/cassettes/templates_empty_result.yaml +++ b/tests/fixtures/cassettes/templates_empty_result.yaml @@ -11,16 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/templates?page=1&limit=10 response: body: - string: '{"data":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","category":null,"categories":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","category":null,"categories":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","category":null,"categories":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","category":null,"categories":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":4}}' + string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":6}}' headers: CF-RAY: - - 966d35866a92cf86-BEG + - a16ed21c28cbe298-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:12:04 GMT + - Mon, 06 Jul 2026 13:05:24 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '246' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/templates_get_single.yaml b/tests/fixtures/cassettes/templates_get_single.yaml index 7a8fa11..1b9811d 100644 --- a/tests/fixtures/cassettes/templates_get_single.yaml +++ b/tests/fixtures/cassettes/templates_get_single.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/templates/test-template-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d3581e8d4e294-BEG + - a16ed2190e50e293-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:12:03 GMT + - Mon, 06 Jul 2026 13:05:23 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/templates_list_basic.yaml b/tests/fixtures/cassettes/templates_list_basic.yaml index cfe6ff2..25cb248 100644 --- a/tests/fixtures/cassettes/templates_list_basic.yaml +++ b/tests/fixtures/cassettes/templates_list_basic.yaml @@ -11,16 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/templates?page=1&limit=10 response: body: - string: '{"data":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","category":null,"categories":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","category":null,"categories":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","category":null,"categories":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","category":null,"categories":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":4}}' + string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":6}}' headers: CF-RAY: - - 966d34802a46babc-VIE + - a16ed21278170380-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:11:22 GMT + - Mon, 06 Jul 2026 13:05:22 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '249' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/templates_list_no_params.yaml b/tests/fixtures/cassettes/templates_list_no_params.yaml index 427bc30..604c540 100644 --- a/tests/fixtures/cassettes/templates_list_no_params.yaml +++ b/tests/fixtures/cassettes/templates_list_no_params.yaml @@ -11,16 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/templates?page=1&limit=25 response: body: - string: '{"data":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","category":null,"categories":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","category":null,"categories":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","category":null,"categories":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","category":null,"categories":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":25,"to":4}}' + string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":25,"to":6}}' headers: CF-RAY: - - 966d357bfba996e0-BEG + - a16ed2148a19aeaa-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:12:02 GMT + - Mon, 06 Jul 2026 13:05:22 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '230' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/templates_list_with_domain_filter.yaml b/tests/fixtures/cassettes/templates_list_with_domain_filter.yaml index b8ce219..bfaeca5 100644 --- a/tests/fixtures/cassettes/templates_list_with_domain_filter.yaml +++ b/tests/fixtures/cassettes/templates_list_with_domain_filter.yaml @@ -11,15 +11,15 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/templates?domain_id=65qngkdovk8lwr12&page=1&limit=10 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":null,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":null}}' + string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":null}}' headers: CF-RAY: - - 966d35810b7396e0-BEG + - a16ed2184d019857-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:12:03 GMT + - Mon, 06 Jul 2026 13:05:23 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/templates_list_with_pagination.yaml b/tests/fixtures/cassettes/templates_list_with_pagination.yaml index 4a22594..38a7b72 100644 --- a/tests/fixtures/cassettes/templates_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/templates_list_with_pagination.yaml @@ -11,16 +11,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/templates?page=1&limit=10 response: body: - string: '{"data":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","category":null,"categories":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","category":null,"categories":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","category":null,"categories":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","category":null,"categories":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":4}}' + string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":6}}' headers: CF-RAY: - - 966d357e8add5165-BEG + - a16ed2167c0be28f-BEG Cache-Control: - no-cache, private Connection: @@ -30,19 +30,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:12:03 GMT + - Mon, 06 Jul 2026 13:05:23 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '210' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_api_response_structure.yaml b/tests/fixtures/cassettes/tokens_api_response_structure.yaml index 26e9126..8c78966 100644 --- a/tests/fixtures/cassettes/tokens_api_response_structure.yaml +++ b/tests/fixtures/cassettes/tokens_api_response_structure.yaml @@ -11,26 +11,27 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token?limit=10 response: body: - string: '{"data":[{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":9,"total":9}}' + string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender + Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full + access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity + test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring + BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK + API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next + »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":35}}' headers: CF-RAY: - - 9684c1d4ead555ad-BEG + - a16ed224da0adfc0-BEG Cache-Control: - no-cache, private Connection: @@ -40,19 +41,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:23 GMT + - Mon, 06 Jul 2026 13:05:25 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_builder_create_basic.yaml b/tests/fixtures/cassettes/tokens_builder_create_basic.yaml index 7fd5075..96cd803 100644 --- a/tests/fixtures/cassettes/tokens_builder_create_basic.yaml +++ b/tests/fixtures/cassettes/tokens_builder_create_basic.yaml @@ -13,18 +13,18 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/token response: body: - string: '{"data":{"id":"76527c5c823a91eb565857e0efe46f46dd4a2b00ab48c661ca7fd55c2bdbafbab877fda7f4441860","accessToken":"***FILTERED***","name":"Test - Token","created_at":"2025-08-01T10:47:24.000000Z","scopes":["email_full"],"has_full":false,"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"mx":true,"tracking":false,"is_verified":true,"is_dns_active":true,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"4ce0bb437a8306fb4324eb1dd810a7426e3bf1ab8ed9939afed0caf7798c4e787c49776cd3abfc8c","accessToken":"***FILTERED***","name":"Test + Token","created_at":"2026-07-06T13:05:26.000000Z","scopes":["email_full"],"has_full":false,"has_only_sending":false,"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"mx":true,"tracking":false,"is_verified":true,"is_dns_active":true,"is_trial_domain":false,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":false,"show_dkim_info":false,"is_being_verified":true},"preview":"***FILTERED***","expires_at":null}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":false,"show_dkim_info":false,"is_being_verified":true,"is_custom_links_available":false},"preview":"***FILTERED***","expires_at":null}}' headers: CF-RAY: - - 9684c1da4d44f969-BEG + - a16ed228dd2de296-BEG Cache-Control: - no-cache, private Connection: @@ -34,19 +34,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:24 GMT + - Mon, 06 Jul 2026 13:05:26 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '400' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_builder_delete_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_delete_not_found.yaml index 2896ffc..f066509 100644 --- a/tests/fixtures/cassettes/tokens_builder_delete_not_found.yaml +++ b/tests/fixtures/cassettes/tokens_builder_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/token/test-token-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1dd69b70380-BEG + - a16ed22d3ebdf339-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:25 GMT + - Mon, 06 Jul 2026 13:05:26 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/tokens_builder_get_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_get_not_found.yaml index 800117c..1644848 100644 --- a/tests/fixtures/cassettes/tokens_builder_get_not_found.yaml +++ b/tests/fixtures/cassettes/tokens_builder_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token/test-token-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1d958be8e88-BEG + - a16ed2281bb1e297-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:24 GMT + - Mon, 06 Jul 2026 13:05:25 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/tokens_builder_list_basic.yaml b/tests/fixtures/cassettes/tokens_builder_list_basic.yaml index 62511ff..38a2482 100644 --- a/tests/fixtures/cassettes/tokens_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/tokens_builder_list_basic.yaml @@ -11,26 +11,27 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token?limit=10 response: body: - string: '{"data":[{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":9,"total":9}}' + string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender + Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full + access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity + test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring + BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK + API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next + »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":35}}' headers: CF-RAY: - - 9684c1d7480ea8bc-BEG + - a16ed22668aac687-BEG Cache-Control: - no-cache, private Connection: @@ -40,19 +41,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:24 GMT + - Mon, 06 Jul 2026 13:05:25 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '48' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_builder_list_with_custom_limit.yaml b/tests/fixtures/cassettes/tokens_builder_list_with_custom_limit.yaml index 4af2ed7..d6d1dbc 100644 --- a/tests/fixtures/cassettes/tokens_builder_list_with_custom_limit.yaml +++ b/tests/fixtures/cassettes/tokens_builder_list_with_custom_limit.yaml @@ -11,26 +11,51 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token?limit=50 response: body: - string: '{"data":[{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":50,"to":9,"total":9}}' + string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender + Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full + access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity + test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring + BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK + API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"76527c5c823a91eb565857e0efe46f46dd4a2b00ab48c661ca7fd55c2bdbafbab877fda7f4441860","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:47:24.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"ad662d4e160d123d1b61d6d2c65831e16bbc78a32e0e8af120ecaff7c4d9102ae134e04df68dfc08","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:47:25.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7808f5082b2905269b53f0f78ce56cfd5c035096d00bc759e2cc0df0835c7f0c81acb77da8728d7a","name":"SDK + Test","status":"unpause","created_at":"2026-07-06T12:45:27.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full"],"domain":null},{"id":"b2482d15980ef4c836b7e0acd149149a982bec809507ca3443c26303395930088b208b319865a7d8","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:52:20.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ec7e8b5ca9c9d7f8c32bc7f7a70c8a9032a0db8ea9c885f7169c8fd72e7ffd8bdf25eb9c9475d3c","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:52:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"872b2dd2d39fb21ce56fd6b6b65f1d196f95e380d9313cfe0dffd9a68bc560a3ce8332583f639c65","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:53:31.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"a104908e2e6f18ad5cfdf009793d42b352760f15f353432c760ccee9fa48ee62f6d2c464b23aef7f","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:52:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0e27905c3400076ca3912f30f0fe9090e8ab165b1364a84b3783402887211830b08dd4bceaba160e","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:53:33.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"19cbf95976a478eed26c81dd559c7e6ffefeeefdc3b9873a11a6d978dbc29fa1b97a29928dc2da2e","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:53:34.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5ee4bc671311b2aeeced1e9b30588275d751c077da489b34db3e11687c2c342006da119ad6093c77","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:55:52.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d461638a63aad0a35b78eb404006b88478ce2fecca87a7951a153a94c6dd654922065c85c4bfecba","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:55:53.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5a549b40d7f605a4e76a16eaaabea65ddc4f69981929830b3c20c5afa18dff1824b45d897b69a3e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:55:54.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"1bba34fd1894bffa92f81f4057de2de43ee476d827d74c4e873ab87bb49330862579a4aa3b0016cb","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:57:45.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"8a19924345f967642ed1d9caf68cc4d2f2735ced0fb9b652bc7815d712dc367e2848de5618e81d11","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:57:47.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"8273df72a77678526e005d3008606eb17590728b641c9c0d265effaeb3bbb9c1149df43323bb4389","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:57:48.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"95696dc3b22f4a9f5b8d87bf3a8608b5601912fc1eeaf2fd80c996d777cdbd7126dde2be38afb4d7","name":"Test + Token","status":"unpause","created_at":"2026-07-06T13:02:47.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"07d5cf1663c6cd234d5526d05078e479f7ba9b0ee507a0c3c1d8ee01b2e0450d19a26520afaa9125","name":"Test + Token","status":"unpause","created_at":"2026-07-06T13:02:48.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2c44a98f9cbcf4dbc93b7b55f548603f79f95833fae335e891d155767a5e94b37fe5e6beee91ed77","name":"Test + Token","status":"unpause","created_at":"2026-07-06T13:02:49.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d232900e753b3e31af7a2b7e24c061b366aa570ef24a4ee7fd160a9c59a631f29e93b381c6a62e10","name":"Test + Token","status":"unpause","created_at":"2026-07-06T13:05:24.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"14cdaaf75fd5e5a7d9579d5af5712ec866701ac967c1a3331c88a7c96297c3427a4ac83bf0b18f75","name":"Bob","status":"unpause","created_at":"2026-01-30T13:41:01.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":50,"to":35,"total":35}}' headers: CF-RAY: - - 9684c1d84fabc239-BEG + - a16ed227297d3267-BEG Cache-Control: - no-cache, private Connection: @@ -40,19 +65,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:24 GMT + - Mon, 06 Jul 2026 13:05:25 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '75' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_builder_update_name_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_update_name_not_found.yaml index 46ab5b1..fcad765 100644 --- a/tests/fixtures/cassettes/tokens_builder_update_name_not_found.yaml +++ b/tests/fixtures/cassettes/tokens_builder_update_name_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/token/test-token-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1dcad4b076b-BEG + - a16ed22c8d53f339-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:25 GMT + - Mon, 06 Jul 2026 13:05:26 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '35' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/tokens_builder_update_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_update_not_found.yaml index d34abc8..40d3c09 100644 --- a/tests/fixtures/cassettes/tokens_builder_update_not_found.yaml +++ b/tests/fixtures/cassettes/tokens_builder_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/token/test-token-id/settings response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1dbcfc4c687-BEG + - a16ed22bdfbcaeaa-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:24 GMT + - Mon, 06 Jul 2026 13:05:26 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '40' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml b/tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml index 60fa9d5..7ceb262 100644 --- a/tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml @@ -11,27 +11,27 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token?limit=10 response: body: - string: '{"data":[{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"76527c5c823a91eb565857e0efe46f46dd4a2b00ab48c661ca7fd55c2bdbafbab877fda7f4441860","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:24.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":10}}' + string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender + Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full + access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity + test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring + BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK + API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next + »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":36}}' headers: CF-RAY: - - 9684c1de58e7e293-BEG + - a16ed22de81ff339-BEG Cache-Control: - no-cache, private Connection: @@ -41,19 +41,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:25 GMT + - Mon, 06 Jul 2026 13:05:26 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK @@ -69,27 +71,42 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token response: body: - string: '{"data":[{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"76527c5c823a91eb565857e0efe46f46dd4a2b00ab48c661ca7fd55c2bdbafbab877fda7f4441860","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:24.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?page=1","last":"https:\/\/api.mailersend.com\/v1\/token?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":25,"to":10,"total":10}}' + string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender + Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full + access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity + test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring + BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK + API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"76527c5c823a91eb565857e0efe46f46dd4a2b00ab48c661ca7fd55c2bdbafbab877fda7f4441860","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:47:24.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"ad662d4e160d123d1b61d6d2c65831e16bbc78a32e0e8af120ecaff7c4d9102ae134e04df68dfc08","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:47:25.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7808f5082b2905269b53f0f78ce56cfd5c035096d00bc759e2cc0df0835c7f0c81acb77da8728d7a","name":"SDK + Test","status":"unpause","created_at":"2026-07-06T12:45:27.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full"],"domain":null},{"id":"b2482d15980ef4c836b7e0acd149149a982bec809507ca3443c26303395930088b208b319865a7d8","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:52:20.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ec7e8b5ca9c9d7f8c32bc7f7a70c8a9032a0db8ea9c885f7169c8fd72e7ffd8bdf25eb9c9475d3c","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:52:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"872b2dd2d39fb21ce56fd6b6b65f1d196f95e380d9313cfe0dffd9a68bc560a3ce8332583f639c65","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:53:31.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"a104908e2e6f18ad5cfdf009793d42b352760f15f353432c760ccee9fa48ee62f6d2c464b23aef7f","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:52:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0e27905c3400076ca3912f30f0fe9090e8ab165b1364a84b3783402887211830b08dd4bceaba160e","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:53:33.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"19cbf95976a478eed26c81dd559c7e6ffefeeefdc3b9873a11a6d978dbc29fa1b97a29928dc2da2e","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:53:34.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5ee4bc671311b2aeeced1e9b30588275d751c077da489b34db3e11687c2c342006da119ad6093c77","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:55:52.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?page=1","last":"https:\/\/api.mailersend.com\/v1\/token?page=2","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?page=2"},"meta":{"current_page":1,"from":1,"last_page":2,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?page=2","label":"Next + »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":25,"to":25,"total":36}}' headers: CF-RAY: - - 9684c1df6f06aeaa-BEG + - a16ed22eacd2e297-BEG Cache-Control: - no-cache, private Connection: @@ -99,19 +116,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:25 GMT + - Mon, 06 Jul 2026 13:05:26 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '62' status: code: 200 message: OK @@ -127,7 +146,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token/non-existent-id response: @@ -135,7 +154,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1e12930a8bc-BEG + - a16ed22f78bf0380-BEG Cache-Control: - no-cache, private Connection: @@ -145,15 +164,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:25 GMT + - Mon, 06 Jul 2026 13:05:27 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' status: code: 404 message: Not Found @@ -171,18 +196,18 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/token response: body: - string: '{"data":{"id":"ad662d4e160d123d1b61d6d2c65831e16bbc78a32e0e8af120ecaff7c4d9102ae134e04df68dfc08","accessToken":"***FILTERED***","name":"Test - Token","created_at":"2025-08-01T10:47:25.000000Z","scopes":["email_full"],"has_full":false,"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"mx":true,"tracking":false,"is_verified":true,"is_dns_active":true,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"26905bfe0a6dd08bc9fc926f19f4227147aa1091b6815ee7dde1517de608eac6578eedff70d387d7","accessToken":"***FILTERED***","name":"Test + Token","created_at":"2026-07-06T13:05:27.000000Z","scopes":["email_full"],"has_full":false,"has_only_sending":false,"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"mx":true,"tracking":false,"is_verified":true,"is_dns_active":true,"is_trial_domain":false,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":false,"show_dkim_info":false,"is_being_verified":true},"preview":"***FILTERED***","expires_at":null}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":false,"show_dkim_info":false,"is_being_verified":true,"is_custom_links_available":false},"preview":"***FILTERED***","expires_at":null}}' headers: CF-RAY: - - 9684c1e219619857-BEG + - a16ed2302c908e88-BEG Cache-Control: - no-cache, private Connection: @@ -192,19 +217,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:26 GMT + - Mon, 06 Jul 2026 13:05:27 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '103' status: code: 200 message: OK @@ -220,7 +247,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token/another-non-existent-id response: @@ -228,7 +255,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1e41988870d-BEG + - a16ed2314c093267-BEG Cache-Control: - no-cache, private Connection: @@ -238,15 +265,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:26 GMT + - Mon, 06 Jul 2026 13:05:27 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/tokens_create_basic.yaml b/tests/fixtures/cassettes/tokens_create_basic.yaml index 89b3a0b..155ea32 100644 --- a/tests/fixtures/cassettes/tokens_create_basic.yaml +++ b/tests/fixtures/cassettes/tokens_create_basic.yaml @@ -14,18 +14,18 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/token response: body: - string: '{"data":{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","accessToken":"***FILTERED***","name":"Test - Token","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"has_full":false,"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"mx":true,"tracking":false,"is_verified":true,"is_dns_active":true,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom + string: '{"data":{"id":"d232900e753b3e31af7a2b7e24c061b366aa570ef24a4ee7fd160a9c59a631f29e93b381c6a62e10","accessToken":"***FILTERED***","name":"Test + Token","created_at":"2026-07-06T13:05:24.000000Z","scopes":["email_full","domains_read"],"has_full":false,"has_only_sending":false,"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"mx":true,"tracking":false,"is_verified":true,"is_dns_active":true,"is_trial_domain":false,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":false,"show_dkim_info":false,"is_being_verified":true},"preview":"***FILTERED***","expires_at":null}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":false,"show_dkim_info":false,"is_being_verified":true,"is_custom_links_available":false},"preview":"***FILTERED***","expires_at":null}}' headers: CF-RAY: - - 9684c1cfdd8bb018-BEG + - a16ed2218a6a9857-BEG Cache-Control: - no-cache, private Connection: @@ -35,19 +35,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:23 GMT + - Mon, 06 Jul 2026 13:05:24 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '96' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_delete_not_found.yaml b/tests/fixtures/cassettes/tokens_delete_not_found.yaml index d8ba273..c250902 100644 --- a/tests/fixtures/cassettes/tokens_delete_not_found.yaml +++ b/tests/fixtures/cassettes/tokens_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/token/test-token-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1d3fea65165-BEG + - a16ed2241ea2076b-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:23 GMT + - Mon, 06 Jul 2026 13:05:25 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/tokens_empty_result.yaml b/tests/fixtures/cassettes/tokens_empty_result.yaml index c4b34f0..fdf9567 100644 --- a/tests/fixtures/cassettes/tokens_empty_result.yaml +++ b/tests/fixtures/cassettes/tokens_empty_result.yaml @@ -11,26 +11,27 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token?limit=10 response: body: - string: '{"data":[{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":9,"total":9}}' + string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender + Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full + access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity + test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring + BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK + API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next + »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":35}}' headers: CF-RAY: - - 9684c1d6095fc687-BEG + - a16ed225aac6126d-BEG Cache-Control: - no-cache, private Connection: @@ -40,19 +41,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:24 GMT + - Mon, 06 Jul 2026 13:05:25 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '43' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_get_not_found.yaml b/tests/fixtures/cassettes/tokens_get_not_found.yaml index e77630f..b0376ab 100644 --- a/tests/fixtures/cassettes/tokens_get_not_found.yaml +++ b/tests/fixtures/cassettes/tokens_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token/test-token-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1cf1c92076b-BEG + - a16ed220ca92d814-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:22 GMT + - Mon, 06 Jul 2026 13:05:24 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '35' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/tokens_list_basic.yaml b/tests/fixtures/cassettes/tokens_list_basic.yaml index c41142d..d0ef8a3 100644 --- a/tests/fixtures/cassettes/tokens_list_basic.yaml +++ b/tests/fixtures/cassettes/tokens_list_basic.yaml @@ -11,25 +11,27 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token?limit=10 response: body: - string: '{"data":[{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":8,"total":8}}' + string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender + Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full + access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity + test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring + BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK + API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next + »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":34}}' headers: CF-RAY: - - 9684c1cb1951e290-BEG + - a16ed21e382f96e0-BEG Cache-Control: - no-cache, private Connection: @@ -39,19 +41,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:22 GMT + - Mon, 06 Jul 2026 13:05:24 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '44' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_list_different_limit.yaml b/tests/fixtures/cassettes/tokens_list_different_limit.yaml index 6895cad..c837e0c 100644 --- a/tests/fixtures/cassettes/tokens_list_different_limit.yaml +++ b/tests/fixtures/cassettes/tokens_list_different_limit.yaml @@ -11,25 +11,50 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token?limit=50 response: body: - string: '{"data":[{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":50,"to":8,"total":8}}' + string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender + Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full + access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity + test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring + BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK + API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"76527c5c823a91eb565857e0efe46f46dd4a2b00ab48c661ca7fd55c2bdbafbab877fda7f4441860","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:47:24.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"ad662d4e160d123d1b61d6d2c65831e16bbc78a32e0e8af120ecaff7c4d9102ae134e04df68dfc08","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:47:25.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7808f5082b2905269b53f0f78ce56cfd5c035096d00bc759e2cc0df0835c7f0c81acb77da8728d7a","name":"SDK + Test","status":"unpause","created_at":"2026-07-06T12:45:27.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full"],"domain":null},{"id":"b2482d15980ef4c836b7e0acd149149a982bec809507ca3443c26303395930088b208b319865a7d8","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:52:20.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ec7e8b5ca9c9d7f8c32bc7f7a70c8a9032a0db8ea9c885f7169c8fd72e7ffd8bdf25eb9c9475d3c","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:52:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"872b2dd2d39fb21ce56fd6b6b65f1d196f95e380d9313cfe0dffd9a68bc560a3ce8332583f639c65","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:53:31.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"a104908e2e6f18ad5cfdf009793d42b352760f15f353432c760ccee9fa48ee62f6d2c464b23aef7f","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:52:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0e27905c3400076ca3912f30f0fe9090e8ab165b1364a84b3783402887211830b08dd4bceaba160e","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:53:33.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"19cbf95976a478eed26c81dd559c7e6ffefeeefdc3b9873a11a6d978dbc29fa1b97a29928dc2da2e","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:53:34.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5ee4bc671311b2aeeced1e9b30588275d751c077da489b34db3e11687c2c342006da119ad6093c77","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:55:52.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d461638a63aad0a35b78eb404006b88478ce2fecca87a7951a153a94c6dd654922065c85c4bfecba","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:55:53.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5a549b40d7f605a4e76a16eaaabea65ddc4f69981929830b3c20c5afa18dff1824b45d897b69a3e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:55:54.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"1bba34fd1894bffa92f81f4057de2de43ee476d827d74c4e873ab87bb49330862579a4aa3b0016cb","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:57:45.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"8a19924345f967642ed1d9caf68cc4d2f2735ced0fb9b652bc7815d712dc367e2848de5618e81d11","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:57:47.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"8273df72a77678526e005d3008606eb17590728b641c9c0d265effaeb3bbb9c1149df43323bb4389","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:57:48.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"95696dc3b22f4a9f5b8d87bf3a8608b5601912fc1eeaf2fd80c996d777cdbd7126dde2be38afb4d7","name":"Test + Token","status":"unpause","created_at":"2026-07-06T13:02:47.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"07d5cf1663c6cd234d5526d05078e479f7ba9b0ee507a0c3c1d8ee01b2e0450d19a26520afaa9125","name":"Test + Token","status":"unpause","created_at":"2026-07-06T13:02:48.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2c44a98f9cbcf4dbc93b7b55f548603f79f95833fae335e891d155767a5e94b37fe5e6beee91ed77","name":"Test + Token","status":"unpause","created_at":"2026-07-06T13:02:49.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"14cdaaf75fd5e5a7d9579d5af5712ec866701ac967c1a3331c88a7c96297c3427a4ac83bf0b18f75","name":"Bob","status":"unpause","created_at":"2026-01-30T13:41:01.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":50,"to":34,"total":34}}' headers: CF-RAY: - - 9684c1ce19a2562e-BEG + - a16ed21fc9870a8e-BEG Cache-Control: - no-cache, private Connection: @@ -39,19 +64,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:22 GMT + - Mon, 06 Jul 2026 13:05:24 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '72' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_list_with_pagination.yaml b/tests/fixtures/cassettes/tokens_list_with_pagination.yaml index 8ddd8d9..998a871 100644 --- a/tests/fixtures/cassettes/tokens_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/tokens_list_with_pagination.yaml @@ -11,25 +11,27 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/token?limit=10 response: body: - string: '{"data":[{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-31T12:21:21.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":8,"total":8}}' + string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender + Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full + access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity + test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring + BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK + API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test + Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test + Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next + »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":34}}' headers: CF-RAY: - - 9684c1ccb94c5165-BEG + - a16ed21f0fc51f09-BEG Cache-Control: - no-cache, private Connection: @@ -39,19 +41,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:22 GMT + - Mon, 06 Jul 2026 13:05:24 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-08-02T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '43' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/tokens_update_name_not_found.yaml b/tests/fixtures/cassettes/tokens_update_name_not_found.yaml index a3534ef..fa3ce65 100644 --- a/tests/fixtures/cassettes/tokens_update_name_not_found.yaml +++ b/tests/fixtures/cassettes/tokens_update_name_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/token/test-token-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1d329668e88-BEG + - a16ed223590ba8bc-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:23 GMT + - Mon, 06 Jul 2026 13:05:25 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '42' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/tokens_update_not_found.yaml b/tests/fixtures/cassettes/tokens_update_not_found.yaml index a547a7f..7ba0525 100644 --- a/tests/fixtures/cassettes/tokens_update_not_found.yaml +++ b/tests/fixtures/cassettes/tokens_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/token/test-token-id/settings response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 9684c1d1cffde296-BEG + - a16ed2229e60f969-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Fri, 01 Aug 2025 10:47:23 GMT + - Mon, 06 Jul 2026 13:05:24 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/users_api_response_structure.yaml b/tests/fixtures/cassettes/users_api_response_structure.yaml index 9a4004b..5b4b9e4 100644 --- a/tests/fixtures/cassettes/users_api_response_structure.yaml +++ b/tests/fixtures/cassettes/users_api_response_structure.yaml @@ -11,24 +11,26 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/users?limit=10 response: body: - string: '{"data":[{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2025-06-18T12:23:36.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2025-07-23T07:09:26.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2025-06-23T11:36:10.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":false,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2024-12-19T15:51:25.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + string: '{"data":[{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2026-06-26T12:35:13.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2026-05-30T13:12:20.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2026-06-12T09:08:17.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":true,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2026-07-06T12:44:34.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2026-06-25T11:40:21.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dleyw374kj50","avatar":"https:\/\/www.gravatar.com\/avatar\/c44d3a63d59a4e4aaf084e2355bfa13f?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"yusuf@mailerlite.com","last_name":"Celebi","name":"Yusuf - Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2025-02-13T10:29:38.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2025-06-19T13:13:28.000000Z","role":"Admin","permissions":["read-activity","read-email","read-suppressions","manage-suppressions","read-recipient"],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2025-05-14T10:57:53.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}]}' + Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2026-04-12T07:35:41.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2026-06-25T08:21:44.000000Z","role":"Admin","permissions":[],"domains":[{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"},{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/users?page=1","last":"https:\/\/api.mailersend.com\/v1\/users?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/users?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/users","per_page":10,"to":8,"total":8}}' headers: CF-RAY: - - 966d3dd0da9055ad-BEG + - a16ed23a8e67a8bc-BEG Cache-Control: - no-cache, private Connection: @@ -38,19 +40,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:44 GMT + - Mon, 06 Jul 2026 13:05:28 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '124' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/users_delete.yaml b/tests/fixtures/cassettes/users_delete.yaml index 0cba603..e81cf3d 100644 --- a/tests/fixtures/cassettes/users_delete.yaml +++ b/tests/fixtures/cassettes/users_delete.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/users/test-user-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d3dcb99ade298-BEG + - a16ed236ea76e297-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:43 GMT + - Mon, 06 Jul 2026 13:05:28 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '33' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/users_empty_result.yaml b/tests/fixtures/cassettes/users_empty_result.yaml index 706ce90..4eb1feb 100644 --- a/tests/fixtures/cassettes/users_empty_result.yaml +++ b/tests/fixtures/cassettes/users_empty_result.yaml @@ -11,24 +11,26 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/users?limit=10 response: body: - string: '{"data":[{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2025-06-18T12:23:36.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2025-07-23T07:09:26.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2025-06-23T11:36:10.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":false,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2024-12-19T15:51:25.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + string: '{"data":[{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2026-06-26T12:35:13.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2026-05-30T13:12:20.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2026-06-12T09:08:17.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":true,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2026-07-06T12:44:34.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2026-06-25T11:40:21.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dleyw374kj50","avatar":"https:\/\/www.gravatar.com\/avatar\/c44d3a63d59a4e4aaf084e2355bfa13f?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"yusuf@mailerlite.com","last_name":"Celebi","name":"Yusuf - Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2025-02-13T10:29:38.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2025-06-19T13:13:28.000000Z","role":"Admin","permissions":["read-activity","read-email","read-suppressions","manage-suppressions","read-recipient"],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2025-05-14T10:57:53.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}]}' + Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2026-04-12T07:35:41.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2026-06-25T08:21:44.000000Z","role":"Admin","permissions":[],"domains":[{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"},{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/users?page=1","last":"https:\/\/api.mailersend.com\/v1\/users?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/users?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/users","per_page":10,"to":8,"total":8}}' headers: CF-RAY: - - 966d3dd268cbf969-BEG + - a16ed23bccb9e295-BEG Cache-Control: - no-cache, private Connection: @@ -38,19 +40,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:44 GMT + - Mon, 06 Jul 2026 13:05:29 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '108' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/users_get_single.yaml b/tests/fixtures/cassettes/users_get_single.yaml index f1865ef..2d40084 100644 --- a/tests/fixtures/cassettes/users_get_single.yaml +++ b/tests/fixtures/cassettes/users_get_single.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/users/test-user-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d3dc78d3e71a6-BEG + - a16ed234783fa8bc-BEG Cache-Control: - no-cache, private Connection: @@ -29,19 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:42 GMT + - Mon, 06 Jul 2026 13:05:27 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '38' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/users_invite.yaml b/tests/fixtures/cassettes/users_invite.yaml index a7b8a41..4ce1716 100644 --- a/tests/fixtures/cassettes/users_invite.yaml +++ b/tests/fixtures/cassettes/users_invite.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/users response: @@ -24,7 +24,7 @@ interactions: permission. #MS42224"],"permissions.0":["The selected permissions.0 is invalid."]}}' headers: CF-RAY: - - 966d3dc919930a8e-BEG + - a16ed2353df23267-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +32,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:42 GMT + - Mon, 06 Jul 2026 13:05:27 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '50' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/users_list_basic.yaml b/tests/fixtures/cassettes/users_list_basic.yaml index 78ada38..177c88d 100644 --- a/tests/fixtures/cassettes/users_list_basic.yaml +++ b/tests/fixtures/cassettes/users_list_basic.yaml @@ -11,24 +11,26 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/users?limit=10 response: body: - string: '{"data":[{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2025-06-18T12:23:36.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2025-07-23T07:09:26.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2025-06-23T11:36:10.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":false,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2024-12-19T15:51:25.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + string: '{"data":[{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2026-06-26T12:35:13.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2026-05-30T13:12:20.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2026-06-12T09:08:17.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":true,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2026-07-06T12:44:34.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2026-06-25T11:40:21.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dleyw374kj50","avatar":"https:\/\/www.gravatar.com\/avatar\/c44d3a63d59a4e4aaf084e2355bfa13f?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"yusuf@mailerlite.com","last_name":"Celebi","name":"Yusuf - Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2025-02-13T10:29:38.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2025-06-19T13:13:28.000000Z","role":"Admin","permissions":["read-activity","read-email","read-suppressions","manage-suppressions","read-recipient"],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2025-05-14T10:57:53.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}]}' + Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2026-04-12T07:35:41.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2026-06-25T08:21:44.000000Z","role":"Admin","permissions":[],"domains":[{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"},{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/users?page=1","last":"https:\/\/api.mailersend.com\/v1\/users?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/users?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/users","per_page":10,"to":8,"total":8}}' headers: CF-RAY: - - 966d3ce4bb69dfc0-BEG + - a16ed2320c9daeaa-BEG Cache-Control: - no-cache, private Connection: @@ -38,19 +40,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:06 GMT + - Mon, 06 Jul 2026 13:05:27 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '112' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/users_list_with_pagination.yaml b/tests/fixtures/cassettes/users_list_with_pagination.yaml index bf26f94..895b15f 100644 --- a/tests/fixtures/cassettes/users_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/users_list_with_pagination.yaml @@ -11,24 +11,26 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/users?limit=10 response: body: - string: '{"data":[{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2025-06-18T12:23:36.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2025-07-23T07:09:26.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2025-06-23T11:36:10.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":false,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2024-12-19T15:51:25.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + string: '{"data":[{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2026-06-26T12:35:13.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2026-05-30T13:12:20.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2026-06-12T09:08:17.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":true,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2026-07-06T12:44:34.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2026-06-25T11:40:21.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dleyw374kj50","avatar":"https:\/\/www.gravatar.com\/avatar\/c44d3a63d59a4e4aaf084e2355bfa13f?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"yusuf@mailerlite.com","last_name":"Celebi","name":"Yusuf - Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2025-02-13T10:29:38.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2025-06-19T13:13:28.000000Z","role":"Admin","permissions":["read-activity","read-email","read-suppressions","manage-suppressions","read-recipient"],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2025-05-14T10:57:53.000000Z","role":"Admin","permissions":[],"domains":[{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2025-07-29T12:20:45.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z"}],"templates":[{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}]}' + Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2026-04-12T07:35:41.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2026-06-25T08:21:44.000000Z","role":"Admin","permissions":[],"domains":[{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"},{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK + Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/users?page=1","last":"https:\/\/api.mailersend.com\/v1\/users?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/users?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/users","per_page":10,"to":8,"total":8}}' headers: CF-RAY: - - 966d3dc5ff30e294-BEG + - a16ed2332c431f09-BEG Cache-Control: - no-cache, private Connection: @@ -38,19 +40,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:42 GMT + - Mon, 06 Jul 2026 13:05:27 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '126' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/users_update.yaml b/tests/fixtures/cassettes/users_update.yaml index e5f12f7..9716cfa 100644 --- a/tests/fixtures/cassettes/users_update.yaml +++ b/tests/fixtures/cassettes/users_update.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/users/test-user-id response: @@ -24,7 +24,7 @@ interactions: permission. #MS42224"],"permissions.0":["The selected permissions.0 is invalid."]}}' headers: CF-RAY: - - 966d3dca8c73bbed-BEG + - a16ed2360e4ee28f-BEG Cache-Control: - no-cache, private Connection: @@ -32,19 +32,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:17:42 GMT + - Mon, 06 Jul 2026 13:05:28 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '54' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/webhooks_api_response_structure.yaml b/tests/fixtures/cassettes/webhooks_api_response_structure.yaml index c779c03..23beaa8 100644 --- a/tests/fixtures/cassettes/webhooks_api_response_structure.yaml +++ b/tests/fixtures/cassettes/webhooks_api_response_structure.yaml @@ -11,20 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"0r83ql3vxvgzw1jm","url":"https:\/\/example.com\/webhook","events":["activity.sent","activity.delivered"],"name":"Test - Webhook","enabled":true,"editable":true,"secret":"cRP4dECSXJxo6HmuSVNXCIx1O2eiLgin","created_at":"2025-07-29T14:20:32.000000Z","updated_at":"2025-07-29T14:20:32.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' headers: CF-RAY: - - 966d41f71c6cf969-BEG + - a16ee4758801f339-BEG Cache-Control: - no-cache, private Connection: @@ -34,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:33 GMT + - Mon, 06 Jul 2026 13:17:55 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '40' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/webhooks_builder_create_basic.yaml b/tests/fixtures/cassettes/webhooks_builder_create_basic.yaml index 4ea15a7..944e593 100644 --- a/tests/fixtures/cassettes/webhooks_builder_create_basic.yaml +++ b/tests/fixtures/cassettes/webhooks_builder_create_basic.yaml @@ -15,18 +15,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/webhooks response: body: - string: '{"data":{"id":"k68zxl26z3gj9057","url":"https:\/\/example.com\/webhook-builder","events":["activity.sent","activity.delivered"],"name":"Test - Webhook Builder","enabled":true,"editable":null,"secret":"IBy7iI56gzKQTisuuGmwsAhDsKgSFFbL","created_at":"2025-07-29T14:26:54.000000Z","updated_at":"2025-07-29T14:26:54.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z","totals":[]}}}' + string: "{\n \"message\": \"You cannot create a resource at the moment. Please + wait a while before retrying.\"\n}" headers: CF-RAY: - - 966d4b3f4c543cc0-VIE + - a16ee4789e6acf86-BEG Cache-Control: - no-cache, private Connection: @@ -34,20 +32,73 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:26:54 GMT + - Mon, 06 Jul 2026 13:17:56 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: - code: 201 - message: Created + code: 429 + message: Too Many Requests +- request: + body: '{"url": "https://example.com/webhook-builder", "name": "Test Webhook Builder", + "events": ["activity.sent", "activity.delivered"], "domain_id": "65qngkdovk8lwr12", + "enabled": true}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '179' + Content-Type: + - application/json + User-Agent: + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) + method: POST + uri: https://api.mailersend.com/v1/webhooks + response: + body: + string: '{"message":"The endpoint returned HTTP 405.","errors":{"url":["The + endpoint returned HTTP 405."]}}' + headers: + CF-RAY: + - a16ee4793bb0a8bc-BEG + Cache-Control: + - no-cache, private + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 06 Jul 2026 13:17:56 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '96' + status: + code: 422 + message: Unprocessable Entity version: 1 diff --git a/tests/fixtures/cassettes/webhooks_builder_delete_not_found.yaml b/tests/fixtures/cassettes/webhooks_builder_delete_not_found.yaml index 7cdbde2..14feeec 100644 --- a/tests/fixtures/cassettes/webhooks_builder_delete_not_found.yaml +++ b/tests/fixtures/cassettes/webhooks_builder_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/webhooks/test-webhook-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d41fd1c07f339-BEG + - a16ee47b1cea076b-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:34 GMT + - Mon, 06 Jul 2026 13:17:56 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/webhooks_builder_get_not_found.yaml b/tests/fixtures/cassettes/webhooks_builder_get_not_found.yaml index b0777ac..7d5f6b6 100644 --- a/tests/fixtures/cassettes/webhooks_builder_get_not_found.yaml +++ b/tests/fixtures/cassettes/webhooks_builder_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks/test-webhook-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d41fa8b17e295-BEG + - a16ee477daf41778-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:34 GMT + - Mon, 06 Jul 2026 13:17:55 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml b/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml index a509949..5d43275 100644 --- a/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml @@ -11,20 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"0r83ql3vxvgzw1jm","url":"https:\/\/example.com\/webhook","events":["activity.sent","activity.delivered"],"name":"Test - Webhook","enabled":true,"editable":true,"secret":"cRP4dECSXJxo6HmuSVNXCIx1O2eiLgin","created_at":"2025-07-29T14:20:32.000000Z","updated_at":"2025-07-29T14:20:32.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' headers: CF-RAY: - - 966d41f9888ee296-BEG + - a16ee4770c4df339-BEG Cache-Control: - no-cache, private Connection: @@ -34,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:34 GMT + - Mon, 06 Jul 2026 13:17:55 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '46' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/webhooks_builder_update_not_found.yaml b/tests/fixtures/cassettes/webhooks_builder_update_not_found.yaml index 442e11e..4d00c59 100644 --- a/tests/fixtures/cassettes/webhooks_builder_update_not_found.yaml +++ b/tests/fixtures/cassettes/webhooks_builder_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/webhooks/test-webhook-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d41fc3acf0db0-BEG + - a16ee47a5f43e296-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:34 GMT + - Mon, 06 Jul 2026 13:17:56 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml b/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml index 58c4c70..50fa0ba 100644 --- a/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml @@ -11,20 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"0r83ql3vxvgzw1jm","url":"https:\/\/example.com\/webhook","events":["activity.sent","activity.delivered"],"name":"Test - Webhook","enabled":true,"editable":true,"secret":"cRP4dECSXJxo6HmuSVNXCIx1O2eiLgin","created_at":"2025-07-29T14:20:32.000000Z","updated_at":"2025-07-29T14:20:32.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' headers: CF-RAY: - - 966d41fddf87bbed-BEG + - a16ee47bdae4a8bc-BEG Cache-Control: - no-cache, private Connection: @@ -34,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:35 GMT + - Mon, 06 Jul 2026 13:17:56 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 200 message: OK @@ -62,20 +63,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"0r83ql3vxvgzw1jm","url":"https:\/\/example.com\/webhook","events":["activity.sent","activity.delivered"],"name":"Test - Webhook","enabled":true,"editable":true,"secret":"cRP4dECSXJxo6HmuSVNXCIx1O2eiLgin","created_at":"2025-07-29T14:20:32.000000Z","updated_at":"2025-07-29T14:20:32.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' headers: CF-RAY: - - 966d41feeb211b8b-BEG + - a16ee47c8fafe294-BEG Cache-Control: - no-cache, private Connection: @@ -85,19 +85,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:35 GMT + - Mon, 06 Jul 2026 13:17:56 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '41' status: code: 200 message: OK @@ -113,7 +115,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks/non-existent-id response: @@ -121,7 +123,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d41ffddc6b01b-BEG + - a16ee47d4d46e295-BEG Cache-Control: - no-cache, private Connection: @@ -131,15 +133,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:35 GMT + - Mon, 06 Jul 2026 13:17:56 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 404 message: Not Found @@ -158,7 +166,57 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) + method: POST + uri: https://api.mailersend.com/v1/webhooks + response: + body: + string: "{\n \"message\": \"You cannot create a resource at the moment. Please + wait a while before retrying.\"\n}" + headers: + CF-RAY: + - a16ee47dfcc796e0-BEG + Cache-Control: + - no-cache, private + Connection: + - keep-alive + Content-Type: + - application/json + Date: + - Mon, 06 Jul 2026 13:17:56 GMT + Server: + - cloudflare + Transfer-Encoding: + - chunked + alt-svc: + - h3=":443"; ma=86400 + cf-cache-status: + - DYNAMIC + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' + status: + code: 429 + message: Too Many Requests +- request: + body: '{"url": "https://example.com/webhook", "name": "Test Webhook", "events": + ["activity.sent"], "domain_id": "65qngkdovk8lwr12"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '124' + Content-Type: + - application/json + User-Agent: + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/webhooks response: @@ -167,7 +225,7 @@ interactions: wait a while before retrying.\"\n}" headers: CF-RAY: - - 966d4200cacc076b-BEG + - a16ee47eadba1f09-BEG Cache-Control: - no-cache, private Connection: @@ -175,19 +233,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:35 GMT + - Mon, 06 Jul 2026 13:17:56 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' status: code: 429 message: Too Many Requests @@ -206,16 +266,16 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/webhooks response: body: - string: '{"message":"The url has already been taken.","errors":{"url":["The - url has already been taken."]}}' + string: '{"message":"The endpoint returned HTTP 405.","errors":{"url":["The + endpoint returned HTTP 405."]}}' headers: CF-RAY: - - 966d4201aa47bbed-BEG + - a16ee48329f696e0-BEG Cache-Control: - no-cache, private Connection: @@ -223,19 +283,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:35 GMT + - Mon, 06 Jul 2026 13:17:57 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '101' status: code: 422 message: Unprocessable Entity @@ -251,7 +313,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks/another-non-existent-id response: @@ -259,7 +321,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d42029ad4d814-BEG + - a16ee48448920db0-BEG Cache-Control: - no-cache, private Connection: @@ -269,15 +331,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:35 GMT + - Mon, 06 Jul 2026 13:17:57 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/webhooks_create_basic.yaml b/tests/fixtures/cassettes/webhooks_create_basic.yaml index 862085d..733973e 100644 --- a/tests/fixtures/cassettes/webhooks_create_basic.yaml +++ b/tests/fixtures/cassettes/webhooks_create_basic.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"url": "https://example.com/webhook", "name": "Test Webhook", "events": - ["activity.sent", "activity.delivered"], "domain_id": "65qngkdovk8lwr12", "enabled": - true}' + body: '{"url": "https://i-like-distributed-systems-undermined-by.single-points-of-failure.com/", + "name": "Test Webhook", "events": ["activity.sent", "activity.delivered"], "domain_id": + "65qngkdovk8lwr12", "enabled": true}' headers: Accept: - application/json @@ -11,22 +11,20 @@ interactions: Connection: - keep-alive Content-Length: - - '163' + - '214' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/webhooks response: body: - string: '{"data":{"id":"0r83ql3vxvgzw1jm","url":"https:\/\/example.com\/webhook","events":["activity.sent","activity.delivered"],"name":"Test - Webhook","enabled":true,"editable":null,"secret":"cRP4dECSXJxo6HmuSVNXCIx1O2eiLgin","created_at":"2025-07-29T14:20:32.000000Z","updated_at":"2025-07-29T14:20:32.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z","totals":[]}}}' + string: '{"message":"The endpoint returned HTTP 405.","errors":{"url":["The + endpoint returned HTTP 405."]}}' headers: CF-RAY: - - 966d41ed596be290-BEG + - a16ee46b9f731b8b-BEG Cache-Control: - no-cache, private Connection: @@ -34,20 +32,22 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:32 GMT + - Mon, 06 Jul 2026 13:17:54 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '178' status: - code: 201 - message: Created + code: 422 + message: Unprocessable Entity version: 1 diff --git a/tests/fixtures/cassettes/webhooks_create_invalid_domain.yaml b/tests/fixtures/cassettes/webhooks_create_invalid_domain.yaml index 14b0def..7011d9f 100644 --- a/tests/fixtures/cassettes/webhooks_create_invalid_domain.yaml +++ b/tests/fixtures/cassettes/webhooks_create_invalid_domain.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"url": "https://example.com/webhook", "name": "Test Webhook", "events": - ["activity.sent", "activity.delivered"], "domain_id": "invalid-domain-id", "enabled": - true}' + body: '{"url": "https://i-like-distributed-systems-undermined-by.single-points-of-failure.com/", + "name": "Test Webhook", "events": ["activity.sent", "activity.delivered"], "domain_id": + "invalid-domain-id", "enabled": true}' headers: Accept: - application/json @@ -11,11 +11,11 @@ interactions: Connection: - keep-alive Content-Length: - - '164' + - '215' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/webhooks response: @@ -24,7 +24,7 @@ interactions: wait a while before retrying.\"\n}" headers: CF-RAY: - - 966d41ee89240380-BEG + - a16ee46d6cef5165-BEG Cache-Control: - no-cache, private Connection: @@ -32,26 +32,28 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:32 GMT + - Mon, 06 Jul 2026 13:17:54 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '32' status: code: 429 message: Too Many Requests - request: - body: '{"url": "https://example.com/webhook", "name": "Test Webhook", "events": - ["activity.sent", "activity.delivered"], "domain_id": "invalid-domain-id", "enabled": - true}' + body: '{"url": "https://i-like-distributed-systems-undermined-by.single-points-of-failure.com/", + "name": "Test Webhook", "events": ["activity.sent", "activity.delivered"], "domain_id": + "invalid-domain-id", "enabled": true}' headers: Accept: - application/json @@ -60,11 +62,11 @@ interactions: Connection: - keep-alive Content-Length: - - '164' + - '215' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/webhooks response: @@ -73,7 +75,7 @@ interactions: wait a while before retrying.\"\n}" headers: CF-RAY: - - 966d41ef8eadf969-BEG + - a16ee46e0967e296-BEG Cache-Control: - no-cache, private Connection: @@ -81,26 +83,28 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:32 GMT + - Mon, 06 Jul 2026 13:17:54 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 429 message: Too Many Requests - request: - body: '{"url": "https://example.com/webhook", "name": "Test Webhook", "events": - ["activity.sent", "activity.delivered"], "domain_id": "invalid-domain-id", "enabled": - true}' + body: '{"url": "https://i-like-distributed-systems-undermined-by.single-points-of-failure.com/", + "name": "Test Webhook", "events": ["activity.sent", "activity.delivered"], "domain_id": + "invalid-domain-id", "enabled": true}' headers: Accept: - application/json @@ -109,21 +113,21 @@ interactions: Connection: - keep-alive Content-Length: - - '164' + - '215' Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: POST uri: https://api.mailersend.com/v1/webhooks response: body: - string: '{"message":"The url has already been taken. (and 1 more error)","errors":{"url":["The - url has already been taken."],"domain_id":["The domain id field is required. + string: '{"message":"The endpoint returned HTTP 405. (and 1 more error)","errors":{"url":["The + endpoint returned HTTP 405."],"domain_id":["The domain id field is required. #MS42209"]}}' headers: CF-RAY: - - 966d41f4396ee294-BEG + - a16ee4728a60b01d-BEG Cache-Control: - no-cache, private Connection: @@ -131,19 +135,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:33 GMT + - Mon, 06 Jul 2026 13:17:55 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '164' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/webhooks_delete_not_found.yaml b/tests/fixtures/cassettes/webhooks_delete_not_found.yaml index 9a0f7f4..4d899df 100644 --- a/tests/fixtures/cassettes/webhooks_delete_not_found.yaml +++ b/tests/fixtures/cassettes/webhooks_delete_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: DELETE uri: https://api.mailersend.com/v1/webhooks/test-webhook-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d41f64f86c687-BEG + - a16ee474d9a08e88-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:33 GMT + - Mon, 06 Jul 2026 13:17:55 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/webhooks_empty_result.yaml b/tests/fixtures/cassettes/webhooks_empty_result.yaml index d7d79ad..1bc5922 100644 --- a/tests/fixtures/cassettes/webhooks_empty_result.yaml +++ b/tests/fixtures/cassettes/webhooks_empty_result.yaml @@ -11,20 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"0r83ql3vxvgzw1jm","url":"https:\/\/example.com\/webhook","events":["activity.sent","activity.delivered"],"name":"Test - Webhook","enabled":true,"editable":true,"secret":"cRP4dECSXJxo6HmuSVNXCIx1O2eiLgin","created_at":"2025-07-29T14:20:32.000000Z","updated_at":"2025-07-29T14:20:32.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2025-07-29T12:20:49.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' headers: CF-RAY: - - 966d41f89e2d870d-BEG + - a16ee4763bb9126d-BEG Cache-Control: - no-cache, private Connection: @@ -34,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:34 GMT + - Mon, 06 Jul 2026 13:17:55 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '39' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/webhooks_get_not_found.yaml b/tests/fixtures/cassettes/webhooks_get_not_found.yaml index c945fac..3a18e20 100644 --- a/tests/fixtures/cassettes/webhooks_get_not_found.yaml +++ b/tests/fixtures/cassettes/webhooks_get_not_found.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks/test-webhook-id response: @@ -19,7 +19,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d41ec0cb38e88-BEG + - a16ee46aebeebbed-BEG Cache-Control: - no-cache, private Connection: @@ -29,15 +29,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:32 GMT + - Mon, 06 Jul 2026 13:17:53 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '34' status: code: 404 message: Not Found diff --git a/tests/fixtures/cassettes/webhooks_list_basic.yaml b/tests/fixtures/cassettes/webhooks_list_basic.yaml index e469b4d..e231918 100644 --- a/tests/fixtures/cassettes/webhooks_list_basic.yaml +++ b/tests/fixtures/cassettes/webhooks_list_basic.yaml @@ -11,17 +11,19 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","active":true},{"url":null,"label":"Next - »","active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":null,"total":0}}' + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom + unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next + »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' headers: CF-RAY: - - 966d41e8fd6fe295-BEG + - a16ee4698cb0b30f-BEG Cache-Control: - no-cache, private Connection: @@ -31,19 +33,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:31 GMT + - Mon, 06 Jul 2026 13:17:53 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '40' status: code: 200 message: OK diff --git a/tests/fixtures/cassettes/webhooks_list_invalid_domain.yaml b/tests/fixtures/cassettes/webhooks_list_invalid_domain.yaml index 19e629f..65978b6 100644 --- a/tests/fixtures/cassettes/webhooks_list_invalid_domain.yaml +++ b/tests/fixtures/cassettes/webhooks_list_invalid_domain.yaml @@ -11,7 +11,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: GET uri: https://api.mailersend.com/v1/webhooks?domain_id=invalid-domain-id response: @@ -20,7 +20,7 @@ interactions: domain id field is required. #MS42209"]}}' headers: CF-RAY: - - 966d4b3e0b65a638-VIE + - a16ee46a3ef6b01e-BEG Cache-Control: - no-cache, private Connection: @@ -28,19 +28,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:26:53 GMT + - Mon, 06 Jul 2026 13:17:53 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains x-apiquota-remaining: - '-1' x-apiquota-reset: - - '2025-07-30T00:00:00Z' + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '36' status: code: 422 message: Unprocessable Entity diff --git a/tests/fixtures/cassettes/webhooks_update_not_found.yaml b/tests/fixtures/cassettes/webhooks_update_not_found.yaml index 2a5efc7..3a0faf5 100644 --- a/tests/fixtures/cassettes/webhooks_update_not_found.yaml +++ b/tests/fixtures/cassettes/webhooks_update_not_found.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) + - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) method: PUT uri: https://api.mailersend.com/v1/webhooks/test-webhook-id response: @@ -21,7 +21,7 @@ interactions: string: "{\n \"message\": \"Resource not found.\"\n}" headers: CF-RAY: - - 966d41f52b339857-BEG + - a16ee4742f848e88-BEG Cache-Control: - no-cache, private Connection: @@ -31,15 +31,21 @@ interactions: Content-Type: - application/json Date: - - Tue, 29 Jul 2025 14:20:33 GMT + - Mon, 06 Jul 2026 13:17:55 GMT Server: - cloudflare Transfer-Encoding: - chunked + alt-svc: + - h3=":443"; ma=86400 cf-cache-status: - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains + x-apiquota-remaining: + - '-1' + x-apiquota-reset: + - '2026-07-07T00:00:00Z' + x-envoy-upstream-service-time: + - '37' status: code: 404 message: Not Found diff --git a/tests/integration/test_analytics.py b/tests/integration/test_analytics.py index cb207f5..d2c8c80 100644 --- a/tests/integration/test_analytics.py +++ b/tests/integration/test_analytics.py @@ -12,7 +12,7 @@ def base_analytics_request(): # Use fixed recent timestamps within the 6-month analytics retention period # Using June 1, 2025 as base date for consistency (within 6 months) - base_date = datetime(2025, 6, 1, tzinfo=timezone.utc) + base_date = datetime(2026, 6, 1, tzinfo=timezone.utc) end_date = int(base_date.timestamp()) start_date = int((base_date - timedelta(days=30)).timestamp()) return AnalyticsRequest( @@ -268,7 +268,7 @@ def test_get_opens_by_reading_environment_with_recipients(self): def test_date_builder_helpers(self): """Test Analytics builder date helper methods""" # Test last 7 days using fixed date - base_date = datetime(2025, 6, 1, tzinfo=timezone.utc) + base_date = datetime(2026, 6, 1, tzinfo=timezone.utc) # Create request with 7 days range end_date = int(base_date.timestamp()) @@ -295,19 +295,6 @@ def test_date_builder_helpers(self): response = self.email_client.analytics.get_activity_by_date(request) assert response.status_code == 200 - @vcr.use_cassette("tests/fixtures/cassettes/analytics_error_no_events.yaml") - def test_activity_by_date_error_no_events(self): - """Test that activity by date requires events""" - from mailersend.exceptions import BadRequestError - - request = self.analytics_request_factory( - self.base_analytics_request, - event=None, # No events specified - should cause error - ) - - with pytest.raises(BadRequestError, match="The event must be an array"): - self.email_client.analytics.get_activity_by_date(request) - @vcr.use_cassette("tests/fixtures/cassettes/analytics_comprehensive_test.yaml") def test_comprehensive_analytics_workflow(self): """Test a comprehensive analytics workflow using all endpoints""" diff --git a/tests/integration/test_inbound.py b/tests/integration/test_inbound.py index 988fdc1..cb54747 100644 --- a/tests/integration/test_inbound.py +++ b/tests/integration/test_inbound.py @@ -109,12 +109,12 @@ def test_list_inbound_routes_basic(self, email_client, basic_inbound_list_reques first_route = inbound_routes[0] assert "id" in first_route assert "name" in first_route - assert "domain_id" in first_route - assert "domain_enabled" in first_route - assert "created_at" in first_route - assert "catch_filter" in first_route - assert "match_filter" in first_route + assert "address" in first_route + assert "domain" in first_route + assert "enabled" in first_route + assert "dns_checked_at" in first_route assert "forwards" in first_route + assert "filters" in first_route @vcr.use_cassette("inbound_list_with_pagination.yaml") def test_list_inbound_routes_with_pagination(self, email_client): diff --git a/tests/integration/test_recipients.py b/tests/integration/test_recipients.py index 72ed25f..57fc553 100644 --- a/tests/integration/test_recipients.py +++ b/tests/integration/test_recipients.py @@ -144,7 +144,6 @@ def test_get_blocklist_basic(self, email_client, suppression_list_request): if blocklist: first_blocked = blocklist[0] assert "id" in first_blocked - assert "email" in first_blocked assert "created_at" in first_blocked @vcr.use_cassette("recipients_hard_bounces_basic.yaml") @@ -211,7 +210,6 @@ def test_get_unsubscribes_basic(self, email_client, suppression_list_request): if unsubscribes: first_unsubscribe = unsubscribes[0] assert "id" in first_unsubscribe - assert "email" in first_unsubscribe assert "created_at" in first_unsubscribe @vcr.use_cassette("recipients_add_to_blocklist.yaml") diff --git a/tests/integration/test_smtp_users.py b/tests/integration/test_smtp_users.py index 933cc5b..929e249 100644 --- a/tests/integration/test_smtp_users.py +++ b/tests/integration/test_smtp_users.py @@ -67,7 +67,6 @@ def test_list_smtp_users_basic(self, email_client, basic_smtp_users_list_request assert "id" in first_user assert "name" in first_user assert "enabled" in first_user - assert "created_at" in first_user @vcr.use_cassette("smtp_users_list_with_limit.yaml") def test_list_smtp_users_with_limit(self, email_client, test_domain_id): diff --git a/tests/integration/test_webhooks.py b/tests/integration/test_webhooks.py index 6f0bdd0..e2dfbb4 100644 --- a/tests/integration/test_webhooks.py +++ b/tests/integration/test_webhooks.py @@ -38,7 +38,7 @@ def webhook_get_request(): def sample_webhook_data(test_domain_id): """Sample webhook data for testing""" return { - "url": "https://example.com/webhook", + "url": "https://i-like-distributed-systems-undermined-by.single-points-of-failure.com/", "name": "Test Webhook", "events": ["activity.sent", "activity.delivered"], "domain_id": test_domain_id, diff --git a/tests/unit/test_activity_resource.py b/tests/unit/test_activity_resource.py index 85c0002..c682cc6 100644 --- a/tests/unit/test_activity_resource.py +++ b/tests/unit/test_activity_resource.py @@ -1,4 +1,5 @@ """Tests for Activity resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -13,7 +14,6 @@ from mailersend.models.base import APIResponse - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -27,16 +27,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Activity(self.mock_client) diff --git a/tests/unit/test_analytics_resource.py b/tests/unit/test_analytics_resource.py index 64f9e5a..524e01d 100644 --- a/tests/unit/test_analytics_resource.py +++ b/tests/unit/test_analytics_resource.py @@ -1,4 +1,5 @@ """Tests for Analytics resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -9,7 +10,6 @@ from mailersend.models.base import APIResponse - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -24,6 +24,7 @@ def _make_request(): event=["sent", "delivered"], ) + class TestAnalytics: @pytest.fixture(autouse=True, params=["sync", "async"]) def setup(self, request): @@ -31,16 +32,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Analytics(self.mock_client) @@ -91,7 +96,9 @@ async def test_get_opens_by_user_agent_calls_correct_endpoint(self): assert call.kwargs["path"] == "analytics/ua-name" async def test_get_opens_by_reading_environment_returns_api_response(self): - result = await resolve(self.resource.get_opens_by_reading_environment(_make_request())) + result = await resolve( + self.resource.get_opens_by_reading_environment(_make_request()) + ) assert isinstance(result, APIResponse) async def test_get_opens_by_reading_environment_calls_correct_endpoint(self): diff --git a/tests/unit/test_async_client.py b/tests/unit/test_async_client.py index e5381e2..0e61b90 100644 --- a/tests/unit/test_async_client.py +++ b/tests/unit/test_async_client.py @@ -23,22 +23,25 @@ def test_init_with_explicit_api_key(self): assert client.api_key == "test-key" def test_init_reads_env_var(self): - with patch.dict(os.environ, {"MAILERSEND_API_KEY": "env-key"}), patch( - "mailersend.async_client.httpx.AsyncClient" + with ( + patch.dict(os.environ, {"MAILERSEND_API_KEY": "env-key"}), + patch("mailersend.async_client.httpx.AsyncClient"), ): client = AsyncMailerSendClient() assert client.api_key == "env-key" def test_init_explicit_key_overrides_env(self): - with patch.dict(os.environ, {"MAILERSEND_API_KEY": "env-key"}), patch( - "mailersend.async_client.httpx.AsyncClient" + with ( + patch.dict(os.environ, {"MAILERSEND_API_KEY": "env-key"}), + patch("mailersend.async_client.httpx.AsyncClient"), ): client = AsyncMailerSendClient(api_key="param-key") assert client.api_key == "param-key" def test_init_raises_without_api_key(self): - with patch.dict(os.environ, {}, clear=True), patch( - "mailersend.async_client.httpx.AsyncClient" + with ( + patch.dict(os.environ, {}, clear=True), + patch("mailersend.async_client.httpx.AsyncClient"), ): with pytest.raises(ValueError, match="API key is required"): AsyncMailerSendClient() @@ -61,18 +64,37 @@ def test_init_exposes_all_resources(self): with patch("mailersend.async_client.httpx.AsyncClient"): client = AsyncMailerSendClient(api_key="test-key") for attr in [ - "emails", "activities", "analytics", "domains", "identities", - "inbound", "templates", "tokens", "webhooks", "email_verification", - "users", "messages", "recipients", "schedules", "sms_messages", - "smtp_users", "sms_sending", "sms_numbers", "sms_activity", - "sms_inbounds", "sms_recipients", "sms_webhooks", "api_quota", + "emails", + "activities", + "analytics", + "domains", + "identities", + "inbound", + "templates", + "tokens", + "webhooks", + "email_verification", + "users", + "messages", + "recipients", + "schedules", + "sms_messages", + "smtp_users", + "sms_sending", + "sms_numbers", + "sms_activity", + "sms_inbounds", + "sms_recipients", + "sms_webhooks", + "api_quota", "dmarc_monitoring", ]: assert hasattr(client, attr), f"missing resource: {attr}" def test_init_empty_env_var_raises(self): - with patch.dict(os.environ, {"MAILERSEND_API_KEY": ""}), patch( - "mailersend.async_client.httpx.AsyncClient" + with ( + patch.dict(os.environ, {"MAILERSEND_API_KEY": ""}), + patch("mailersend.async_client.httpx.AsyncClient"), ): with pytest.raises(ValueError, match="API key is required"): AsyncMailerSendClient() @@ -162,8 +184,9 @@ async def test_retries_on_500_then_succeeds(self): error_response = self._make_mock_response(500, {"message": "Server error"}) ok_response = self._make_mock_response(200, {"data": "ok"}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch("mailersend.async_client.asyncio.sleep", new_callable=AsyncMock), ): client = AsyncMailerSendClient(api_key="test-key", max_retries=2) client._client = AsyncMock() @@ -178,8 +201,9 @@ async def test_retries_on_500_then_succeeds(self): async def test_exhausting_retries_raises_server_error(self): error_response = self._make_mock_response(500, {"message": "Server error"}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch("mailersend.async_client.asyncio.sleep", new_callable=AsyncMock), ): client = AsyncMailerSendClient(api_key="test-key", max_retries=2) client._client = AsyncMock() @@ -194,9 +218,12 @@ async def test_retry_uses_backoff_delay(self): error_response = self._make_mock_response(500, {"message": "Server error"}) ok_response = self._make_mock_response(200, {}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock - ) as mock_sleep: + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ) as mock_sleep, + ): client = AsyncMailerSendClient(api_key="test-key", max_retries=2) client._client = AsyncMock() client._client.request = AsyncMock( @@ -220,9 +247,12 @@ async def test_429_retry_uses_retry_after_header(self): rate_limit_response.headers = {"retry-after": "30", "x-apiquota-remaining": "0"} ok_response = self._make_mock_response(200, {}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock - ) as mock_sleep: + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ) as mock_sleep, + ): client = AsyncMailerSendClient(api_key="test-key", max_retries=1) client._client = AsyncMock() client._client.request = AsyncMock( @@ -240,9 +270,12 @@ async def test_429_retry_falls_back_to_backoff_without_retry_after(self): rate_limit_response.headers = {} ok_response = self._make_mock_response(200, {}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock - ) as mock_sleep: + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ) as mock_sleep, + ): client = AsyncMailerSendClient(api_key="test-key", max_retries=1) client._client = AsyncMock() client._client.request = AsyncMock( @@ -267,8 +300,9 @@ async def test_raises_mailer_send_error_on_unexpected_status(self): async def test_retries_on_network_error_then_succeeds(self): ok_response = self._make_mock_response(200, {"data": "ok"}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch("mailersend.async_client.asyncio.sleep", new_callable=AsyncMock), ): client = AsyncMailerSendClient(api_key="test-key", max_retries=2) client._client = AsyncMock() @@ -281,8 +315,9 @@ async def test_retries_on_network_error_then_succeeds(self): assert client._client.request.call_count == 2 async def test_exhausting_retries_on_network_error_raises(self): - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch("mailersend.async_client.asyncio.sleep", new_callable=AsyncMock), ): client = AsyncMailerSendClient(api_key="test-key", max_retries=2) client._client = AsyncMock() @@ -295,31 +330,38 @@ async def test_exhausting_retries_on_network_error_raises(self): assert client._client.request.call_count == 3 - async def test_retries_on_502_then_succeeds(self): error_response = self._make_mock_response(502, {"message": "Bad Gateway"}) ok_response = self._make_mock_response(200, {"data": "ok"}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch("mailersend.async_client.asyncio.sleep", new_callable=AsyncMock), ): client = AsyncMailerSendClient(api_key="test-key", max_retries=1) client._client = AsyncMock() - client._client.request = AsyncMock(side_effect=[error_response, ok_response]) + client._client.request = AsyncMock( + side_effect=[error_response, ok_response] + ) result = await client.request("GET", "some-endpoint") assert result.status_code == 200 async def test_retries_on_503_then_succeeds(self): - error_response = self._make_mock_response(503, {"message": "Service Unavailable"}) + error_response = self._make_mock_response( + 503, {"message": "Service Unavailable"} + ) ok_response = self._make_mock_response(200, {}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch("mailersend.async_client.asyncio.sleep", new_callable=AsyncMock), ): client = AsyncMailerSendClient(api_key="test-key", max_retries=1) client._client = AsyncMock() - client._client.request = AsyncMock(side_effect=[error_response, ok_response]) + client._client.request = AsyncMock( + side_effect=[error_response, ok_response] + ) result = await client.request("GET", "some-endpoint") assert result.status_code == 200 @@ -328,28 +370,38 @@ async def test_retries_on_504_then_succeeds(self): error_response = self._make_mock_response(504, {"message": "Gateway Timeout"}) ok_response = self._make_mock_response(200, {}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch("mailersend.async_client.asyncio.sleep", new_callable=AsyncMock), ): client = AsyncMailerSendClient(api_key="test-key", max_retries=1) client._client = AsyncMock() - client._client.request = AsyncMock(side_effect=[error_response, ok_response]) + client._client.request = AsyncMock( + side_effect=[error_response, ok_response] + ) result = await client.request("GET", "some-endpoint") assert result.status_code == 200 async def test_429_retry_after_date_string_falls_back_to_backoff(self): """RFC 7231 allows Retry-After to be an HTTP-date; float() would crash without guard.""" - rate_limit_response = self._make_mock_response(429, {"message": "Too many requests"}) + rate_limit_response = self._make_mock_response( + 429, {"message": "Too many requests"} + ) rate_limit_response.headers = {"retry-after": "Wed, 21 Oct 2015 07:28:00 GMT"} ok_response = self._make_mock_response(200, {}) - with patch("mailersend.async_client.httpx.AsyncClient"), patch( - "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock - ) as mock_sleep: + with ( + patch("mailersend.async_client.httpx.AsyncClient"), + patch( + "mailersend.async_client.asyncio.sleep", new_callable=AsyncMock + ) as mock_sleep, + ): client = AsyncMailerSendClient(api_key="test-key", max_retries=1) client._client = AsyncMock() - client._client.request = AsyncMock(side_effect=[rate_limit_response, ok_response]) + client._client.request = AsyncMock( + side_effect=[rate_limit_response, ok_response] + ) await client.request("GET", "some-endpoint") mock_sleep.assert_called_once_with(pytest.approx(0.3)) @@ -358,7 +410,10 @@ async def test_error_message_with_errors_dict(self): """_get_error_message formats field-level errors from the errors dict.""" mock_response = self._make_mock_response( 422, - {"message": "Validation failed", "errors": {"email": ["is required", "is invalid"]}}, + { + "message": "Validation failed", + "errors": {"email": ["is required", "is invalid"]}, + }, ) with patch("mailersend.async_client.httpx.AsyncClient"): @@ -390,6 +445,7 @@ async def test_error_message_falls_back_to_text_on_non_json(self): class TestAsyncMailerSendClientDebug: def test_enable_debug_sets_flag_and_log_level(self): import logging + with patch("mailersend.async_client.httpx.AsyncClient"): client = AsyncMailerSendClient(api_key="test-key", debug=False) assert client.debug is False @@ -399,6 +455,7 @@ def test_enable_debug_sets_flag_and_log_level(self): def test_disable_debug_clears_flag_and_log_level(self): import logging + with patch("mailersend.async_client.httpx.AsyncClient"): client = AsyncMailerSendClient(api_key="test-key", debug=True) client.disable_debug() diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py index 412049b..5810f64 100644 --- a/tests/unit/test_client.py +++ b/tests/unit/test_client.py @@ -23,8 +23,6 @@ class TestMailerSendClientInitialization: def test_client_initialization_with_explicit_api_key(self): """Test that client initializes correctly with explicit API key.""" with ( - patch("mailersend.client.get_logger"), - patch("mailersend.client.RequestLogger"), patch("mailersend.client.requests.Session"), ): client = MailerSendClient(api_key="test-api-key") @@ -34,8 +32,6 @@ def test_client_initialization_with_env_var(self): """Test that client reads API key from environment variable.""" with ( patch.dict(os.environ, {"MAILERSEND_API_KEY": "env-api-key"}), - patch("mailersend.client.get_logger"), - patch("mailersend.client.RequestLogger"), patch("mailersend.client.requests.Session"), ): client = MailerSendClient() @@ -45,8 +41,6 @@ def test_client_initialization_parameter_overrides_env(self): """Test that explicit API key parameter overrides environment variable.""" with ( patch.dict(os.environ, {"MAILERSEND_API_KEY": "env-api-key"}), - patch("mailersend.client.get_logger"), - patch("mailersend.client.RequestLogger"), patch("mailersend.client.requests.Session"), ): client = MailerSendClient(api_key="param-api-key") @@ -56,8 +50,6 @@ def test_client_initialization_fails_without_api_key(self): """Test that client initialization fails when no API key is provided.""" with ( patch.dict(os.environ, {}, clear=True), - patch("mailersend.client.get_logger"), - patch("mailersend.client.RequestLogger"), patch("mailersend.client.requests.Session"), ): with pytest.raises(ValueError) as exc_info: @@ -69,8 +61,6 @@ def test_client_initialization_fails_with_none_api_key_and_no_env(self): """Test that client initialization fails with None API key and no env var.""" with ( patch.dict(os.environ, {}, clear=True), - patch("mailersend.client.get_logger"), - patch("mailersend.client.RequestLogger"), patch("mailersend.client.requests.Session"), ): with pytest.raises(ValueError) as exc_info: @@ -82,8 +72,6 @@ def test_client_initialization_with_empty_env_var(self): """Test that client handles empty environment variable correctly.""" with ( patch.dict(os.environ, {"MAILERSEND_API_KEY": ""}), - patch("mailersend.client.get_logger"), - patch("mailersend.client.RequestLogger"), patch("mailersend.client.requests.Session"), ): with pytest.raises(ValueError) as exc_info: @@ -94,8 +82,6 @@ def test_client_initialization_with_empty_env_var(self): def test_client_initialization_sets_other_properties(self): """Test that client initializes other properties correctly.""" with ( - patch("mailersend.client.get_logger"), - patch("mailersend.client.RequestLogger"), patch("mailersend.client.requests.Session"), ): client = MailerSendClient( @@ -113,37 +99,63 @@ def test_client_initialization_sets_other_properties(self): assert client.debug is True def test_base_url_gets_trailing_slash_normalized(self): - with patch("mailersend.base_client.get_logger"), patch( - "mailersend.base_client.RequestLogger" - ), patch("mailersend.client.requests.Session"): - client = MailerSendClient(api_key="k", base_url="https://api.example.com/v1") + with ( + patch("mailersend.base_client.RequestLogger"), + patch("mailersend.client.requests.Session"), + ): + client = MailerSendClient( + api_key="k", base_url="https://api.example.com/v1" + ) assert client.base_url == "https://api.example.com/v1/" def test_base_url_preserves_existing_trailing_slash(self): - with patch("mailersend.base_client.get_logger"), patch( - "mailersend.base_client.RequestLogger" - ), patch("mailersend.client.requests.Session"): - client = MailerSendClient(api_key="k", base_url="https://api.example.com/v1/") + with ( + patch("mailersend.base_client.RequestLogger"), + patch("mailersend.client.requests.Session"), + ): + client = MailerSendClient( + api_key="k", base_url="https://api.example.com/v1/" + ) assert client.base_url == "https://api.example.com/v1/" def test_is_base_client_subclass(self): - with patch("mailersend.base_client.get_logger"), patch( - "mailersend.base_client.RequestLogger" - ), patch("mailersend.client.requests.Session"): + with ( + patch("mailersend.base_client.RequestLogger"), + patch("mailersend.client.requests.Session"), + ): client = MailerSendClient(api_key="test-key") assert isinstance(client, _BaseMailerSendClient) def test_exposes_all_resources(self): - with patch("mailersend.base_client.get_logger"), patch( - "mailersend.base_client.RequestLogger" - ), patch("mailersend.client.requests.Session"): + with ( + patch("mailersend.base_client.RequestLogger"), + patch("mailersend.client.requests.Session"), + ): client = MailerSendClient(api_key="test-key") for attr in [ - "emails", "activities", "analytics", "domains", "identities", - "inbound", "templates", "tokens", "webhooks", "email_verification", - "users", "messages", "recipients", "schedules", "sms_messages", - "smtp_users", "sms_sending", "sms_numbers", "sms_activity", - "sms_inbounds", "sms_recipients", "sms_webhooks", "api_quota", + "emails", + "activities", + "analytics", + "domains", + "identities", + "inbound", + "templates", + "tokens", + "webhooks", + "email_verification", + "users", + "messages", + "recipients", + "schedules", + "sms_messages", + "smtp_users", + "sms_sending", + "sms_numbers", + "sms_activity", + "sms_inbounds", + "sms_recipients", + "sms_webhooks", + "api_quota", "dmarc_monitoring", ]: assert hasattr(client, attr), f"missing resource: {attr}" @@ -151,9 +163,10 @@ def test_exposes_all_resources(self): class TestMailerSendClientRequest: def _make_client(self): - with patch("mailersend.base_client.get_logger"), patch( - "mailersend.base_client.RequestLogger" - ), patch("mailersend.client.requests.Session"): + with ( + patch("mailersend.base_client.RequestLogger"), + patch("mailersend.client.requests.Session"), + ): client = MailerSendClient(api_key="test-key", max_retries=0) client.session = MagicMock() client.request_logger = MagicMock() @@ -170,13 +183,17 @@ def _make_response(self, status_code, json_data=None, headers=None): def test_raises_authentication_error_on_401(self): client = self._make_client() - client.session.request.return_value = self._make_response(401, {"message": "Unauthorized"}) + client.session.request.return_value = self._make_response( + 401, {"message": "Unauthorized"} + ) with pytest.raises(AuthenticationError): client.request("GET", "some-endpoint") def test_raises_not_found_on_404(self): client = self._make_client() - client.session.request.return_value = self._make_response(404, {"message": "Not found"}) + client.session.request.return_value = self._make_response( + 404, {"message": "Not found"} + ) with pytest.raises(ResourceNotFoundError): client.request("GET", "some-endpoint") @@ -190,19 +207,25 @@ def test_raises_rate_limit_on_429(self): def test_raises_bad_request_on_400(self): client = self._make_client() - client.session.request.return_value = self._make_response(400, {"message": "Bad request"}) + client.session.request.return_value = self._make_response( + 400, {"message": "Bad request"} + ) with pytest.raises(BadRequestError): client.request("GET", "some-endpoint") def test_raises_server_error_on_500(self): client = self._make_client() - client.session.request.return_value = self._make_response(500, {"message": "Server error"}) + client.session.request.return_value = self._make_response( + 500, {"message": "Server error"} + ) with pytest.raises(ServerError): client.request("GET", "some-endpoint") def test_raises_mailer_send_error_on_unexpected_status(self): client = self._make_client() - client.session.request.return_value = self._make_response(418, {"message": "Teapot"}) + client.session.request.return_value = self._make_response( + 418, {"message": "Teapot"} + ) with pytest.raises(MailerSendError): client.request("GET", "some-endpoint") @@ -214,6 +237,7 @@ def test_successful_request_returns_response(self): def test_network_error_raises_mailer_send_error(self): import requests as req_lib + client = self._make_client() client.session.request.side_effect = req_lib.RequestException("timeout") with pytest.raises(MailerSendError, match="Request failed"): @@ -257,9 +281,11 @@ def test_get_debug_info_contains_session_adapters(self): class TestMailerSendClientContextManager: def test_context_manager_closes_session(self): - with patch("mailersend.base_client.get_logger"), patch( - "mailersend.base_client.RequestLogger" - ), patch("mailersend.client.requests.Session"): + with ( + patch("mailersend.base_client.get_logger"), + patch("mailersend.base_client.RequestLogger"), + patch("mailersend.client.requests.Session"), + ): client = MailerSendClient(api_key="test-key") client.session = MagicMock() diff --git a/tests/unit/test_dmarc_monitoring_resource.py b/tests/unit/test_dmarc_monitoring_resource.py index b2cabce..7e63d46 100644 --- a/tests/unit/test_dmarc_monitoring_resource.py +++ b/tests/unit/test_dmarc_monitoring_resource.py @@ -1,4 +1,5 @@ """Tests for DmarcMonitoring resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -20,7 +21,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -34,16 +34,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = DmarcMonitoring(self.mock_client) @@ -100,8 +104,10 @@ async def test_delete_monitor_returns_api_response(self): assert isinstance(result, APIResponse) async def test_delete_monitor_calls_correct_endpoint(self): - await resolve(self.resource.delete_monitor( - DmarcMonitoringDeleteRequest(monitor_id="mon123")) + await resolve( + self.resource.delete_monitor( + DmarcMonitoringDeleteRequest(monitor_id="mon123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" diff --git a/tests/unit/test_domains_resource.py b/tests/unit/test_domains_resource.py index dffb457..da8250b 100644 --- a/tests/unit/test_domains_resource.py +++ b/tests/unit/test_domains_resource.py @@ -1,4 +1,5 @@ """Tests for Domains resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -20,7 +21,6 @@ from mailersend.models.base import APIResponse - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -34,16 +34,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Domains(self.mock_client) @@ -69,7 +73,9 @@ async def test_list_domains_with_custom_params(self): assert call.kwargs["params"]["limit"] == 50 async def test_get_domain_returns_api_response(self): - result = await resolve(self.resource.get_domain(DomainGetRequest(domain_id="dom123"))) + result = await resolve( + self.resource.get_domain(DomainGetRequest(domain_id="dom123")) + ) assert isinstance(result, APIResponse) async def test_get_domain_calls_correct_endpoint(self): @@ -79,26 +85,30 @@ async def test_get_domain_calls_correct_endpoint(self): assert call.kwargs["path"] == "domains/dom123" async def test_create_domain_returns_api_response(self): - result = await resolve(self.resource.create_domain( - DomainCreateRequest(name="example.com")) + result = await resolve( + self.resource.create_domain(DomainCreateRequest(name="example.com")) ) assert isinstance(result, APIResponse) async def test_create_domain_calls_correct_endpoint(self): - await resolve(self.resource.create_domain(DomainCreateRequest(name="example.com"))) + await resolve( + self.resource.create_domain(DomainCreateRequest(name="example.com")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "POST" assert call.kwargs["path"] == "domains" assert call.kwargs["body"]["name"] == "example.com" async def test_delete_domain_returns_api_response(self): - result = await resolve(self.resource.delete_domain( - DomainDeleteRequest(domain_id="dom123")) + result = await resolve( + self.resource.delete_domain(DomainDeleteRequest(domain_id="dom123")) ) assert isinstance(result, APIResponse) async def test_delete_domain_calls_correct_endpoint(self): - await resolve(self.resource.delete_domain(DomainDeleteRequest(domain_id="dom123"))) + await resolve( + self.resource.delete_domain(DomainDeleteRequest(domain_id="dom123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "domains/dom123" @@ -135,28 +145,36 @@ async def test_update_domain_settings_excludes_domain_id_from_body(self): assert call.kwargs["body"]["track_opens"] is True async def test_get_domain_dns_records_returns_api_response(self): - result = await resolve(self.resource.get_domain_dns_records( - DomainDnsRecordsRequest(domain_id="dom123")) + result = await resolve( + self.resource.get_domain_dns_records( + DomainDnsRecordsRequest(domain_id="dom123") + ) ) assert isinstance(result, APIResponse) async def test_get_domain_dns_records_calls_correct_endpoint(self): - await resolve(self.resource.get_domain_dns_records( - DomainDnsRecordsRequest(domain_id="dom123")) + await resolve( + self.resource.get_domain_dns_records( + DomainDnsRecordsRequest(domain_id="dom123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" assert call.kwargs["path"] == "domains/dom123/dns-records" async def test_get_domain_verification_status_returns_api_response(self): - result = await resolve(self.resource.get_domain_verification_status( - DomainVerificationRequest(domain_id="dom123")) + result = await resolve( + self.resource.get_domain_verification_status( + DomainVerificationRequest(domain_id="dom123") + ) ) assert isinstance(result, APIResponse) async def test_get_domain_verification_status_calls_correct_endpoint(self): - await resolve(self.resource.get_domain_verification_status( - DomainVerificationRequest(domain_id="dom123")) + await resolve( + self.resource.get_domain_verification_status( + DomainVerificationRequest(domain_id="dom123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" diff --git a/tests/unit/test_email_resource.py b/tests/unit/test_email_resource.py index 849072e..eeb9379 100644 --- a/tests/unit/test_email_resource.py +++ b/tests/unit/test_email_resource.py @@ -1,4 +1,5 @@ """Tests for Email resource.""" + import inspect import pytest @@ -9,7 +10,6 @@ from mailersend.models.email import EmailRequest, EmailContact - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -33,6 +33,7 @@ def _make_email_request(): text="Test body", ) + class TestEmail: @pytest.fixture(autouse=True, params=["sync", "async"]) def setup(self, request): @@ -40,16 +41,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Email(self.mock_client) diff --git a/tests/unit/test_email_verification_resource.py b/tests/unit/test_email_verification_resource.py index 3038f33..2a95565 100644 --- a/tests/unit/test_email_verification_resource.py +++ b/tests/unit/test_email_verification_resource.py @@ -1,4 +1,5 @@ """Tests for EmailVerification resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -20,7 +21,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -34,56 +34,70 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = EmailVerification(self.mock_client) async def test_verify_email_returns_api_response(self): - result = await resolve(self.resource.verify_email( - EmailVerifyRequest(email="test@example.com")) + result = await resolve( + self.resource.verify_email(EmailVerifyRequest(email="test@example.com")) ) assert isinstance(result, APIResponse) async def test_verify_email_calls_correct_endpoint(self): - await resolve(self.resource.verify_email(EmailVerifyRequest(email="test@example.com"))) + await resolve( + self.resource.verify_email(EmailVerifyRequest(email="test@example.com")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "POST" assert call.kwargs["path"] == "email-verification/verify" assert call.kwargs["body"]["email"] == "test@example.com" async def test_verify_email_async_returns_api_response(self): - result = await resolve(self.resource.verify_email_async( - EmailVerifyAsyncRequest(email="test@example.com")) + result = await resolve( + self.resource.verify_email_async( + EmailVerifyAsyncRequest(email="test@example.com") + ) ) assert isinstance(result, APIResponse) async def test_verify_email_async_calls_correct_endpoint(self): - await resolve(self.resource.verify_email_async( - EmailVerifyAsyncRequest(email="test@example.com")) + await resolve( + self.resource.verify_email_async( + EmailVerifyAsyncRequest(email="test@example.com") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "POST" assert call.kwargs["path"] == "email-verification/verify-async" async def test_get_async_status_returns_api_response(self): - result = await resolve(self.resource.get_async_status( - EmailVerificationAsyncStatusRequest(email_verification_id="abc123")) + result = await resolve( + self.resource.get_async_status( + EmailVerificationAsyncStatusRequest(email_verification_id="abc123") + ) ) assert isinstance(result, APIResponse) async def test_get_async_status_calls_correct_endpoint(self): - await resolve(self.resource.get_async_status( - EmailVerificationAsyncStatusRequest(email_verification_id="abc123")) + await resolve( + self.resource.get_async_status( + EmailVerificationAsyncStatusRequest(email_verification_id="abc123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" @@ -107,14 +121,18 @@ async def test_list_verifications_calls_correct_endpoint(self): assert call.kwargs["params"] == {"page": 1, "limit": 25} async def test_get_verification_returns_api_response(self): - result = await resolve(self.resource.get_verification( - EmailVerificationGetRequest(email_verification_id="abc123")) + result = await resolve( + self.resource.get_verification( + EmailVerificationGetRequest(email_verification_id="abc123") + ) ) assert isinstance(result, APIResponse) async def test_get_verification_calls_correct_endpoint(self): - await resolve(self.resource.get_verification( - EmailVerificationGetRequest(email_verification_id="abc123")) + await resolve( + self.resource.get_verification( + EmailVerificationGetRequest(email_verification_id="abc123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" @@ -138,14 +156,18 @@ async def test_create_verification_calls_correct_endpoint(self): assert call.kwargs["body"]["name"] == "Test List" async def test_verify_list_returns_api_response(self): - result = await resolve(self.resource.verify_list( - EmailVerificationVerifyRequest(email_verification_id="abc123")) + result = await resolve( + self.resource.verify_list( + EmailVerificationVerifyRequest(email_verification_id="abc123") + ) ) assert isinstance(result, APIResponse) async def test_verify_list_calls_correct_endpoint(self): - await resolve(self.resource.verify_list( - EmailVerificationVerifyRequest(email_verification_id="abc123")) + await resolve( + self.resource.verify_list( + EmailVerificationVerifyRequest(email_verification_id="abc123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" diff --git a/tests/unit/test_identities_resource.py b/tests/unit/test_identities_resource.py index 62f1be1..694b479 100644 --- a/tests/unit/test_identities_resource.py +++ b/tests/unit/test_identities_resource.py @@ -1,4 +1,5 @@ """Tests for IdentitiesResource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -19,7 +20,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -33,16 +33,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = IdentitiesResource(self.mock_client) @@ -78,26 +82,32 @@ async def test_create_identity_calls_correct_endpoint(self): assert call.kwargs["body"]["email"] == "john@example.com" async def test_get_identity_returns_api_response(self): - result = await resolve(self.resource.get_identity( - IdentityGetRequest(identity_id="id123")) + result = await resolve( + self.resource.get_identity(IdentityGetRequest(identity_id="id123")) ) assert isinstance(result, APIResponse) async def test_get_identity_calls_correct_endpoint(self): - await resolve(self.resource.get_identity(IdentityGetRequest(identity_id="id123"))) + await resolve( + self.resource.get_identity(IdentityGetRequest(identity_id="id123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" assert call.kwargs["path"] == "identities/id123" async def test_get_identity_by_email_returns_api_response(self): - result = await resolve(self.resource.get_identity_by_email( - IdentityGetByEmailRequest(email="john@example.com")) + result = await resolve( + self.resource.get_identity_by_email( + IdentityGetByEmailRequest(email="john@example.com") + ) ) assert isinstance(result, APIResponse) async def test_get_identity_by_email_calls_correct_endpoint(self): - await resolve(self.resource.get_identity_by_email( - IdentityGetByEmailRequest(email="john@example.com")) + await resolve( + self.resource.get_identity_by_email( + IdentityGetByEmailRequest(email="john@example.com") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" @@ -130,26 +140,32 @@ async def test_update_identity_by_email_excludes_email_from_body(self): assert "email" not in (call.kwargs.get("body") or {}) async def test_delete_identity_returns_api_response(self): - result = await resolve(self.resource.delete_identity( - IdentityDeleteRequest(identity_id="id123")) + result = await resolve( + self.resource.delete_identity(IdentityDeleteRequest(identity_id="id123")) ) assert isinstance(result, APIResponse) async def test_delete_identity_calls_correct_endpoint(self): - await resolve(self.resource.delete_identity(IdentityDeleteRequest(identity_id="id123"))) + await resolve( + self.resource.delete_identity(IdentityDeleteRequest(identity_id="id123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "identities/id123" async def test_delete_identity_by_email_returns_api_response(self): - result = await resolve(self.resource.delete_identity_by_email( - IdentityDeleteByEmailRequest(email="john@example.com")) + result = await resolve( + self.resource.delete_identity_by_email( + IdentityDeleteByEmailRequest(email="john@example.com") + ) ) assert isinstance(result, APIResponse) async def test_delete_identity_by_email_calls_correct_endpoint(self): - await resolve(self.resource.delete_identity_by_email( - IdentityDeleteByEmailRequest(email="john@example.com")) + await resolve( + self.resource.delete_identity_by_email( + IdentityDeleteByEmailRequest(email="john@example.com") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" diff --git a/tests/unit/test_inbound_resource.py b/tests/unit/test_inbound_resource.py index 8e36f89..b9ad275 100644 --- a/tests/unit/test_inbound_resource.py +++ b/tests/unit/test_inbound_resource.py @@ -1,4 +1,5 @@ """Tests for InboundResource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -18,7 +19,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -32,6 +32,7 @@ def _make_filter_group(): def _make_forward(): return InboundForward(type="email", value="forward@example.com") + class TestInboundResource: @pytest.fixture(autouse=True, params=["sync", "async"]) def setup(self, request): @@ -39,16 +40,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = InboundResource(self.mock_client) @@ -66,7 +71,9 @@ async def test_list_calls_correct_endpoint(self): assert call.kwargs["path"] == "inbound" async def test_get_returns_api_response(self): - result = await resolve(self.resource.get(InboundGetRequest(inbound_id="inb123"))) + result = await resolve( + self.resource.get(InboundGetRequest(inbound_id="inb123")) + ) assert isinstance(result, APIResponse) async def test_get_calls_correct_endpoint(self): @@ -128,7 +135,9 @@ async def test_update_calls_correct_endpoint(self): assert call.kwargs["path"] == "inbound/inb123" async def test_delete_returns_api_response(self): - result = await resolve(self.resource.delete(InboundDeleteRequest(inbound_id="inb123"))) + result = await resolve( + self.resource.delete(InboundDeleteRequest(inbound_id="inb123")) + ) assert isinstance(result, APIResponse) async def test_delete_calls_correct_endpoint(self): diff --git a/tests/unit/test_messages_resource.py b/tests/unit/test_messages_resource.py index 3b7e520..17dfdea 100644 --- a/tests/unit/test_messages_resource.py +++ b/tests/unit/test_messages_resource.py @@ -1,4 +1,5 @@ """Tests for Messages resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -13,7 +14,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -27,16 +27,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Messages(self.mock_client) @@ -63,7 +67,9 @@ async def test_list_messages_passes_query_params(self): assert call.kwargs["params"]["limit"] == 10 async def test_get_message_returns_api_response(self): - result = await resolve(self.resource.get_message(MessageGetRequest(message_id="msg123"))) + result = await resolve( + self.resource.get_message(MessageGetRequest(message_id="msg123")) + ) assert isinstance(result, APIResponse) async def test_get_message_calls_correct_endpoint(self): diff --git a/tests/unit/test_other_resource.py b/tests/unit/test_other_resource.py index a53fa67..0c8ef9a 100644 --- a/tests/unit/test_other_resource.py +++ b/tests/unit/test_other_resource.py @@ -1,4 +1,5 @@ """Tests for Other resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -8,7 +9,6 @@ from mailersend.models.base import APIResponse - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -22,16 +22,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Other(self.mock_client) diff --git a/tests/unit/test_recipients_resource.py b/tests/unit/test_recipients_resource.py index a50f8a9..9089f17 100644 --- a/tests/unit/test_recipients_resource.py +++ b/tests/unit/test_recipients_resource.py @@ -1,4 +1,5 @@ """Tests for Recipients resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -18,7 +19,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -32,16 +32,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Recipients(self.mock_client) @@ -65,26 +69,32 @@ async def test_list_recipients_with_request(self): assert call.kwargs["params"]["page"] == 2 async def test_get_recipient_returns_api_response(self): - result = await resolve(self.resource.get_recipient( - RecipientGetRequest(recipient_id="rec123")) + result = await resolve( + self.resource.get_recipient(RecipientGetRequest(recipient_id="rec123")) ) assert isinstance(result, APIResponse) async def test_get_recipient_calls_correct_endpoint(self): - await resolve(self.resource.get_recipient(RecipientGetRequest(recipient_id="rec123"))) + await resolve( + self.resource.get_recipient(RecipientGetRequest(recipient_id="rec123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" assert call.kwargs["path"] == "recipients/rec123" async def test_delete_recipient_returns_api_response(self): - result = await resolve(self.resource.delete_recipient( - RecipientDeleteRequest(recipient_id="rec123")) + result = await resolve( + self.resource.delete_recipient( + RecipientDeleteRequest(recipient_id="rec123") + ) ) assert isinstance(result, APIResponse) async def test_delete_recipient_calls_correct_endpoint(self): - await resolve(self.resource.delete_recipient( - RecipientDeleteRequest(recipient_id="rec123")) + await resolve( + self.resource.delete_recipient( + RecipientDeleteRequest(recipient_id="rec123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" @@ -217,51 +227,57 @@ async def test_delete_from_blocklist_calls_correct_endpoint(self): assert call.kwargs["path"] == "suppressions/blocklist" async def test_delete_hard_bounces_returns_api_response(self): - result = await resolve(self.resource.delete_hard_bounces( - SuppressionDeleteRequest(ids=["id1"])) + result = await resolve( + self.resource.delete_hard_bounces(SuppressionDeleteRequest(ids=["id1"])) ) assert isinstance(result, APIResponse) async def test_delete_hard_bounces_calls_correct_endpoint(self): - await resolve(self.resource.delete_hard_bounces(SuppressionDeleteRequest(ids=["id1"]))) + await resolve( + self.resource.delete_hard_bounces(SuppressionDeleteRequest(ids=["id1"])) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "suppressions/hard-bounces" async def test_delete_spam_complaints_returns_api_response(self): - result = await resolve(self.resource.delete_spam_complaints( - SuppressionDeleteRequest(ids=["id1"])) + result = await resolve( + self.resource.delete_spam_complaints(SuppressionDeleteRequest(ids=["id1"])) ) assert isinstance(result, APIResponse) async def test_delete_spam_complaints_calls_correct_endpoint(self): - await resolve(self.resource.delete_spam_complaints( - SuppressionDeleteRequest(ids=["id1"])) + await resolve( + self.resource.delete_spam_complaints(SuppressionDeleteRequest(ids=["id1"])) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "suppressions/spam-complaints" async def test_delete_unsubscribes_returns_api_response(self): - result = await resolve(self.resource.delete_unsubscribes( - SuppressionDeleteRequest(ids=["id1"])) + result = await resolve( + self.resource.delete_unsubscribes(SuppressionDeleteRequest(ids=["id1"])) ) assert isinstance(result, APIResponse) async def test_delete_unsubscribes_calls_correct_endpoint(self): - await resolve(self.resource.delete_unsubscribes(SuppressionDeleteRequest(ids=["id1"]))) + await resolve( + self.resource.delete_unsubscribes(SuppressionDeleteRequest(ids=["id1"])) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "suppressions/unsubscribes" async def test_delete_from_on_hold_returns_api_response(self): - result = await resolve(self.resource.delete_from_on_hold( - SuppressionDeleteRequest(ids=["id1"])) + result = await resolve( + self.resource.delete_from_on_hold(SuppressionDeleteRequest(ids=["id1"])) ) assert isinstance(result, APIResponse) async def test_delete_from_on_hold_calls_correct_endpoint(self): - await resolve(self.resource.delete_from_on_hold(SuppressionDeleteRequest(ids=["id1"]))) + await resolve( + self.resource.delete_from_on_hold(SuppressionDeleteRequest(ids=["id1"])) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "suppressions/on-hold-list" diff --git a/tests/unit/test_schedules_resource.py b/tests/unit/test_schedules_resource.py index b26a79c..9ffadb5 100644 --- a/tests/unit/test_schedules_resource.py +++ b/tests/unit/test_schedules_resource.py @@ -1,4 +1,5 @@ """Tests for Schedules resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -14,7 +15,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -28,16 +28,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Schedules(self.mock_client) @@ -55,25 +59,29 @@ async def test_list_schedules_calls_correct_endpoint(self): assert call.kwargs["path"] == "message-schedules" async def test_get_schedule_returns_api_response(self): - result = await resolve(self.resource.get_schedule( - ScheduleGetRequest(message_id="msg123")) + result = await resolve( + self.resource.get_schedule(ScheduleGetRequest(message_id="msg123")) ) assert isinstance(result, APIResponse) async def test_get_schedule_calls_correct_endpoint(self): - await resolve(self.resource.get_schedule(ScheduleGetRequest(message_id="msg123"))) + await resolve( + self.resource.get_schedule(ScheduleGetRequest(message_id="msg123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" assert call.kwargs["path"] == "message-schedules/msg123" async def test_delete_schedule_returns_api_response(self): - result = await resolve(self.resource.delete_schedule( - ScheduleDeleteRequest(message_id="msg123")) + result = await resolve( + self.resource.delete_schedule(ScheduleDeleteRequest(message_id="msg123")) ) assert isinstance(result, APIResponse) async def test_delete_schedule_calls_correct_endpoint(self): - await resolve(self.resource.delete_schedule(ScheduleDeleteRequest(message_id="msg123"))) + await resolve( + self.resource.delete_schedule(ScheduleDeleteRequest(message_id="msg123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "message-schedules/msg123" diff --git a/tests/unit/test_sms_activity_resource.py b/tests/unit/test_sms_activity_resource.py index cd16fc1..f4c03f6 100644 --- a/tests/unit/test_sms_activity_resource.py +++ b/tests/unit/test_sms_activity_resource.py @@ -1,4 +1,5 @@ """Tests for SmsActivity resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -12,7 +13,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -26,16 +26,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = SmsActivity(self.mock_client) @@ -51,7 +55,9 @@ async def test_list_calls_correct_endpoint(self): assert call.kwargs["path"] == "sms-activity" async def test_get_returns_api_response(self): - result = await resolve(self.resource.get(SmsMessageGetRequest(sms_message_id="msg123"))) + result = await resolve( + self.resource.get(SmsMessageGetRequest(sms_message_id="msg123")) + ) assert isinstance(result, APIResponse) async def test_get_calls_correct_endpoint(self): diff --git a/tests/unit/test_sms_inbounds_resource.py b/tests/unit/test_sms_inbounds_resource.py index 00fdb31..fe47cd1 100644 --- a/tests/unit/test_sms_inbounds_resource.py +++ b/tests/unit/test_sms_inbounds_resource.py @@ -1,4 +1,5 @@ """Tests for SmsInbounds resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -16,7 +17,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -30,22 +30,28 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = SmsInbounds(self.mock_client) async def test_list_sms_inbounds_returns_api_response(self): - result = await resolve(self.resource.list_sms_inbounds(SmsInboundsListRequest())) + result = await resolve( + self.resource.list_sms_inbounds(SmsInboundsListRequest()) + ) assert isinstance(result, APIResponse) async def test_list_sms_inbounds_calls_correct_endpoint(self): @@ -55,14 +61,14 @@ async def test_list_sms_inbounds_calls_correct_endpoint(self): assert call.kwargs["path"] == "sms-inbounds" async def test_get_sms_inbound_returns_api_response(self): - result = await resolve(self.resource.get_sms_inbound( - SmsInboundGetRequest(sms_inbound_id="inb123")) + result = await resolve( + self.resource.get_sms_inbound(SmsInboundGetRequest(sms_inbound_id="inb123")) ) assert isinstance(result, APIResponse) async def test_get_sms_inbound_calls_correct_endpoint(self): - await resolve(self.resource.get_sms_inbound( - SmsInboundGetRequest(sms_inbound_id="inb123")) + await resolve( + self.resource.get_sms_inbound(SmsInboundGetRequest(sms_inbound_id="inb123")) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" @@ -101,14 +107,18 @@ async def test_update_sms_inbound_calls_correct_endpoint(self): assert call.kwargs["path"] == "sms-inbounds/inb123" async def test_delete_sms_inbound_returns_api_response(self): - result = await resolve(self.resource.delete_sms_inbound( - SmsInboundDeleteRequest(sms_inbound_id="inb123")) + result = await resolve( + self.resource.delete_sms_inbound( + SmsInboundDeleteRequest(sms_inbound_id="inb123") + ) ) assert isinstance(result, APIResponse) async def test_delete_sms_inbound_calls_correct_endpoint(self): - await resolve(self.resource.delete_sms_inbound( - SmsInboundDeleteRequest(sms_inbound_id="inb123")) + await resolve( + self.resource.delete_sms_inbound( + SmsInboundDeleteRequest(sms_inbound_id="inb123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" diff --git a/tests/unit/test_sms_messages_resource.py b/tests/unit/test_sms_messages_resource.py index b62d17f..0ec1f01 100644 --- a/tests/unit/test_sms_messages_resource.py +++ b/tests/unit/test_sms_messages_resource.py @@ -1,4 +1,5 @@ """Tests for SmsMessages resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -13,7 +14,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -27,22 +27,28 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = SmsMessages(self.mock_client) async def test_list_sms_messages_returns_api_response(self): - result = await resolve(self.resource.list_sms_messages(SmsMessagesListRequest())) + result = await resolve( + self.resource.list_sms_messages(SmsMessagesListRequest()) + ) assert isinstance(result, APIResponse) async def test_list_sms_messages_calls_correct_endpoint(self): @@ -61,14 +67,14 @@ async def test_list_sms_messages_passes_query_params(self): assert call.kwargs["params"]["limit"] == 10 async def test_get_sms_message_returns_api_response(self): - result = await resolve(self.resource.get_sms_message( - SmsMessageGetRequest(sms_message_id="msg123")) + result = await resolve( + self.resource.get_sms_message(SmsMessageGetRequest(sms_message_id="msg123")) ) assert isinstance(result, APIResponse) async def test_get_sms_message_calls_correct_endpoint(self): - await resolve(self.resource.get_sms_message( - SmsMessageGetRequest(sms_message_id="msg123")) + await resolve( + self.resource.get_sms_message(SmsMessageGetRequest(sms_message_id="msg123")) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" diff --git a/tests/unit/test_sms_numbers_resource.py b/tests/unit/test_sms_numbers_resource.py index 6c65bf9..8ab82ca 100644 --- a/tests/unit/test_sms_numbers_resource.py +++ b/tests/unit/test_sms_numbers_resource.py @@ -1,4 +1,5 @@ """Tests for SmsNumbers resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -14,7 +15,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -28,16 +28,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = SmsNumbers(self.mock_client) @@ -53,7 +57,9 @@ async def test_list_calls_correct_endpoint(self): assert call.kwargs["path"] == "sms-numbers" async def test_get_returns_api_response(self): - result = await resolve(self.resource.get(SmsNumberGetRequest(sms_number_id="num123"))) + result = await resolve( + self.resource.get(SmsNumberGetRequest(sms_number_id="num123")) + ) assert isinstance(result, APIResponse) async def test_get_calls_correct_endpoint(self): @@ -63,27 +69,33 @@ async def test_get_calls_correct_endpoint(self): assert call.kwargs["path"] == "sms-numbers/num123" async def test_update_returns_api_response(self): - result = await resolve(self.resource.update( - SmsNumberUpdateRequest(sms_number_id="num123", paused=True)) + result = await resolve( + self.resource.update( + SmsNumberUpdateRequest(sms_number_id="num123", paused=True) + ) ) assert isinstance(result, APIResponse) async def test_update_calls_correct_endpoint(self): - await resolve(self.resource.update( - SmsNumberUpdateRequest(sms_number_id="num123", paused=True)) + await resolve( + self.resource.update( + SmsNumberUpdateRequest(sms_number_id="num123", paused=True) + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "PUT" assert call.kwargs["path"] == "sms-numbers/num123" async def test_delete_returns_api_response(self): - result = await resolve(self.resource.delete( - SmsNumberDeleteRequest(sms_number_id="num123")) + result = await resolve( + self.resource.delete(SmsNumberDeleteRequest(sms_number_id="num123")) ) assert isinstance(result, APIResponse) async def test_delete_calls_correct_endpoint(self): - await resolve(self.resource.delete(SmsNumberDeleteRequest(sms_number_id="num123"))) + await resolve( + self.resource.delete(SmsNumberDeleteRequest(sms_number_id="num123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "sms-numbers/num123" diff --git a/tests/unit/test_sms_recipients_resource.py b/tests/unit/test_sms_recipients_resource.py index cf505cb..5209dc4 100644 --- a/tests/unit/test_sms_recipients_resource.py +++ b/tests/unit/test_sms_recipients_resource.py @@ -1,4 +1,5 @@ """Tests for SmsRecipients resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -15,7 +16,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -29,22 +29,28 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = SmsRecipients(self.mock_client) async def test_list_sms_recipients_returns_api_response(self): - result = await resolve(self.resource.list_sms_recipients(SmsRecipientsListRequest())) + result = await resolve( + self.resource.list_sms_recipients(SmsRecipientsListRequest()) + ) assert isinstance(result, APIResponse) async def test_list_sms_recipients_calls_correct_endpoint(self): @@ -62,14 +68,18 @@ async def test_list_sms_recipients_with_custom_params(self): assert call.kwargs["params"]["page"] == 2 async def test_get_sms_recipient_returns_api_response(self): - result = await resolve(self.resource.get_sms_recipient( - SmsRecipientGetRequest(sms_recipient_id="rec123")) + result = await resolve( + self.resource.get_sms_recipient( + SmsRecipientGetRequest(sms_recipient_id="rec123") + ) ) assert isinstance(result, APIResponse) async def test_get_sms_recipient_calls_correct_endpoint(self): - await resolve(self.resource.get_sms_recipient( - SmsRecipientGetRequest(sms_recipient_id="rec123")) + await resolve( + self.resource.get_sms_recipient( + SmsRecipientGetRequest(sms_recipient_id="rec123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" diff --git a/tests/unit/test_sms_sending_resource.py b/tests/unit/test_sms_sending_resource.py index 79a56c3..677b933 100644 --- a/tests/unit/test_sms_sending_resource.py +++ b/tests/unit/test_sms_sending_resource.py @@ -1,4 +1,5 @@ """Tests for SmsSending resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -9,7 +10,6 @@ from mailersend.models.sms_sending import SmsSendRequest - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -23,16 +23,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = SmsSending(self.mock_client) diff --git a/tests/unit/test_sms_webhooks_resource.py b/tests/unit/test_sms_webhooks_resource.py index 23b6a09..a528d53 100644 --- a/tests/unit/test_sms_webhooks_resource.py +++ b/tests/unit/test_sms_webhooks_resource.py @@ -1,4 +1,5 @@ """Tests for SmsWebhooks resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -17,7 +18,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -31,16 +31,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = SmsWebhooks(self.mock_client) @@ -62,14 +66,14 @@ async def test_list_sms_webhooks_calls_correct_endpoint(self): assert call.kwargs["path"] == "sms-webhooks" async def test_get_sms_webhook_returns_api_response(self): - result = await resolve(self.resource.get_sms_webhook( - SmsWebhookGetRequest(sms_webhook_id="wh123")) + result = await resolve( + self.resource.get_sms_webhook(SmsWebhookGetRequest(sms_webhook_id="wh123")) ) assert isinstance(result, APIResponse) async def test_get_sms_webhook_calls_correct_endpoint(self): - await resolve(self.resource.get_sms_webhook( - SmsWebhookGetRequest(sms_webhook_id="wh123")) + await resolve( + self.resource.get_sms_webhook(SmsWebhookGetRequest(sms_webhook_id="wh123")) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" @@ -110,14 +114,18 @@ async def test_update_sms_webhook_calls_correct_endpoint(self): assert call.kwargs["path"] == "sms-webhooks/wh123" async def test_delete_sms_webhook_returns_api_response(self): - result = await resolve(self.resource.delete_sms_webhook( - SmsWebhookDeleteRequest(sms_webhook_id="wh123")) + result = await resolve( + self.resource.delete_sms_webhook( + SmsWebhookDeleteRequest(sms_webhook_id="wh123") + ) ) assert isinstance(result, APIResponse) async def test_delete_sms_webhook_calls_correct_endpoint(self): - await resolve(self.resource.delete_sms_webhook( - SmsWebhookDeleteRequest(sms_webhook_id="wh123")) + await resolve( + self.resource.delete_sms_webhook( + SmsWebhookDeleteRequest(sms_webhook_id="wh123") + ) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" diff --git a/tests/unit/test_smtp_users_resource.py b/tests/unit/test_smtp_users_resource.py index b8884f5..d2d947d 100644 --- a/tests/unit/test_smtp_users_resource.py +++ b/tests/unit/test_smtp_users_resource.py @@ -1,4 +1,5 @@ """Tests for SmtpUsers resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -16,7 +17,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -30,16 +30,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = SmtpUsers(self.mock_client) diff --git a/tests/unit/test_templates_resource.py b/tests/unit/test_templates_resource.py index ce82c58..599ca28 100644 --- a/tests/unit/test_templates_resource.py +++ b/tests/unit/test_templates_resource.py @@ -1,4 +1,5 @@ """Tests for Templates resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -14,7 +15,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -28,16 +28,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Templates(self.mock_client) @@ -61,26 +65,28 @@ async def test_list_templates_with_request(self): assert call.kwargs["params"]["page"] == 2 async def test_get_template_returns_api_response(self): - result = await resolve(self.resource.get_template( - TemplateGetRequest(template_id="tmpl123")) + result = await resolve( + self.resource.get_template(TemplateGetRequest(template_id="tmpl123")) ) assert isinstance(result, APIResponse) async def test_get_template_calls_correct_endpoint(self): - await resolve(self.resource.get_template(TemplateGetRequest(template_id="tmpl123"))) + await resolve( + self.resource.get_template(TemplateGetRequest(template_id="tmpl123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "GET" assert call.kwargs["path"] == "templates/tmpl123" async def test_delete_template_returns_api_response(self): - result = await resolve(self.resource.delete_template( - TemplateDeleteRequest(template_id="tmpl123")) + result = await resolve( + self.resource.delete_template(TemplateDeleteRequest(template_id="tmpl123")) ) assert isinstance(result, APIResponse) async def test_delete_template_calls_correct_endpoint(self): - await resolve(self.resource.delete_template( - TemplateDeleteRequest(template_id="tmpl123")) + await resolve( + self.resource.delete_template(TemplateDeleteRequest(template_id="tmpl123")) ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" diff --git a/tests/unit/test_tokens_resource.py b/tests/unit/test_tokens_resource.py index 1b8fd2b..f5eb045 100644 --- a/tests/unit/test_tokens_resource.py +++ b/tests/unit/test_tokens_resource.py @@ -1,4 +1,5 @@ """Tests for Tokens resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -17,7 +18,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -31,16 +31,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Tokens(self.mock_client) @@ -56,7 +60,9 @@ async def test_list_tokens_calls_correct_endpoint(self): assert call.kwargs["path"] == "token" async def test_get_token_returns_api_response(self): - result = await resolve(self.resource.get_token(TokenGetRequest(token_id="tok123"))) + result = await resolve( + self.resource.get_token(TokenGetRequest(token_id="tok123")) + ) assert isinstance(result, APIResponse) async def test_get_token_calls_correct_endpoint(self): @@ -110,7 +116,9 @@ async def test_update_token_name_calls_correct_endpoint(self): assert call.kwargs["path"] == "token/tok123" async def test_delete_token_returns_api_response(self): - result = await resolve(self.resource.delete_token(TokenDeleteRequest(token_id="tok123"))) + result = await resolve( + self.resource.delete_token(TokenDeleteRequest(token_id="tok123")) + ) assert isinstance(result, APIResponse) async def test_delete_token_calls_correct_endpoint(self): diff --git a/tests/unit/test_users_resource.py b/tests/unit/test_users_resource.py index d320738..748e0b2 100644 --- a/tests/unit/test_users_resource.py +++ b/tests/unit/test_users_resource.py @@ -1,4 +1,5 @@ """Tests for Users resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -21,7 +22,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -35,16 +35,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Users(self.mock_client) @@ -94,7 +98,9 @@ async def test_update_user_calls_correct_endpoint(self): assert call.kwargs["path"] == "users/usr123" async def test_delete_user_returns_api_response(self): - result = await resolve(self.resource.delete_user(UserDeleteRequest(user_id="usr123"))) + result = await resolve( + self.resource.delete_user(UserDeleteRequest(user_id="usr123")) + ) assert isinstance(result, APIResponse) async def test_delete_user_calls_correct_endpoint(self): @@ -114,7 +120,9 @@ async def test_list_invites_calls_correct_endpoint(self): assert call.kwargs["path"] == "invites" async def test_get_invite_returns_api_response(self): - result = await resolve(self.resource.get_invite(InviteGetRequest(invite_id="inv123"))) + result = await resolve( + self.resource.get_invite(InviteGetRequest(invite_id="inv123")) + ) assert isinstance(result, APIResponse) async def test_get_invite_calls_correct_endpoint(self): @@ -124,25 +132,29 @@ async def test_get_invite_calls_correct_endpoint(self): assert call.kwargs["path"] == "invites/inv123" async def test_resend_invite_returns_api_response(self): - result = await resolve(self.resource.resend_invite( - InviteResendRequest(invite_id="inv123")) + result = await resolve( + self.resource.resend_invite(InviteResendRequest(invite_id="inv123")) ) assert isinstance(result, APIResponse) async def test_resend_invite_calls_correct_endpoint(self): - await resolve(self.resource.resend_invite(InviteResendRequest(invite_id="inv123"))) + await resolve( + self.resource.resend_invite(InviteResendRequest(invite_id="inv123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "POST" assert call.kwargs["path"] == "invites/inv123/resend" async def test_cancel_invite_returns_api_response(self): - result = await resolve(self.resource.cancel_invite( - InviteCancelRequest(invite_id="inv123")) + result = await resolve( + self.resource.cancel_invite(InviteCancelRequest(invite_id="inv123")) ) assert isinstance(result, APIResponse) async def test_cancel_invite_calls_correct_endpoint(self): - await resolve(self.resource.cancel_invite(InviteCancelRequest(invite_id="inv123"))) + await resolve( + self.resource.cancel_invite(InviteCancelRequest(invite_id="inv123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "invites/inv123" diff --git a/tests/unit/test_webhooks_resource.py b/tests/unit/test_webhooks_resource.py index b462521..9b7c135 100644 --- a/tests/unit/test_webhooks_resource.py +++ b/tests/unit/test_webhooks_resource.py @@ -1,4 +1,5 @@ """Tests for Webhooks resource.""" + import inspect from unittest.mock import AsyncMock, MagicMock, Mock @@ -16,7 +17,6 @@ ) - async def resolve(result): if inspect.iscoroutine(result): return await result @@ -30,16 +30,20 @@ def setup(self, request): self.mock_client = MagicMock() self.mock_client.request = AsyncMock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) else: self.mock_client = MagicMock() self.mock_client.request = Mock( return_value=MagicMock( - status_code=200, headers={"x-request-id": "test-req-id"}, - json=MagicMock(return_value={}), content=b"{}" + status_code=200, + headers={"x-request-id": "test-req-id"}, + json=MagicMock(return_value={}), + content=b"{}", ) ) self.resource = Webhooks(self.mock_client) @@ -61,7 +65,9 @@ async def test_list_webhooks_calls_correct_endpoint(self): assert call.kwargs["path"] == "webhooks" async def test_get_webhook_returns_api_response(self): - result = await resolve(self.resource.get_webhook(WebhookGetRequest(webhook_id="wh123"))) + result = await resolve( + self.resource.get_webhook(WebhookGetRequest(webhook_id="wh123")) + ) assert isinstance(result, APIResponse) async def test_get_webhook_calls_correct_endpoint(self): @@ -106,13 +112,15 @@ async def test_update_webhook_excludes_id_from_body(self): assert "webhook_id" not in (call.kwargs.get("body") or {}) async def test_delete_webhook_returns_api_response(self): - result = await resolve(self.resource.delete_webhook( - WebhookDeleteRequest(webhook_id="wh123")) + result = await resolve( + self.resource.delete_webhook(WebhookDeleteRequest(webhook_id="wh123")) ) assert isinstance(result, APIResponse) async def test_delete_webhook_calls_correct_endpoint(self): - await resolve(self.resource.delete_webhook(WebhookDeleteRequest(webhook_id="wh123"))) + await resolve( + self.resource.delete_webhook(WebhookDeleteRequest(webhook_id="wh123")) + ) call = self.mock_client.request.call_args assert call.kwargs["method"] == "DELETE" assert call.kwargs["path"] == "webhooks/wh123" diff --git a/uv.lock b/uv.lock index d083b15..55d4af7 100644 --- a/uv.lock +++ b/uv.lock @@ -11,6 +11,73 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/78/b6/6307fbef88d9b5ee7421e68d78a9f162e0da4900bc5f5793f6d3d0e34fb8/annotated_types-0.7.0-py3-none-any.whl", hash = "sha256:1f02e8b43a8fbbc3f3e0d4f0f4bfc8131bcb4eebe8849b8e5c773f3a1c582a53", size = 13643, upload-time = "2024-05-20T21:33:24.1Z" }, ] +[[package]] +name = "anyio" +version = "4.14.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "idna" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3b/72/5562aabb8dd7181e8e860622a38bea08d17842b99ecd4c91f84ac95251b0/anyio-4.14.1.tar.gz", hash = "sha256:8d648a3544c1a700e3ff78615cd679e4c5c3f149904287e73687b2596963629e", size = 254831, upload-time = "2026-06-24T20:56:06.017Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b0/7b/90df4a0a816d98d6ea26f559d87836d494a2cf1fcf063be67df50a7bcc30/anyio-4.14.1-py3-none-any.whl", hash = "sha256:4e5533c5b8ff0a24f5d7a176cbe6877129cd183893f66b537f8f227d10527d72", size = 124875, upload-time = "2026-06-24T20:56:04.413Z" }, +] + +[[package]] +name = "backports-asyncio-runner" +version = "1.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/8e/ff/70dca7d7cb1cbc0edb2c6cc0c38b65cba36cccc491eca64cabd5fe7f8670/backports_asyncio_runner-1.2.0.tar.gz", hash = "sha256:a5aa7b2b7d8f8bfcaa2b57313f70792df84e32a2a746f585213373f900b42162", size = 69893, upload-time = "2025-07-02T02:27:15.685Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a0/59/76ab57e3fe74484f48a53f8e337171b4a2349e506eabe136d7e01d059086/backports_asyncio_runner-1.2.0-py3-none-any.whl", hash = "sha256:0da0a936a8aeb554eccb426dc55af3ba63bcdc69fa1a600b5bb305413a4477b5", size = 12313, upload-time = "2025-07-02T02:27:14.263Z" }, +] + +[[package]] +name = "black" +version = "26.5.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "mypy-extensions" }, + { name = "packaging" }, + { name = "pathspec" }, + { name = "platformdirs" }, + { name = "pytokens" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, + { name = "typing-extensions", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c0/37/5628dd55bf2b34257fc7603f0fe97c40e3aaf24265f416a9c85c95ca1436/black-26.5.1.tar.gz", hash = "sha256:dd321f668053961824bcc1be1cc1df748b2d7e4fa28086b08331e577b0100a73", size = 679439, upload-time = "2026-05-18T16:53:36.107Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/be/84/b3f55026206a9e8820a91503308075ca48eadc515e436731ca01dbe043b3/black-26.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9942db8888e06943c5dde66ca0037dcff82a2a4ec1ad0ada9e0d2ee9d9823893", size = 1987719, upload-time = "2026-05-18T17:05:02.757Z" }, + { url = "https://files.pythonhosted.org/packages/c6/34/7db312c5e5783d6e76cffd9d5ac8972a32badae4c6e3288dac0eed8d3bed/black-26.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:89c93167a74d3a75dfaa38a5c7cca015537d5820dd7f17d63267d674a61cae90", size = 1810083, upload-time = "2026-05-18T17:05:04.302Z" }, + { url = "https://files.pythonhosted.org/packages/33/e2/e0101e73c2c8727634e2efcb35e2b34bd23ad70dfa673789f5773a591b21/black-26.5.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:22f2cd76d069cc54c71f10360744ba8983fbb616903b4304a85b734915c8e1b4", size = 1860633, upload-time = "2026-05-18T17:05:06.391Z" }, + { url = "https://files.pythonhosted.org/packages/b0/4c/e15c0c5b23cf3651035fe5addcce90e283af3548a3f91bb03d81b83106ab/black-26.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:87ed5c6f450580a2f6790bc7cbfb016dfc73bc750249762268a3695361315eef", size = 1477886, upload-time = "2026-05-18T17:05:07.96Z" }, + { url = "https://files.pythonhosted.org/packages/9f/3f/59d43ade98d2ce5c8dc34a4e46cbecd177e6d55d7d4092969c6003ccc655/black-26.5.1-cp310-cp310-win_arm64.whl", hash = "sha256:58b4bd92cf88aacf83d88479c8f9caee044b1ec55f2451a337354a7ea2590a22", size = 1277111, upload-time = "2026-05-18T17:05:09.473Z" }, + { url = "https://files.pythonhosted.org/packages/4b/96/3c3e09f09f44a37aac36b178a279cd19aa7001bd796187a7b162a294c81f/black-26.5.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:96ae2c733b2aabdd9986e2c5df628ff3473676cd1c5faded1ff496cf6d74083c", size = 1970639, upload-time = "2026-05-18T17:05:11.461Z" }, + { url = "https://files.pythonhosted.org/packages/83/ea/5ad117b9ee3ecd933c712bcbae610006e5b7cc9f41c526cd7ed3b6c4124c/black-26.5.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:0e48b87e03bf109288e55cfceadcfa15ff5470aca2851a851950ed2926f450d7", size = 1792130, upload-time = "2026-05-18T17:05:12.983Z" }, + { url = "https://files.pythonhosted.org/packages/06/3a/7c448bc623fcdfa96672531beb5a616ea5e64f6975955254d7731ffb0ad9/black-26.5.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5119fa92ae61f786e8c3662fd60aece1d0a2dd5cca5d0c79417a95e7a4272a59", size = 1846134, upload-time = "2026-05-18T17:05:14.506Z" }, + { url = "https://files.pythonhosted.org/packages/a1/5b/0b39b3a5917f0657ac014ad2edb58c139553a478adfe7f817abf1622ff6e/black-26.5.1-cp311-cp311-win_amd64.whl", hash = "sha256:30d3c14661f2792e9142cce3eeeb1cbc175b3eb5f733be0c8eeb99651e52b0c3", size = 1478883, upload-time = "2026-05-18T17:05:16.542Z" }, + { url = "https://files.pythonhosted.org/packages/4c/48/dc222692e0f95030db1bbfb6c857e76858bad09058221ea7aae815255327/black-26.5.1-cp311-cp311-win_arm64.whl", hash = "sha256:1ef92b76f7733f282fd096ea406200b5a286c42947412b0eaff3a74e3616cefe", size = 1277776, upload-time = "2026-05-18T17:05:18.029Z" }, + { url = "https://files.pythonhosted.org/packages/24/99/7744b906703228264ef73bdd534df88ec1ef3de45c4e78f6d31b9e32d0c9/black-26.5.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:4ad6fa01f941920f54f2bbb35f3df7673428a0ef98a0b0840c2eaef3b110efa8", size = 2012518, upload-time = "2026-05-18T17:05:20.108Z" }, + { url = "https://files.pythonhosted.org/packages/b7/c0/c5a3b1636dfd09c42534f2b3cf33506814f6d3e066fb0879ffa16c1ae860/black-26.5.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:3915f256e75a2d7cf88d8953d37f780455dc586cc72dee059c528fe77f581217", size = 1816016, upload-time = "2026-05-18T17:05:21.84Z" }, + { url = "https://files.pythonhosted.org/packages/1f/0e/36044316b65ca471d3bb6d3703fd06fb50c6b727c3562f6a5a3153634f88/black-26.5.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9d98d4137277c75dfb898ec8d846c4fd68ba1e9cf77f95e2865c203dc18f4c3d", size = 1884150, upload-time = "2026-05-18T17:05:23.546Z" }, + { url = "https://files.pythonhosted.org/packages/b3/33/dafc5808c2af43672912111d7c3354af1615f7e2be3bed7a878461abbe4d/black-26.5.1-cp312-cp312-win_amd64.whl", hash = "sha256:a1dca32d9f1784af512a13410ec204c6f7f0aa9797a111c42e1c03449821c264", size = 1486825, upload-time = "2026-05-18T17:05:25.004Z" }, + { url = "https://files.pythonhosted.org/packages/82/14/b965ee6ad2a311f28bdbf692def3ee9848d2ae289dab28b27657fcee3e78/black-26.5.1-cp312-cp312-win_arm64.whl", hash = "sha256:1037d5ac7b7b310b2632ad867ec8d0e4c4819dcdb0b820f63135da746a24e418", size = 1288646, upload-time = "2026-05-18T17:05:26.477Z" }, + { url = "https://files.pythonhosted.org/packages/3f/5c/c384363980e11e25ca6b93205949bb331fbf35f4e0dbec376dfa6326cec8/black-26.5.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:2b36cf2ddf5566e205f6535f782a62194a184d33e175b64ae8c40b1737522be3", size = 2009020, upload-time = "2026-05-18T17:05:28.132Z" }, + { url = "https://files.pythonhosted.org/packages/0b/df/9f31c5e0babbfed77d505fc5d120beb98b21b33feaeded3924ea941fe360/black-26.5.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1f7ea64ebfa01b50f693508fc39f875e264446d3b097088f84f203b9d09618a0", size = 1813335, upload-time = "2026-05-18T17:05:31.266Z" }, + { url = "https://files.pythonhosted.org/packages/fb/24/8e7b9a2fa61b0afd82209efe937557d180a1fa055bd7f6161eb9defc3719/black-26.5.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ecb3e624844c798144e9bd986954e0adc81d8911a1f30f375e1252fe26e8c294", size = 1881614, upload-time = "2026-05-18T17:05:32.718Z" }, + { url = "https://files.pythonhosted.org/packages/49/ad/b4e0d9365ba8ac34f6bbab62a4b1b2dd5d618fac3fa1b8db968c844201b5/black-26.5.1-cp313-cp313-win_amd64.whl", hash = "sha256:e1a26503279b6b310669fb0b219c39e4820b77e8189fe80f522bb511f247db0a", size = 1488925, upload-time = "2026-05-18T17:05:34.259Z" }, + { url = "https://files.pythonhosted.org/packages/a1/4b/652b859bf5df88a751c30451b09338f7fd26a77d1271c666992f836b7711/black-26.5.1-cp313-cp313-win_arm64.whl", hash = "sha256:5c34b25da232ead53a6f335b76dbea124f4d152ad568b9080d6f944bc2b34b52", size = 1289883, upload-time = "2026-05-18T17:05:36.019Z" }, + { url = "https://files.pythonhosted.org/packages/a6/16/a8da8eb208c51c7f4ce74609a45d0dcc6d8a2141e45e81ee5289d1bb0d59/black-26.5.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:e88976690a64b0af98312ca958415849cb42423423c5f2ee74af4b49a97a2168", size = 2004800, upload-time = "2026-05-18T17:05:38.182Z" }, + { url = "https://files.pythonhosted.org/packages/11/8a/a479296a19e383b70a725882a6cf3d786540601ff03cabbaaf1cce864c5a/black-26.5.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:32d5ea7f6c8bdfa6e648326ebca1f02b0764e2a029edc6f8dce2627e19d468c3", size = 1815576, upload-time = "2026-05-18T17:05:40.309Z" }, + { url = "https://files.pythonhosted.org/packages/81/6b/cfaf3d39f25132c156a068f6b805576c9103a84086019507c70e1911ee7d/black-26.5.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ea8d16dc41655aa113cd64665e7219446cd7e4ff2248d7178eaa905190c86b18", size = 1877927, upload-time = "2026-05-18T17:05:42.463Z" }, + { url = "https://files.pythonhosted.org/packages/66/76/302e313964bcff7e28df329d39f84f5270095730d85ff0acc260610a0d82/black-26.5.1-cp314-cp314-win_amd64.whl", hash = "sha256:577f21094ea469ef92ec1adaf2c9441a226d2144d01a5be2fa823cecf6543e50", size = 1511860, upload-time = "2026-05-18T17:05:43.943Z" }, + { url = "https://files.pythonhosted.org/packages/27/4e/a3827e35e0e567f9f9ee59e2a0ab979267dca98718f25547ca8c6733afd4/black-26.5.1-cp314-cp314-win_arm64.whl", hash = "sha256:ed1a20af114c301a0269bf01163d51dbef72737fd65f850001e7cbe7f3c7abae", size = 1316632, upload-time = "2026-05-18T17:05:45.521Z" }, + { url = "https://files.pythonhosted.org/packages/94/51/f975cae76d44274cc2868dc9040ac5d58d464784610234455b4e7b19c6ef/black-26.5.1-py3-none-any.whl", hash = "sha256:4ed7f7da04046d2e488437170797d3b4a4ad83906683bcb7dfc68b673bbce5e2", size = 213693, upload-time = "2026-05-18T16:53:33.964Z" }, +] + [[package]] name = "certifi" version = "2026.5.20" @@ -136,14 +203,14 @@ wheels = [ [[package]] name = "click" -version = "8.1.8" +version = "8.4.2" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593, upload-time = "2024-12-21T18:38:44.339Z" } +sdist = { url = "https://files.pythonhosted.org/packages/76/d4/81420972a676e8ffea40450d8c8c92943e7218a78fe9b64359836cc9876b/click-8.4.2.tar.gz", hash = "sha256:9a6cea6e60b17ebe0a44c5cc636d94f09bd66142c1cd7d8b4cd731c4917a15f6", size = 338000, upload-time = "2026-06-24T17:45:15.148Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/7e/d4/7ebdbd03970677812aac39c869717059dbb71a4cfc033ca6e5221787892c/click-8.1.8-py3-none-any.whl", hash = "sha256:63c132bbbed01578a06712a2d1f497bb62d9c1c0d329b7903a866228027263b2", size = 98188, upload-time = "2024-12-21T18:38:41.666Z" }, + { url = "https://files.pythonhosted.org/packages/fb/e2/79c688af8b210d232694e31e59da9f6ec747bae31c3f5946e4e9b98860d5/click-8.4.2-py3-none-any.whl", hash = "sha256:e6f9f66136c816745b9d65817da91d61d957fb16e02e4dcd0552553c5a197b76", size = 119243, upload-time = "2026-06-24T17:45:13.73Z" }, ] [[package]] @@ -169,115 +236,100 @@ wheels = [ [[package]] name = "coverage" -version = "7.14.1" +version = "7.15.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/54/fd/0ab2772530e946e1be1abd0bc09e647ec9b02e88f0867857601fefca8953/coverage-7.14.1.tar.gz", hash = "sha256:30c08f7d90415aa98b3c990385dea2939b0da55f38515e5b369b83655f8523be", size = 920132, upload-time = "2026-05-26T20:41:36.783Z" } +sdist = { url = "https://files.pythonhosted.org/packages/cc/8b/adeb62ea8951f13c4c7fef2e7a85e1a06b499c8d8237ea589d496029e53f/coverage-7.15.0.tar.gz", hash = "sha256:9ac3fe7a1435986463eaa8ee253ae2f2a268709ba4ae5c7dd1f52a05391ad78f", size = 925362, upload-time = "2026-07-02T13:10:50.535Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/92/69/0d2ef01ff4b8fcecd4cba920d11e92fa4f96ae412441d3b56a90a258e69b/coverage-7.14.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:3e3680291c4a1d0dadfa84a2c459576a4af5133abb617905714339a0c73138cf", size = 219722, upload-time = "2026-05-26T20:38:14.002Z" }, - { url = "https://files.pythonhosted.org/packages/f8/ae/9afdeaa31b9d9ce98124b6abf8bb49119bf71aecae04f8567c189d91299f/coverage-7.14.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a5274669f37f2343635a347b91a60777621341ab3378e9c6ac9335eee704bddf", size = 220240, upload-time = "2026-05-26T20:38:17.424Z" }, - { url = "https://files.pythonhosted.org/packages/51/69/c998589871df7ea7dba865cc5ee32b5a3e1d47ba6c68ef91104c7c46fa5e/coverage-7.14.1-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:cfe5a5fec635799ef33428f1e5e61bafa45a92a96190ba731561ba558ccc214d", size = 246981, upload-time = "2026-05-26T20:38:19.266Z" }, - { url = "https://files.pythonhosted.org/packages/fc/10/1c7d04c13040dac531d21b712bbe08f902e6dd9b58f5d77875c4d030f8f2/coverage-7.14.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:62a9f70b52e0b5a95cfef4a5c5641b06983cadc5e538a3feeb5c00211f523ac2", size = 248812, upload-time = "2026-05-26T20:38:20.75Z" }, - { url = "https://files.pythonhosted.org/packages/c1/65/2a38a4607ef27cadcfbcee034dba5830ae2569f90144a0f4c7dbf47d30b0/coverage-7.14.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3c18ebc343e15be53049b3a2dce38fe82d58f37e20ab9094b3a39c0aa4f6bb47", size = 250675, upload-time = "2026-05-26T20:38:22.159Z" }, - { url = "https://files.pythonhosted.org/packages/c9/a2/a446ed9752a4a59b79e0fb6cbb319f6facb2183045c0725462625e66f87e/coverage-7.14.1-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b84ffdf877644e7096aa936991efeed873f7f3df57b9cd001312b7668ab08550", size = 252590, upload-time = "2026-05-26T20:38:23.63Z" }, - { url = "https://files.pythonhosted.org/packages/9e/fd/e81fbd7ba752365546e9842b1cbdaad3d6919d2a522c590aef16a281ec5e/coverage-7.14.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e854312c4103f2ad4c0dc023b69b77ebfd2c89db5f86c4c94dc2353f9a92167e", size = 247691, upload-time = "2026-05-26T20:38:25.057Z" }, - { url = "https://files.pythonhosted.org/packages/53/35/f3c26fdaae9ea937d154ca4d372e5ea0a4167ff70d36c6074ac2eacb2f83/coverage-7.14.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:c643734307300234fafa36bf2a040a7235f8f177ea1fd6ec1423aea6fb7b929f", size = 248716, upload-time = "2026-05-26T20:38:26.406Z" }, - { url = "https://files.pythonhosted.org/packages/2e/14/940b6c49551fd343e8507ee2b0ba7af5d0aa04ed5bf768285cb7c72a9884/coverage-7.14.1-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:84ac9499e48700399a5dd0ea7085b5091961fec52c68d66b4ec0d3cf7f4441b1", size = 246721, upload-time = "2026-05-26T20:38:28.282Z" }, - { url = "https://files.pythonhosted.org/packages/aa/2c/40fc0634186c28292a662dff578866b3913983d6c375a3c2a74020938719/coverage-7.14.1-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:7f02d09f70776579b926d889a4c9c235070a1f47c40458aeaca563fae5acfdb5", size = 250533, upload-time = "2026-05-26T20:38:29.753Z" }, - { url = "https://files.pythonhosted.org/packages/de/e3/2c26bf1e811f9df991ff2a9bdddebdd13ee0665d564df7d05979f9146297/coverage-7.14.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:ce66d8e46da2bb5ee313a745cbd2e391d319176c1f7a9451bfcd3a2fb920859b", size = 246990, upload-time = "2026-05-26T20:38:31.516Z" }, - { url = "https://files.pythonhosted.org/packages/a8/b0/060260ef56bd92363ebdce0c7095ce422b06e69aae71828efeca473ab1ca/coverage-7.14.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c912c259304cfb5ee584481cfb7ce1ff932b4d61e6c9140b8f19cb7b5ed82332", size = 247593, upload-time = "2026-05-26T20:38:33.065Z" }, - { url = "https://files.pythonhosted.org/packages/63/f3/501502046efeb0d6d94b5ca54941d95f1184183dd6bdb7f283985783bb4a/coverage-7.14.1-cp310-cp310-win32.whl", hash = "sha256:1238cb94638e610e972c60dac68e813f868dc7d6e982535270558443058d9d59", size = 222330, upload-time = "2026-05-26T20:38:35.36Z" }, - { url = "https://files.pythonhosted.org/packages/a0/5d/1bf99f2c558f128faf7906817ccbdb576ba815d3b41ce2ac1719b70a3663/coverage-7.14.1-cp310-cp310-win_amd64.whl", hash = "sha256:fc459e5d73be2d6332fcfe8dbf3d8994671fe33c700f4565988ecfa511547253", size = 223261, upload-time = "2026-05-26T20:38:37.196Z" }, - { url = "https://files.pythonhosted.org/packages/7d/d7/477ad149490e6cb849f28abea1dabb9c823cea72e7500c81b4240ce619c0/coverage-7.14.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:478b5bcd63c2e1357c5c7e16c070690df7b07f676b1c114d7b93e533c664309f", size = 219848, upload-time = "2026-05-26T20:38:38.715Z" }, - { url = "https://files.pythonhosted.org/packages/91/82/a5eb47257c50601bb7b9a9d2857c67b7a3a85ad74180eb2c98bb1fbe0ce5/coverage-7.14.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a24a81f9715ee42ef59a316cc11611c98fe23920f7c81861315c9f3ff4a230f4", size = 220354, upload-time = "2026-05-26T20:38:40.232Z" }, - { url = "https://files.pythonhosted.org/packages/43/8b/78419b5391a5cb706b6544390507e469d83ffc9a8248b02c4011aceb9365/coverage-7.14.1-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:196a13319ad88d6d8ef5ab489ec4f44ddde2143c0c7d5b27786f6c3ffd56a7e1", size = 250771, upload-time = "2026-05-26T20:38:41.782Z" }, - { url = "https://files.pythonhosted.org/packages/77/63/e77aaacd491182210d639636b7a8bba23ffffa9b82aa3762da9431855fa9/coverage-7.14.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:3d452fd08b5c72c5167c93e6867b5c08500bd40f2a21e1e854a500550b6cc36f", size = 252683, upload-time = "2026-05-26T20:38:43.305Z" }, - { url = "https://files.pythonhosted.org/packages/65/1c/a022e3cfbec2ac241640003cb3a817e161d9c7f5aa9b49173756cdc03204/coverage-7.14.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:23bf7fa51ac02e07fc7c96849b82946da47ae862dc8f86d183b2a4864fc38129", size = 254791, upload-time = "2026-05-26T20:38:45.361Z" }, - { url = "https://files.pythonhosted.org/packages/61/d6/967e408aca4c1ceb88cb0cc677169110ae7f5995fb5eaf5fb1f5a1bb8f5d/coverage-7.14.1-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bcaa50684dcaadfa599ac48f81103c756d791cfd85c97203d2217c593d48b860", size = 256748, upload-time = "2026-05-26T20:38:46.91Z" }, - { url = "https://files.pythonhosted.org/packages/b8/be/869188f7fe28638078ec479331ace6dc5f7b40b7153eb616f47ab79404d8/coverage-7.14.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:4ea1c034f95c9b056e856b794630b17f9fa3d57e4800ff1e503d3be0f9c9078c", size = 250907, upload-time = "2026-05-26T20:38:48.493Z" }, - { url = "https://files.pythonhosted.org/packages/07/aa/adb7d3b4278d690e68703abcd76ab1b948242e3668d921711551b78f9ddb/coverage-7.14.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:c7e057326434e441306226fbeb5d1aaf14a2637efe97ba668306635835f32ad7", size = 252483, upload-time = "2026-05-26T20:38:50.074Z" }, - { url = "https://files.pythonhosted.org/packages/43/61/331c74103c62dcb0c4b9b3a0de9a61aca016208b0a90f109592a9f9ecc28/coverage-7.14.1-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:59baf88468dbc8d63b1887afd92bda52e40bb1561696e5819670601403810cec", size = 250545, upload-time = "2026-05-26T20:38:51.613Z" }, - { url = "https://files.pythonhosted.org/packages/f6/b6/c5dae3c104d89be04828f61810e6b3473825482e4c288cc4ed04553e08ae/coverage-7.14.1-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d34d75f892b3ab73ba11cab5442cce7b3e168fd64162b16f0e1e0d09c508edef", size = 254310, upload-time = "2026-05-26T20:38:53.503Z" }, - { url = "https://files.pythonhosted.org/packages/ad/a1/2b9d5863e3b83c01ad8199e3c597802fbb3a9dc90b058885804c20296d31/coverage-7.14.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:3a56abc20a472baf0304c455721bc601477440d28ecfde8a03dde79ede07e0df", size = 250266, upload-time = "2026-05-26T20:38:55.414Z" }, - { url = "https://files.pythonhosted.org/packages/7f/5e/0e511fbdb269359be26fe678a1c3fa1f2aa2a01573cc3f54268c8d6d4797/coverage-7.14.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:6a3cb83d1552c0cd1b4906655b6a33fd4a8473229633a901c6b73bf86914dee9", size = 251174, upload-time = "2026-05-26T20:38:57.141Z" }, - { url = "https://files.pythonhosted.org/packages/85/10/e55307b622b3dd9671cb321824502dc10f93e72f2802b9946159a8edadeb/coverage-7.14.1-cp311-cp311-win32.whl", hash = "sha256:10274a1fbeb8ec5d72966e17bb198a3104257aca4ac09d98667c5f8aca8c8548", size = 222354, upload-time = "2026-05-26T20:38:58.727Z" }, - { url = "https://files.pythonhosted.org/packages/71/cf/107421693cfb71e4f1ca5bf70443f64d4161878068d07a3e51c7ad21d17b/coverage-7.14.1-cp311-cp311-win_amd64.whl", hash = "sha256:87ebdf787d4888e3f3f2d523eadc6e18c6d18c6d0eb173801a189641627fb37e", size = 223290, upload-time = "2026-05-26T20:39:00.413Z" }, - { url = "https://files.pythonhosted.org/packages/b8/1d/3e3644585eb29e9dafefb19555078529a4d7cce12bd21929664eea989277/coverage-7.14.1-cp311-cp311-win_arm64.whl", hash = "sha256:dd34767fa19848d35659ffc0a75314f58c7af3f1cd87ec521e8292a1238398a3", size = 221953, upload-time = "2026-05-26T20:39:02.159Z" }, - { url = "https://files.pythonhosted.org/packages/3d/b7/bdbb725ba02c5b42825b200c940f38b7a54fcad24627b7192f78f8110d76/coverage-7.14.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:a06c76364a9360e33d6d23769aefdf7f66f38e2ffb60ceb1baaa4989d83b695c", size = 220022, upload-time = "2026-05-26T20:39:03.702Z" }, - { url = "https://files.pythonhosted.org/packages/72/81/fdc0898a55c6219223291ec1a1fe89966ef212ce82276aa0899df84b5de0/coverage-7.14.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fad54e871165f6ec2f536063ac74c3104508a12963e64072ba44bd822de52b0c", size = 220379, upload-time = "2026-05-26T20:39:05.381Z" }, - { url = "https://files.pythonhosted.org/packages/de/72/de048c4a25e13bce59ac6a339351c10bdf2515e07459afcdaf04dc3143a2/coverage-7.14.1-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:84b535f00655ecafe1d929d1fb00ed5d6fa3051ea643ab2c161a3887b86f294b", size = 251888, upload-time = "2026-05-26T20:39:07.367Z" }, - { url = "https://files.pythonhosted.org/packages/28/30/300c343f68beb9d4cbb64ec81e58c5b6b80b56927f72d2b38654ac26e013/coverage-7.14.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:6b6b0853b895fe0e98cbfc580d1ec3393d9302b4b1e96a77b3f5c91fdab899e6", size = 254624, upload-time = "2026-05-26T20:39:09.037Z" }, - { url = "https://files.pythonhosted.org/packages/b1/ed/7b25642496e8170b6bac14adce00537c6e5fa2d586159401a4de3e8b49e6/coverage-7.14.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:442cc9c952b2df400cda54bb04ab87330cf2cd08a8692cbbea36773531eb6f37", size = 255739, upload-time = "2026-05-26T20:39:10.889Z" }, - { url = "https://files.pythonhosted.org/packages/7f/a2/abd210b8c4e29c24e4624916db97bb519097a91034aaeb767f937e7da794/coverage-7.14.1-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:8270544c361ed405a27a060dbc9ed2c124b084d96dfdc2d9a2510482aef981ad", size = 257998, upload-time = "2026-05-26T20:39:12.722Z" }, - { url = "https://files.pythonhosted.org/packages/7f/24/7c50beed3792fe62f6ce0545c6686ce83379719e2c0276179333d97eae92/coverage-7.14.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:48b283b1dd6372e8de2a7a9a4c4d5dc06f4d4fd209b876f3c88a7a205a0c8f84", size = 252296, upload-time = "2026-05-26T20:39:14.259Z" }, - { url = "https://files.pythonhosted.org/packages/15/05/0f874628ebcbfc77ead559ff210281ef06a97db08481832e7dd39274a135/coverage-7.14.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:5b0c99ba93a07d56f6df340bb79be53202a082b2fdb81bfe6190b741a3470d54", size = 253658, upload-time = "2026-05-26T20:39:15.923Z" }, - { url = "https://files.pythonhosted.org/packages/99/6f/ca6ad067364b337ef997802115e7ecad2abd2248b05471464b0dea02b4d4/coverage-7.14.1-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:e471bc5769ff073b058cfadb0d736b56ce067c8560eabeb0da88462df98c23e7", size = 251803, upload-time = "2026-05-26T20:39:17.537Z" }, - { url = "https://files.pythonhosted.org/packages/c0/30/b9b4d377cd9f40baf228068f5a81faf8450c6228503011bd499708483a50/coverage-7.14.1-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:f497a1ea81d4cd7c10ddcaa685135b9aabd291af3d55775a9ddf3cb7a364cdd9", size = 255873, upload-time = "2026-05-26T20:39:19.414Z" }, - { url = "https://files.pythonhosted.org/packages/3c/21/7c721a9e5e6bb88547d30a787aefb97512d3f54c1324c7488d9b3743f7f9/coverage-7.14.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:2222be86d0b54f5dd5a38f45f17f315f737245e857bf0bdedc70734f84a13c02", size = 251372, upload-time = "2026-05-26T20:39:21.169Z" }, - { url = "https://files.pythonhosted.org/packages/9d/8c/f8ae5a2200130e1503cd7661a6cd3b2b7bacef98277fbf3571fb13f8b766/coverage-7.14.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:85e85586565842f6932abebd4c18bcb1074223dc0b3576e7d173ca710622813a", size = 253245, upload-time = "2026-05-26T20:39:23.097Z" }, - { url = "https://files.pythonhosted.org/packages/34/62/70a9024672a5f6910517d9628c52c9afbdd3cf8f46426af52bb148a56fff/coverage-7.14.1-cp312-cp312-win32.whl", hash = "sha256:4a28fd227808366b196a75476dced2eb35b351d6766ba9c858dc93319e87f4f1", size = 222567, upload-time = "2026-05-26T20:39:24.868Z" }, - { url = "https://files.pythonhosted.org/packages/f6/81/8b7cd386839b039ebe1855733b9f9449a8dec5d79564018234f185a7fa70/coverage-7.14.1-cp312-cp312-win_amd64.whl", hash = "sha256:54acdb6674a4661768d7bf7db32dfb9f46ab1d764f8aba6df75ce1a6a088724e", size = 223372, upload-time = "2026-05-26T20:39:26.603Z" }, - { url = "https://files.pythonhosted.org/packages/ae/ba/b44d472022f620d289d95fa830143235c0c36461c6f2437ea8d51e5481ed/coverage-7.14.1-cp312-cp312-win_arm64.whl", hash = "sha256:99cd41ff91afd94896fea3bc002706b6ae4ce95727d06e4a0f39c0a8d8bd8b1a", size = 221989, upload-time = "2026-05-26T20:39:28.242Z" }, - { url = "https://files.pythonhosted.org/packages/8a/9e/5f6d56327c62b185225d145191c607e07515294a0aa6338e58805cd4a5ac/coverage-7.14.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:be9f2c802dcfce3f71298303aa5dad0dce440a76c52f2f60dacd8656dab78793", size = 220044, upload-time = "2026-05-26T20:39:29.902Z" }, - { url = "https://files.pythonhosted.org/packages/75/92/e82aca356744cbbc0f77a0b623e38918c1872361963413a3bab5d0340393/coverage-7.14.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:6223a72fd0e4c7156353ec0f08a5f93623e1d3034d0e2683b9bb8ea674131b1d", size = 220412, upload-time = "2026-05-26T20:39:31.561Z" }, - { url = "https://files.pythonhosted.org/packages/27/c9/385bde0bf7ed0f4bf3a7ee5367060a86b5d218718cfd6fb943c0f836b34f/coverage-7.14.1-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:7279d2110a28cebc738b6459ecda2771735a4c18465fbbd36b3288fe5ed92247", size = 251412, upload-time = "2026-05-26T20:39:33.337Z" }, - { url = "https://files.pythonhosted.org/packages/51/8c/23faf6a2343a0d17f960a4bd56c43bc7eb4cf312f774dd6ceebd82c7d8fc/coverage-7.14.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9eeb3fcbc13ba40dfbdb22d01d196a28e9cef9ed4c29b60061a1e0e823a9929d", size = 254008, upload-time = "2026-05-26T20:39:35.009Z" }, - { url = "https://files.pythonhosted.org/packages/42/06/36f4aa9ca8a815e6036156e80706a67828bb97bd826948244f6996dda957/coverage-7.14.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5f0cfc27c539f07cf5c0a4cfe211d0b6cae039f8f40526dbaa71944e64b50a7b", size = 255241, upload-time = "2026-05-26T20:39:36.71Z" }, - { url = "https://files.pythonhosted.org/packages/ca/79/95266316352f90f6b1c6736bb413302edfde2453fb32422d3911642691b3/coverage-7.14.1-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:221c70f316241a78e77e607c227cefc8808d4e08f28d99c04f35694690e940be", size = 257373, upload-time = "2026-05-26T20:39:38.412Z" }, - { url = "https://files.pythonhosted.org/packages/e3/9c/58316d1f66c488b5fca8a0eb3e98348807813efa8a0d0833b9021be27488/coverage-7.14.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:da028256b04ec30e5e0114b6f76172938c313991f0a2d3d894271315cf5d5e43", size = 251635, upload-time = "2026-05-26T20:39:40.268Z" }, - { url = "https://files.pythonhosted.org/packages/ef/5a/ca2398a568e16fed7bb713e84ba3603a7164fb65779abe645c565ec890d5/coverage-7.14.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:76a085d7005236a767e3426148b2c407e53ad61695c562f8a81da2d373324901", size = 253373, upload-time = "2026-05-26T20:39:42.145Z" }, - { url = "https://files.pythonhosted.org/packages/6e/2c/0396562c32deaebe7be51d865b3a41e9a87d7561acafe1a28f53b07e019a/coverage-7.14.1-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:b553d04b5e778a8e56d57eb134aff42a92718ecba45e79c4764ecfa40efd92ff", size = 251341, upload-time = "2026-05-26T20:39:43.907Z" }, - { url = "https://files.pythonhosted.org/packages/fd/8f/a94f9221184c9cae1ee115820e3798e48b6b17777a9f19e46fb9a0c8dc74/coverage-7.14.1-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:46f714d2fb8ae2f4f29f23ada7f1e79b759fff5a70f94a1dac23af204c3ec9e4", size = 255497, upload-time = "2026-05-26T20:39:46.166Z" }, - { url = "https://files.pythonhosted.org/packages/71/69/505d70e47db1eaebcd002c39759707621ef184cd6b1ae084d9f41293f323/coverage-7.14.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:1896f5e19ff3f0431c7ce2172adc54890fd97f86b59ced8ca1649145d9ffe35d", size = 251159, upload-time = "2026-05-26T20:39:48.03Z" }, - { url = "https://files.pythonhosted.org/packages/e0/aa/58681c383aa33a9d2ed40a02d7a22fbf780d1fa4d575396365777828198c/coverage-7.14.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:62fd185ef9df3c33d1c8178c5af105f762afbad96038de9a4ae100aa6297ca33", size = 252934, upload-time = "2026-05-26T20:39:49.872Z" }, - { url = "https://files.pythonhosted.org/packages/eb/fd/11c928cd6bdffc7074bb5965c173d9ebf517fb00205e1da524b98d29ef92/coverage-7.14.1-cp313-cp313-win32.whl", hash = "sha256:ab4af6352741a604c431c6072fce5bee33bf0f20dc7a56618d6bf6bb89e9810c", size = 222584, upload-time = "2026-05-26T20:39:51.68Z" }, - { url = "https://files.pythonhosted.org/packages/6f/92/fb416fc26d340dcba19518c418d6048e913186e17243982c5e435e41fa7a/coverage-7.14.1-cp313-cp313-win_amd64.whl", hash = "sha256:7af486dabe8954d03b087f0021540897afe084f04e16ff5579e08cc46f871416", size = 223394, upload-time = "2026-05-26T20:39:53.472Z" }, - { url = "https://files.pythonhosted.org/packages/73/c6/02d56e3867972f77d5036de924643f26c056e848f00452cafb4dbc3c29b4/coverage-7.14.1-cp313-cp313-win_arm64.whl", hash = "sha256:2224f89ffd0c5605ccce1ed7a584da162bc7c55f601ab1c946bc9de31a486b42", size = 222015, upload-time = "2026-05-26T20:39:55.374Z" }, - { url = "https://files.pythonhosted.org/packages/4d/9e/fcc77914050df73f7662fa1f00902774c79c075a8388ab334074574bf77e/coverage-7.14.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:de286598cc65d2b489411174b1faec2f5a7775fb3201fd925db2a76b4030f37d", size = 220733, upload-time = "2026-05-26T20:39:57.189Z" }, - { url = "https://files.pythonhosted.org/packages/f7/67/2963cbdaf5cbadec44efa3a1e39eaa1f02df4079585f05387607a221e126/coverage-7.14.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:042c46ded7c288aeb07cf14a28b6c1e10b78fcba40171c3fa1e939377eeef0b5", size = 221086, upload-time = "2026-05-26T20:39:59.019Z" }, - { url = "https://files.pythonhosted.org/packages/c8/c5/8701645574e11881f2f47d8930f98bc48b5d43b25eb5b4430dfc4a2f9f48/coverage-7.14.1-cp313-cp313t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:f4ddbe407477f04c45115d1a4e5bc480f753553b534d338d4c3358b1cdd0ea52", size = 262381, upload-time = "2026-05-26T20:40:00.822Z" }, - { url = "https://files.pythonhosted.org/packages/7c/28/7a64d73598263e0c5abd5084211a8474488d31b3c552ff531c719dfcff62/coverage-7.14.1-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:d13e6725992e2d2fd7d81d4f5241952d13740121dfd501da09201be39b2c003a", size = 264458, upload-time = "2026-05-26T20:40:02.506Z" }, - { url = "https://files.pythonhosted.org/packages/fa/d8/4969179db9f7eb4df218e69540adf829d1c835f59452513d065d15446802/coverage-7.14.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f747dc8edcfe740130f28f32f3995e955494285717e86ee25af51db2219df08a", size = 266884, upload-time = "2026-05-26T20:40:04.421Z" }, - { url = "https://files.pythonhosted.org/packages/a6/78/a45d5794dbc9bafd97afc96a4377c86c7820d78b6cf51b89bc1d4e919275/coverage-7.14.1-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ced2f09ef276fd58611a1ef502164ad266d2b75174e5a40cabbdb4033f9f6cf2", size = 268022, upload-time = "2026-05-26T20:40:06.298Z" }, - { url = "https://files.pythonhosted.org/packages/21/cb/4f5e354e9e3e67af96bd4e57113e6db6b22298c7168b13eec408a549903d/coverage-7.14.1-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b84800013769a78ccb9ef4659402e26d06867e337b61ec365f77ad008adea80e", size = 261631, upload-time = "2026-05-26T20:40:08.226Z" }, - { url = "https://files.pythonhosted.org/packages/ec/49/eced49af4cb996d5d8b7e94e736175c513e4facd3398507b89892b4326d8/coverage-7.14.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:ea8cd6ca0ee9f616aaef3afc6882e32c2cbf18b00d96313ffd76af650574034d", size = 264443, upload-time = "2026-05-26T20:40:10.137Z" }, - { url = "https://files.pythonhosted.org/packages/f1/d8/5603a88a7c5913a6b54f6cb1a8c46f7b39cbb30f27cd3f492908da09b2d7/coverage-7.14.1-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:aa5e304a873fabddc11e484e9b6b738bd38bd7bed17b09aa84eecf5332e8b8bb", size = 262069, upload-time = "2026-05-26T20:40:11.999Z" }, - { url = "https://files.pythonhosted.org/packages/f0/59/2ae3cb79da554a06c8619d6c88ea19dd1e4aed4b834b6a83bb1fa243bdc5/coverage-7.14.1-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:5a1c5215be81035e629d5bc756650634d0bf31991038db7a0eccb90f025ce16d", size = 265780, upload-time = "2026-05-26T20:40:13.858Z" }, - { url = "https://files.pythonhosted.org/packages/af/5f/b130c1dc999031f2648bd25317fbce505ad8d5562079b4ed81e736a84967/coverage-7.14.1-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:79058c47dae6788504b5effb319961bcd72d7240551464b91d474bc0ed186d69", size = 260970, upload-time = "2026-05-26T20:40:16.142Z" }, - { url = "https://files.pythonhosted.org/packages/87/d1/ec13ccddeb48ec963bdfa72a11224bac2584bd045ba13beca82f8113e9c7/coverage-7.14.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:370c5afae3fa0658e11694a32b24c2778f6bc2d17718121f94ee185e69f26b54", size = 263157, upload-time = "2026-05-26T20:40:18.382Z" }, - { url = "https://files.pythonhosted.org/packages/cf/c2/cd91ead503045161092d3845f7bb95ea2f25131ce96d3e314dd835d91b9c/coverage-7.14.1-cp313-cp313t-win32.whl", hash = "sha256:3758dd0a7f1fa57365ef2e781df0f0731d38b6e3772259d13dae4bd8a958d4b1", size = 223259, upload-time = "2026-05-26T20:40:20.381Z" }, - { url = "https://files.pythonhosted.org/packages/71/9f/1e28d97e6bd2c76b07f38b7c02870f1371255ff6717f54eca578fcbbdd0e/coverage-7.14.1-cp313-cp313t-win_amd64.whl", hash = "sha256:6ff665fb023a77386fe11685190cee1f60a7d635994a30d9b0a061533d470fce", size = 224320, upload-time = "2026-05-26T20:40:22.316Z" }, - { url = "https://files.pythonhosted.org/packages/a9/e0/d936e908f0e1efa55e52b91e01b52f1055cef5e1ab2718493390ed8e2fb8/coverage-7.14.1-cp313-cp313t-win_arm64.whl", hash = "sha256:17a5a241e5997621a956a7f402a7433ef4221e5152809b785bec79e2323799f1", size = 222577, upload-time = "2026-05-26T20:40:24.894Z" }, - { url = "https://files.pythonhosted.org/packages/d6/34/fc2f101b151af3799a101f0550b0454aa008afdc0add677394ec4aa8ea10/coverage-7.14.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:d5ed429d0b8edaac649e889b4ffcedb6c80b06629a3f93050e3dddfb99235bee", size = 220091, upload-time = "2026-05-26T20:40:27.249Z" }, - { url = "https://files.pythonhosted.org/packages/3d/a7/1ebae2ab5b961b5c79bb09fe7b3ac99edb190d8be4a8c510b2cf66f46468/coverage-7.14.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:8011224a62280e50dab346960c03cf47aca1a1e09e608c0fb33fd6e0cc8e9500", size = 220421, upload-time = "2026-05-26T20:40:30.084Z" }, - { url = "https://files.pythonhosted.org/packages/5e/90/92aca9cf0acc95123c96cd1eb1f08917897a7f5dee01e15738922971ec31/coverage-7.14.1-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:12c42ec1e14f553c4f817e989365982e646e27211f10a0f717855b94a79c8906", size = 251466, upload-time = "2026-05-26T20:40:32.542Z" }, - { url = "https://files.pythonhosted.org/packages/26/2b/78048cbe3b999f6cbf9cc0d90abba6a88a3e0863a8c1c6cbc762f3f8802f/coverage-7.14.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:06144cd511cf2624873a035c5069cf297144f6e77a73ee3d7a55b605ec5efb42", size = 253973, upload-time = "2026-05-26T20:40:34.473Z" }, - { url = "https://files.pythonhosted.org/packages/8e/21/c2e33b29d1cfde484a19d437afc343c6cd30b08d78cbbf9f5aff14e57b2b/coverage-7.14.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a311d8e1da24be5c1ccf85cbfb06315dbaa1703d5a1eab3f6432c72b837917c8", size = 255318, upload-time = "2026-05-26T20:40:38.154Z" }, - { url = "https://files.pythonhosted.org/packages/8e/ee/aad2f108d63b769121005302f16bf66db8625c88ceaba466942e09a2607e/coverage-7.14.1-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:c79cead5b5bc584d9c71451cb984d0e3a84e0c0937379c8efcbf27c8d661b851", size = 257633, upload-time = "2026-05-26T20:40:40.164Z" }, - { url = "https://files.pythonhosted.org/packages/c2/f8/11a2c29b4fd76d9849f81d0bb812ec0017a9396df3217214e38934a8c837/coverage-7.14.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:dcbf65f1f66a26cdd88c35cf68fb4729c5d1cd2e88added72420541dfb212034", size = 251488, upload-time = "2026-05-26T20:40:42.631Z" }, - { url = "https://files.pythonhosted.org/packages/c9/b8/9a5820de4b8ac2b71d85e3b5fb49108d7469c665f0e2ad0dd7569023e305/coverage-7.14.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:fd86572566fb40189a8260446158235159bc7a82dfbc87a3b39cf4fb57fcec1c", size = 253329, upload-time = "2026-05-26T20:40:45.208Z" }, - { url = "https://files.pythonhosted.org/packages/6b/ff/f33e4823667e27548e8fd8df44217515303f9808d0ff29817db56f87d990/coverage-7.14.1-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:7771b601718fdde84832c3a434ca9bbf4ae9adbc49d84198b4110700c3c77c36", size = 251291, upload-time = "2026-05-26T20:40:47.502Z" }, - { url = "https://files.pythonhosted.org/packages/68/9b/489db0ebb209054766b90a9014a45f6d26eb724c02ec21311c3733b5a644/coverage-7.14.1-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:39b21e212c55af06fa375e3dbf90a8a8e38792f3a910c580066d23563830ddd5", size = 255564, upload-time = "2026-05-26T20:40:49.372Z" }, - { url = "https://files.pythonhosted.org/packages/27/b5/16bc2d4c2409b23c7737edb68c83bc89e345f378050549fe1d75ac7d34d5/coverage-7.14.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:f2302660e32562a532b442480121aef8aa61a5bdb20b30bf0adab29f10a5a4b4", size = 251107, upload-time = "2026-05-26T20:40:51.677Z" }, - { url = "https://files.pythonhosted.org/packages/7d/0c/2629997469a00cd069d588a41c9dc887610f2775ae89d250c4791e65272a/coverage-7.14.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:03a6f93c1ec3b7f2e77b5dbcc5573a2c21f12529a5c6bbe0f16f72303cc2fa4d", size = 252764, upload-time = "2026-05-26T20:40:54.267Z" }, - { url = "https://files.pythonhosted.org/packages/d2/ee/f78d63c8f079e0d7211c7e2401fa17e311514534ba61bae03e4b287ce4ab/coverage-7.14.1-cp314-cp314-win32.whl", hash = "sha256:8a3ce026d73290f42f08dafecbd82c193a74df280461fbf97300fec51fd133ee", size = 222837, upload-time = "2026-05-26T20:40:56.496Z" }, - { url = "https://files.pythonhosted.org/packages/dc/b9/be539854f93a70dfbeec69117f33ec70dc42ff0b65b5b07ab8d40d04228e/coverage-7.14.1-cp314-cp314-win_amd64.whl", hash = "sha256:114c95ef29302423b87d159075805f4ab973254a2638a5d7d046c94887cc87d7", size = 223650, upload-time = "2026-05-26T20:40:58.351Z" }, - { url = "https://files.pythonhosted.org/packages/fe/9e/24e2842fef40f35ac82ba3a7719c8023d011bf3bf652d0675316a9d088a1/coverage-7.14.1-cp314-cp314-win_arm64.whl", hash = "sha256:a07891c3f4805442b31b71e84ba3cf29ed1aa9a428284e06deeb4b23e5b46343", size = 222218, upload-time = "2026-05-26T20:41:00.321Z" }, - { url = "https://files.pythonhosted.org/packages/0a/1d/ac0a9df5fe31c1e8bdd658074905fc12844a05c1a7e3fdb8417e97c31e23/coverage-7.14.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:1101a5ebb083aecb625ebb6209d4105b58f647b093cb2dc8122d7b33f743cfe1", size = 220822, upload-time = "2026-05-26T20:41:02.281Z" }, - { url = "https://files.pythonhosted.org/packages/32/cf/f964fd9aff20323f9f1a726c97135f8a76bcd87b92dad141a456a43f3c64/coverage-7.14.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:851b9e1e4e8a4608e77c79714b2e77c0970d2ed7202a05e92ae407817481887b", size = 221084, upload-time = "2026-05-26T20:41:04.593Z" }, - { url = "https://files.pythonhosted.org/packages/d8/5e/7e5ef2aba844de2b80d678619fcf0841b42e3f37f16411226f3fe4c1016f/coverage-7.14.1-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:d5b89cdfb2ee051b71e8c3c70bd81a9eff81100f736a269136fe1a68efe00474", size = 262454, upload-time = "2026-05-26T20:41:06.641Z" }, - { url = "https://files.pythonhosted.org/packages/64/62/75809bded87015cc4935524218a2a8ed8dd1a8498bfed30a2f4f7a4b4d34/coverage-7.14.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:0177614a0370f227888b4e436a7c55686d6a9f90eb1ade2b624ba685a1686e86", size = 264578, upload-time = "2026-05-26T20:41:08.556Z" }, - { url = "https://files.pythonhosted.org/packages/f3/42/d33392dc14633525012d2d504fa1a33b05538bf535f5c1d64675e5754b78/coverage-7.14.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2d69af5dea2de76fc485a83032a630523f985198b7e25be901ec60181587b01e", size = 266981, upload-time = "2026-05-26T20:41:10.824Z" }, - { url = "https://files.pythonhosted.org/packages/2a/49/0157c4428c2aca7f1e09d5565930586fd5ae36f1655f08b0daa7cf1fcae1/coverage-7.14.1-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:35ab22d91de736e8966b980dc355cbcdd2c6dbbcfe275f9a2991bc8a91b3df65", size = 268112, upload-time = "2026-05-26T20:41:12.966Z" }, - { url = "https://files.pythonhosted.org/packages/96/26/86b9ce71f4092b1ed325ce1421698081df1286b833400b6836912834d6e0/coverage-7.14.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:357d4e32935c36588aaba057d734fa32428c360c9fc2e4442afbf1b646beee6e", size = 261558, upload-time = "2026-05-26T20:41:15Z" }, - { url = "https://files.pythonhosted.org/packages/20/4c/c311210c5472cf5401d8422b0d7812cdd520f24417673afabda6c323faca/coverage-7.14.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:51bd64741cc6fa065abd300ede1afe5a5291ece9c31da8b24884deda48bcc3f8", size = 264447, upload-time = "2026-05-26T20:41:17.369Z" }, - { url = "https://files.pythonhosted.org/packages/fb/71/59513f8710ed3e6b0ac0a050a5b7e977bb9c9e880354863b5d00d8809256/coverage-7.14.1-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:9132cd363a68a4c3daa7c8704a654b1e39d3360f6f5b8ddd470608a945236c07", size = 262048, upload-time = "2026-05-26T20:41:19.309Z" }, - { url = "https://files.pythonhosted.org/packages/84/8d/bceed32dc494f5bbf50f775cd2e78ca814953942b5ea28d3c1c3ac316f14/coverage-7.14.1-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:07c6290b1697b862c0478eab545eec949a0d0e4d6d03497f446d706da3b4f2de", size = 265781, upload-time = "2026-05-26T20:41:21.559Z" }, - { url = "https://files.pythonhosted.org/packages/e7/c5/9348fe40dbfd4991aaf78df2c6c3098bfb2cc834d1fd362a64b4efef855a/coverage-7.14.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:5ea0c297e27133853b4d8a3eb799bff5a2dbd9f2f41537a240d337ac9b4df890", size = 260896, upload-time = "2026-05-26T20:41:23.428Z" }, - { url = "https://files.pythonhosted.org/packages/ca/92/1ea0f03929da7cf87206b1fa24f4c8e9c158be0455481af29ec0a1f3503f/coverage-7.14.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:01b7733daad0237daa01ef80fe2dfceffc911e6a17fa7b55d14aa8214eaaaecd", size = 263214, upload-time = "2026-05-26T20:41:25.419Z" }, - { url = "https://files.pythonhosted.org/packages/f6/a9/b2493c054c0e01a643266742ab45e15744e60743f9260cd930c7142b1124/coverage-7.14.1-cp314-cp314t-win32.whl", hash = "sha256:6adc5a36984624a70bf11d7184e20fa0a49aa7c47ffab43804106a1a695ea22e", size = 223624, upload-time = "2026-05-26T20:41:27.795Z" }, - { url = "https://files.pythonhosted.org/packages/fc/bd/3e1e6a57fccd2d7c83fcdf338e93ba98eb85c6e877dd34731ac585375490/coverage-7.14.1-cp314-cp314t-win_amd64.whl", hash = "sha256:ddf799247318f34dbcd2efa8c95a8d0642674e926bb1774cf9b63dfd2a389d1c", size = 224728, upload-time = "2026-05-26T20:41:30.098Z" }, - { url = "https://files.pythonhosted.org/packages/bb/d7/31066cf1d2f0c6c797fce911bcfa01dd35642dc6da992a950256097c5860/coverage-7.14.1-cp314-cp314t-win_arm64.whl", hash = "sha256:145986fe66647eb489f18d9a997567a3fd358584c4b5a808769113abc07466af", size = 222752, upload-time = "2026-05-26T20:41:32.123Z" }, - { url = "https://files.pythonhosted.org/packages/8a/3c/1a983b9a745d7f83d53f057bcc5bf79ba6a2bbc08266b3f0c7d6fe630c9b/coverage-7.14.1-py3-none-any.whl", hash = "sha256:a252f21c27e38347e60111a3266b03827422a7d5525951aceee313aa68bab1d2", size = 211815, upload-time = "2026-05-26T20:41:34.078Z" }, + { url = "https://files.pythonhosted.org/packages/2a/97/c52dc440c390b6cfa87be9432b141a956e2d56d9b9f5fc8bd71c5f471722/coverage-7.15.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:50913d4bf5ddafa6ca3693da5e4dd833dd1b772e0283c99ca7f7d287db67331a", size = 220539, upload-time = "2026-07-02T13:08:19.252Z" }, + { url = "https://files.pythonhosted.org/packages/3f/26/602de8c2aec7e2e3e99ebfb8e04ba65598f746275396eea5f6794ff4673f/coverage-7.15.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:359e141ccd33893ce3f1ad5525f8b96083003677c82182e5907d62d4ea5799fc", size = 221058, upload-time = "2026-07-02T13:08:21.013Z" }, + { url = "https://files.pythonhosted.org/packages/fc/13/ebab0743138891c1d646d61e247ec29639afcbb6c4e1905e6a0f0c75291a/coverage-7.15.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:3200b6204935f928c64b2ca1f923ab8c1acb7c9de45ec61569711b34d25cccaf", size = 247797, upload-time = "2026-07-02T13:08:22.474Z" }, + { url = "https://files.pythonhosted.org/packages/d3/b7/b6ffb9e042aa48dc4144a8a65529affaec8dca0685309353614a2a7386ad/coverage-7.15.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:be616bf61346883b2cfdc5178669647e03531d81ab761a7e378558b7e8bcb628", size = 249626, upload-time = "2026-07-02T13:08:23.803Z" }, + { url = "https://files.pythonhosted.org/packages/9c/06/243ff05b652333d8e3d060c11223efc2723b19cacf6605e433fa686ab5d4/coverage-7.15.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cc7bafc3fe1059463a8fdd97ca79972d6e2bf819d775c7d54991b5b1971201d6", size = 251493, upload-time = "2026-07-02T13:08:25.397Z" }, + { url = "https://files.pythonhosted.org/packages/d3/2b/867faa17030a806114dae388b32a3fa929d8cd4bf39226fbc11f6e6bb705/coverage-7.15.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b713aa7fcf325a01d4184d848acb46fd84f78fdb0978470c636b23a06a753d91", size = 253406, upload-time = "2026-07-02T13:08:26.842Z" }, + { url = "https://files.pythonhosted.org/packages/94/c0/d789ce18f6605afc4895db75723424be2ef494282f77f61d8e5832923183/coverage-7.15.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e38e6fba2d56652fdfaf0231f8f78aeb805234a912de25dc291ee5cce5b8faa4", size = 248512, upload-time = "2026-07-02T13:08:28.398Z" }, + { url = "https://files.pythonhosted.org/packages/c9/b6/b2673c30739f4a2e06649a0a38ad8b093c4d865462dc7bab0e9524a2c3b1/coverage-7.15.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:884499f42e382675be80770391983b90e0c0c774d87dbeeebf5f991cf6612b20", size = 249532, upload-time = "2026-07-02T13:08:29.731Z" }, + { url = "https://files.pythonhosted.org/packages/3c/2e/acd79e9a41beabee92b623afe4f30b549916f48566271475f2907e752828/coverage-7.15.0-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:840481b12e083dbcbafab14794a8781a958edf327c8d3d70b4eee42f9b8253aa", size = 247537, upload-time = "2026-07-02T13:08:31.173Z" }, + { url = "https://files.pythonhosted.org/packages/12/d4/2d301c4d1b3238d7c88b70ab9d13fd53ed9505662a7ff1b46ba1e2e4e3c3/coverage-7.15.0-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:276646e9481703d09f854f3b2f018f24e19fd7049ae670a92570043eb97203b1", size = 251348, upload-time = "2026-07-02T13:08:32.63Z" }, + { url = "https://files.pythonhosted.org/packages/35/bb/c67708b2bc00f32e12805ec23d5fa677a0a51652f449341a89f9d6b1b715/coverage-7.15.0-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:4de4b4d3f5545aa6c60dc4efd9c63b5b5dcc3bf00fe83146b2bdfffb8f6613bd", size = 247806, upload-time = "2026-07-02T13:08:33.931Z" }, + { url = "https://files.pythonhosted.org/packages/eb/6c/57c4f653c47a6e917748f8938e389e72fbcae44e3643cd906664f0477a13/coverage-7.15.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:5c504097b2a89b1e85bc6070d920df77daec701337e3aeef2c17775a5dd0ca90", size = 248410, upload-time = "2026-07-02T13:08:35.189Z" }, + { url = "https://files.pythonhosted.org/packages/6c/94/bb083041aef828903668f134273f319f2bd49224962875359c52faa5497f/coverage-7.15.0-cp310-cp310-win32.whl", hash = "sha256:f6e80ed91f98316e86b9c137206b04b2bcfbffccbdff49bd2eb09dddb1cf14e0", size = 222588, upload-time = "2026-07-02T13:08:36.486Z" }, + { url = "https://files.pythonhosted.org/packages/ef/94/a09d8ee618956f626741b0734854bac4425a00e10c0565f5abca64e7e751/coverage-7.15.0-cp310-cp310-win_amd64.whl", hash = "sha256:b3b3e22030f3f6f5e01a5ce69936552a5c0f6992b7698777377b99041961031f", size = 223214, upload-time = "2026-07-02T13:08:37.885Z" }, + { url = "https://files.pythonhosted.org/packages/ae/23/82e910835ef4b8391047025e1d53aa48d66029f444eb8b25373c849bf503/coverage-7.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:003fff99412ea848c0aaebcc78ed2b6ce7d8a1227ed17e68470672770b78a02a", size = 220662, upload-time = "2026-07-02T13:08:39.205Z" }, + { url = "https://files.pythonhosted.org/packages/6d/0d/c7b213dde2f1579de5231062b386d8413f79c11667eb58c39319b25991da/coverage-7.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:5cbd804bf2784ce7b45114516050f346ecd50f960c4bb630a7ee9e1d78fa2118", size = 221168, upload-time = "2026-07-02T13:08:40.471Z" }, + { url = "https://files.pythonhosted.org/packages/33/77/d000aeedfac085088337b3c7becdad328474b1f8a9e4c9368a0c99605d68/coverage-7.15.0-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:8773e15c23305b58882a4611fb9b2755977eae0dc2e515366a1b6c98866cc4c2", size = 251587, upload-time = "2026-07-02T13:08:42.033Z" }, + { url = "https://files.pythonhosted.org/packages/cc/e0/86787c56b9df17afd370d5e293515dd4d9a107a561d13054873eefad8ecc/coverage-7.15.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f50e40081494c1dc4239ebb202014cbcc3306ea96fb6302a34c8cc0967fc5ae8", size = 253497, upload-time = "2026-07-02T13:08:43.387Z" }, + { url = "https://files.pythonhosted.org/packages/3f/02/181bc917359299c07dead6270f94e411151c8b60cec905c33499da69afe6/coverage-7.15.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:daf96f37f5fc3a7b6c6da862eb4aee61c426bd63da236ed4a73ef0e503b4bca5", size = 255607, upload-time = "2026-07-02T13:08:44.897Z" }, + { url = "https://files.pythonhosted.org/packages/b9/35/ca5e7427699913da6788c4f910e73ab16c5f4b59ec5d3a999dce2a45112f/coverage-7.15.0-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:51aa20f6ae2788fd197747766edf4cd8234fd9423309b934257fa6b21a592723", size = 257563, upload-time = "2026-07-02T13:08:46.334Z" }, + { url = "https://files.pythonhosted.org/packages/0b/4d/b8220bacc2fc3c4e9078e27c32e99fb411479a4718a72bdd00036a9891c8/coverage-7.15.0-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:03d1f922757662eb7af586e77834792274cff776bc7b1d1a0b66a49ea9d84735", size = 251726, upload-time = "2026-07-02T13:08:47.941Z" }, + { url = "https://files.pythonhosted.org/packages/c4/e4/2e145da1991d72189b9c3cf7eca05c716ee7080d099aaea6757cfc7df008/coverage-7.15.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:a6d6acc9a7666245e6133dd15144ca038a85a9cd5026bb06d6bbae9e77440dc9", size = 253301, upload-time = "2026-07-02T13:08:49.5Z" }, + { url = "https://files.pythonhosted.org/packages/72/28/d2c841d698bf762e481f08bd4839d370246b6d9b61dab085a7b20b201a08/coverage-7.15.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:1ac2c4c27c7df851dc9a017c2d7de00b69147e84ba3d96f37a530b0b6fb51035", size = 251361, upload-time = "2026-07-02T13:08:51.304Z" }, + { url = "https://files.pythonhosted.org/packages/9d/ed/55d9ffde994fba3897c0c783f77a7d053b0c18787f6892ed5b0aed73f469/coverage-7.15.0-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:b761a1d504fd4bd1f20f418753964dca9f5862a511fc854dac58296b3b223671", size = 255129, upload-time = "2026-07-02T13:08:52.661Z" }, + { url = "https://files.pythonhosted.org/packages/1d/c0/ecbf33b8c460ea2718aeb813e2df8140d0370e5f67261c31524ceb0a2a8d/coverage-7.15.0-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:e43b045e11c16e897895758ae90e4a90cf99e93d58549e2f90c0e2272e155695", size = 251081, upload-time = "2026-07-02T13:08:54.188Z" }, + { url = "https://files.pythonhosted.org/packages/a9/de/fb87b4261f54448dd2b9504ef19a58be42cef0d9520595fbfe1219b15234/coverage-7.15.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:589b54513e901739f4b4582c705ce96b80c96f57641b1464607e2367a270e540", size = 251988, upload-time = "2026-07-02T13:08:55.726Z" }, + { url = "https://files.pythonhosted.org/packages/df/27/3494d5f291b9a4cb868f73c11221a8bd2d5bd761a8f9acea61ff57128dd1/coverage-7.15.0-cp311-cp311-win32.whl", hash = "sha256:106781b8482749162d0b47056937ba0933508e5d9447f65a5e7d5c422f0d6bb4", size = 222754, upload-time = "2026-07-02T13:08:57.091Z" }, + { url = "https://files.pythonhosted.org/packages/2a/ee/cd4847ebc9be6a9c0123d763645a6f1f3be6b8c58c962706368b79cbac07/coverage-7.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:821e92b3631d762a339695824cadbbc73020354eba2a23a551a99ad34938fbe6", size = 223225, upload-time = "2026-07-02T13:08:58.594Z" }, + { url = "https://files.pythonhosted.org/packages/57/37/5011581aa7f2be498b97dcc7c9902192442a42f4f9a748aeadb3d6506b42/coverage-7.15.0-cp311-cp311-win_arm64.whl", hash = "sha256:309990eb5fb8014b9f67cb211f7fd41876ec8a88a88d3ae76de0ed1d611e3640", size = 222774, upload-time = "2026-07-02T13:09:00.074Z" }, + { url = "https://files.pythonhosted.org/packages/2a/74/fd4c0901137c4f8d81a76ada99e43c65163b4c94a02ece107a4ec0c6b615/coverage-7.15.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b75ee5e8cb7575636ac598719b4307ac529ec8fcd79608a35c3cd4d4dada812d", size = 220838, upload-time = "2026-07-02T13:09:02.084Z" }, + { url = "https://files.pythonhosted.org/packages/0f/2e/2347583467bd7f0402635101a916961915cc68fce652cd0db5f173ea04fc/coverage-7.15.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:ffb31267816b93b075302248cc1737506081b4f163df4401e9df1a6424aafabe", size = 221197, upload-time = "2026-07-02T13:09:03.617Z" }, + { url = "https://files.pythonhosted.org/packages/f0/17/99fa688541ae1d6e84543a0e544f83de0c944815b63e9e7b1ed411d15036/coverage-7.15.0-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:e4d0bb73455bf97ab243a8f12c37c686ccf1c13bb614b7b85f1d062f06f42b2c", size = 252705, upload-time = "2026-07-02T13:09:05.059Z" }, + { url = "https://files.pythonhosted.org/packages/fb/02/6a95a5cd83b74839017ef9cf48d2d8c9ae60af919e17a3f336e6f9f1b7bd/coverage-7.15.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:20d9ccc4ebd0edc434d86dfd2a1dd2a8efa6b6b3073d0485a394fee86459ebb4", size = 255441, upload-time = "2026-07-02T13:09:06.559Z" }, + { url = "https://files.pythonhosted.org/packages/67/f2/406f6c57d600f68185942422c4c00f1a3255d60aee6e5fd961425cd9987e/coverage-7.15.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:20c8a976c365c8cb12f0cbd099508772ea41fb5fa80657a8506df0e11bd278c5", size = 256556, upload-time = "2026-07-02T13:09:08.197Z" }, + { url = "https://files.pythonhosted.org/packages/74/8e/d3fa48489c15ecdec1ba48fd61f68798555dddd2f6716f9ad42adeb1a2a9/coverage-7.15.0-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f948fd5ba1b9cbca91f0ae08b4c1ce2b139509149a435e2585d056d57d70bf01", size = 258815, upload-time = "2026-07-02T13:09:09.691Z" }, + { url = "https://files.pythonhosted.org/packages/47/2e/2d40ddd110462c6a2769677cf7f1c119a52b45f568978fc6c98e4cc0dd0f/coverage-7.15.0-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f58185f06edf6ad68ec9fb155d63ef650c82f3fbd7e1770e2867751fb13158f4", size = 253117, upload-time = "2026-07-02T13:09:11.212Z" }, + { url = "https://files.pythonhosted.org/packages/51/c0/310782f0d7c3cb2b5ac05ba8d205fe91f24a36f6bf3256098f1782181c38/coverage-7.15.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:02adc79a920c73c647c5d117f55747df7f2de94571884758ce8bc58e04f0a796", size = 254475, upload-time = "2026-07-02T13:09:13.029Z" }, + { url = "https://files.pythonhosted.org/packages/86/f7/702da6c275f8ae6ade423d2877243122932c9b27f5403003b9ef8c927d12/coverage-7.15.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:6eb7c300fbed667fd6e3588eba71c1904cdb06110ca6fdf908c26bdd88b8e382", size = 252619, upload-time = "2026-07-02T13:09:14.699Z" }, + { url = "https://files.pythonhosted.org/packages/fb/84/c5b15a7e5ecba4e56218d772d99fe80a63e63f8d11f12783723a6005ab45/coverage-7.15.0-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:b5fb23fa2de9dce1f5c36c09066d8fcda16cd96e8e26686caa2d7cb9b567d65c", size = 256689, upload-time = "2026-07-02T13:09:16.103Z" }, + { url = "https://files.pythonhosted.org/packages/95/2f/c8b07559b57701230c61b23a953858c052890c12ef568d81780c6c46e92e/coverage-7.15.0-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:cec79341dbe6281484024979976d0c7f22beae08b4a254655decd25d42cbe766", size = 252189, upload-time = "2026-07-02T13:09:17.828Z" }, + { url = "https://files.pythonhosted.org/packages/6b/80/6d2f049dd3fd3dbfd60b62ba6b2162a04009e2c002ce70b24cf3878dec7a/coverage-7.15.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:6c664c5444b1d970b1b2a450e21fb19ee5c9cfdf151ded2dda37260031cca0da", size = 254059, upload-time = "2026-07-02T13:09:19.304Z" }, + { url = "https://files.pythonhosted.org/packages/ce/92/b0287a2c42031d25c628f815f89a3cd9f8268ee78bb1252c9356cda1c689/coverage-7.15.0-cp312-cp312-win32.whl", hash = "sha256:5f764a3fa339bde6b3aa97657f5a6a3a9451e4a5b4ea98a2892c773a43525f77", size = 222893, upload-time = "2026-07-02T13:09:20.812Z" }, + { url = "https://files.pythonhosted.org/packages/a9/69/e34c481915fecb499b3146975061dac528752e37706edc1804f32c822469/coverage-7.15.0-cp312-cp312-win_amd64.whl", hash = "sha256:52f9a4d2c4c56c8848bc2f524916698354b0211488b38c49ad9ae54f6cafbff6", size = 223429, upload-time = "2026-07-02T13:09:22.315Z" }, + { url = "https://files.pythonhosted.org/packages/fe/98/6e878f0b571d32684ef3f38d7c03db241ca5b82a5da8a5391596a8f209c4/coverage-7.15.0-cp312-cp312-win_arm64.whl", hash = "sha256:31e5c3e70c85307ea35a12964e2e40f56ca2ee4b1c8c721ccf4609d17071080b", size = 222810, upload-time = "2026-07-02T13:09:23.812Z" }, + { url = "https://files.pythonhosted.org/packages/76/04/145a3748098bcc86b631a85408d2c3dc5c104e0bd86d605468239b25b6c4/coverage-7.15.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:5be4caf3b28836f078abe700f8944dac4a65d78f16d6c600c89cb624e5535782", size = 220863, upload-time = "2026-07-02T13:09:25.371Z" }, + { url = "https://files.pythonhosted.org/packages/a4/5c/4ed55708fed2c64b63c9bc5715daef670872202101938869b7fe5d5fbb8f/coverage-7.15.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:dd58ad1404704303ca8d4f4b8a1095e7cbc7040ef17a66df1e6619aa10176430", size = 221230, upload-time = "2026-07-02T13:09:26.897Z" }, + { url = "https://files.pythonhosted.org/packages/7b/19/3a80b97d3b2a5c77a01ae359c6bed20c13738fe3d9380f08616d4fec0281/coverage-7.15.0-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:bbcbb317c2e5ded5b21104af81c29f391be2af98d065693ffbe8d23949b948e5", size = 252227, upload-time = "2026-07-02T13:09:28.543Z" }, + { url = "https://files.pythonhosted.org/packages/a1/fa/b70062750686bd7da454da27927622f48bbac6990ac7a4c4a4653e7b0036/coverage-7.15.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:27f31ecb458da3f859aab3f15ada871eb7a7768807d88df4a9f186bb17737970", size = 254823, upload-time = "2026-07-02T13:09:30.177Z" }, + { url = "https://files.pythonhosted.org/packages/a9/09/dad6a75a2e561b9dc5086a8c5257a7591d584246f67e23e70d2995b89ab6/coverage-7.15.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:13fb759be317fdc62e0f56bffdf61cfcb45c7761ad6b71e3e583e71a67ae753c", size = 256059, upload-time = "2026-07-02T13:09:31.979Z" }, + { url = "https://files.pythonhosted.org/packages/e6/e7/b5d2941fa9564573d44b693a871ff3156f0c42cbefe977a09fa7fdc59971/coverage-7.15.0-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d5cf007add5ab4bb8fa9f4c77e3732127c9e6cad501d7db43355fbfafca0be84", size = 258190, upload-time = "2026-07-02T13:09:34.035Z" }, + { url = "https://files.pythonhosted.org/packages/7c/1d/8e895bcde3c57ccd46d896dda5f2b3d5df761a1b0c6c9d450d175dedc632/coverage-7.15.0-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:cc78d9843bd576fbe2118248258d485e968dc535f95ed504a7b0867ba9b51389", size = 252456, upload-time = "2026-07-02T13:09:35.765Z" }, + { url = "https://files.pythonhosted.org/packages/14/4c/f6997da343ddeb959be82c3b05322793f92c071ad45f7cb8a96336e2dd5f/coverage-7.15.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a263060f1de0b4b74b4e089c2a70b8003b3781c733329a9c8fd54995328f9950", size = 254192, upload-time = "2026-07-02T13:09:37.445Z" }, + { url = "https://files.pythonhosted.org/packages/17/27/a0bc09d032267b9da89d95a2d874cfbef2a5aebbf0e87cf7aba221d79a99/coverage-7.15.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:c48decf16e0dfd5b049c7d5e82200c23c08126719142998d4f172444e3d0529e", size = 252153, upload-time = "2026-07-02T13:09:39.422Z" }, + { url = "https://files.pythonhosted.org/packages/54/c0/77fc233d9fba07b244c40948c53fe27308b8f21732fb3417f87fbd6fd992/coverage-7.15.0-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:08fb028000ed0aaa0a4cbdfbb98be7cb42f370db973fbbb469733505ab20e13e", size = 256310, upload-time = "2026-07-02T13:09:41.006Z" }, + { url = "https://files.pythonhosted.org/packages/d5/24/601cecfb5825becacb8d45219a018a3b55b9dbaec624efdb0ea249d08be2/coverage-7.15.0-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:fb7dc0c3b7d8a1077abea0b8546ebc5e26d6ef6ecefc2f0f5ad2b8a53bdad837", size = 251974, upload-time = "2026-07-02T13:09:42.733Z" }, + { url = "https://files.pythonhosted.org/packages/47/1e/6f45e5a5b3d5484318d368702af6716b5ab8913b0428bec981a562fcf296/coverage-7.15.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6cb3602054ccbe9f0d8c2dc04bbeba90d5719236e2cd06e042ddd6d3fc7b6e37", size = 253745, upload-time = "2026-07-02T13:09:44.376Z" }, + { url = "https://files.pythonhosted.org/packages/8e/db/4df027a77bd11d0e527f44c53557c76e54ad027413d0304252ea3a78d67e/coverage-7.15.0-cp313-cp313-win32.whl", hash = "sha256:0bf781da64326b677be344df505171435b6f58716108606621d5d27d964fff8b", size = 222902, upload-time = "2026-07-02T13:09:46.122Z" }, + { url = "https://files.pythonhosted.org/packages/a0/10/0355894d34e231f2c5449e71287e81a50793a325df2e2b027b7bcd9dfd19/coverage-7.15.0-cp313-cp313-win_amd64.whl", hash = "sha256:2c57a275078ee3fa185f83e400f765bc764a549de66d99b47881645cbd4ea629", size = 223444, upload-time = "2026-07-02T13:09:47.687Z" }, + { url = "https://files.pythonhosted.org/packages/06/ef/bb725f263befaaff851203ab338e68af15e195d7f7b5f323162532d9b6a8/coverage-7.15.0-cp313-cp313-win_arm64.whl", hash = "sha256:3812c61afc6685c7999b39320779ab8f43b7a3081fdb0def39976e56fbdb9a21", size = 222839, upload-time = "2026-07-02T13:09:49.717Z" }, + { url = "https://files.pythonhosted.org/packages/4f/9c/1e3ca54f72a3185ece06c58d871099898c48f0ed6430d17b6ab75f0d180a/coverage-7.15.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:41cb79af843222e11da87127ad0ecbfa878abadd0f770a4a99391a27d3887324", size = 220906, upload-time = "2026-07-02T13:09:51.339Z" }, + { url = "https://files.pythonhosted.org/packages/09/37/f718613d83b274880382f6b67e78f3802549ae39b0b3e65ae5b5974df56e/coverage-7.15.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:7d2008989ef8fe54188d3f3bfa2e3099b025af11e90a6a1b9e7dc433d04263d8", size = 221239, upload-time = "2026-07-02T13:09:53.138Z" }, + { url = "https://files.pythonhosted.org/packages/a7/ce/22bae91e0b75445f68d365c7643ed0aa4880bbf77450ee74ca65bdae53a7/coverage-7.15.0-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:769e8ece11a596315ebf5aa7ec383aeeed016c091d2bf6363ffb996d41529092", size = 252286, upload-time = "2026-07-02T13:09:54.996Z" }, + { url = "https://files.pythonhosted.org/packages/dd/1e/bec5e32aa508615d9d7a2790effb25fb4dc28606e995816afe400b25ece3/coverage-7.15.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:65a6b6164ee5c39e2f3803f314292d6c61a607ba7fee253d1e03c42dc3903502", size = 254789, upload-time = "2026-07-02T13:09:56.678Z" }, + { url = "https://files.pythonhosted.org/packages/17/29/0e865435b4354e4a7c03b1b7920046d31d0a273d55decefea27e011cb9bf/coverage-7.15.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:75128817f95a5c45bb01d65fd2d8b9cb54bbe03d81608fb70e3e14b437ad56c2", size = 256135, upload-time = "2026-07-02T13:09:58.343Z" }, + { url = "https://files.pythonhosted.org/packages/84/ff/33a870b58a13325d62fc0a6c8f01fa0ff667cef60c7498e2382a147dfa18/coverage-7.15.0-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:9887bb428fe2d4cd4bee89bac1a6c9932f484afd5b36fbd4ff6ea5f825bb1f5e", size = 258449, upload-time = "2026-07-02T13:10:00.057Z" }, + { url = "https://files.pythonhosted.org/packages/18/7b/6fffe596bf3ddba8462758d02c5dad730fd91055a6634aa2e4226229181a/coverage-7.15.0-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0bfc0be1f702042207a93a00523b1065ee1fe951e96edf311581c0bbc2e34888", size = 252313, upload-time = "2026-07-02T13:10:01.946Z" }, + { url = "https://files.pythonhosted.org/packages/58/1b/11468dd6c1676ab831a70cb9a8d4e198e8607fa0b7220ab918b73fe9bfbd/coverage-7.15.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:f64627d55def5a43282d70e08396672692f77e4da610a5bb8bb4060b432b6859", size = 254142, upload-time = "2026-07-02T13:10:04.065Z" }, + { url = "https://files.pythonhosted.org/packages/79/41/29328e21d16b1b95092c30dd700e08cf915bd3734f836df8f3bdb0e8fa9f/coverage-7.15.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:2c6f0fa473003905c6d5bac328ee4eba9fbea654f15bc24b8a3274b23363fa99", size = 252108, upload-time = "2026-07-02T13:10:06.11Z" }, + { url = "https://files.pythonhosted.org/packages/9b/de/05ccfb990439655b35afbfd8e0d13fe66677565a7d4eb38c3f5ef2635e1c/coverage-7.15.0-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:2bcf9afaf064172c6ec3c58a325a9957ad1178c05dd934e25f253321776e0676", size = 256385, upload-time = "2026-07-02T13:10:08.141Z" }, + { url = "https://files.pythonhosted.org/packages/51/0e/486828a3d2695ea7a2609f17ff572f6b01905e608379440a11da4b8dffbe/coverage-7.15.0-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:baf06bc987115d6fb938d403f7eab684a057766c490367999a2b71a6883110c6", size = 251923, upload-time = "2026-07-02T13:10:10.179Z" }, + { url = "https://files.pythonhosted.org/packages/18/c7/03582b6715f078e5e558354c87616d945b9894cda2dace8e4009b17035e4/coverage-7.15.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f0405f2ff97b1c4c0e782cb32e02f32369bcf2e6b618b591d67e1ea754575dfe", size = 253580, upload-time = "2026-07-02T13:10:12.052Z" }, + { url = "https://files.pythonhosted.org/packages/db/dc/9e578bbaf2ecb4959a81b7e7601ad8cca772cba2892e8d144cb749b4a71a/coverage-7.15.0-cp314-cp314-win32.whl", hash = "sha256:ab282853ed5fbd64bbb162f19cb8fcb7087187508a6374b4f9c34ec1577c4e8f", size = 223107, upload-time = "2026-07-02T13:10:13.994Z" }, + { url = "https://files.pythonhosted.org/packages/ae/3e/c8c3b75d8dbe0e35f7b0cc3ff5e949fc59500f70b21d0398813f66740664/coverage-7.15.0-cp314-cp314-win_amd64.whl", hash = "sha256:3bb3040e9f4bbe26fcb0cd7cc85ac63e630d3f3a9c74f027abf4caa27e706663", size = 223597, upload-time = "2026-07-02T13:10:15.906Z" }, + { url = "https://files.pythonhosted.org/packages/cd/bc/3cbc9fb036eb388519bccd521f783499c39b64256013fbc362782f196fe1/coverage-7.15.0-cp314-cp314-win_arm64.whl", hash = "sha256:346771144d34f7fa84ec28386f78e0f31653f33cf35e19d253d5b35f9e8201da", size = 223020, upload-time = "2026-07-02T13:10:17.844Z" }, + { url = "https://files.pythonhosted.org/packages/28/00/199c4a8d656dff63102577a056c0fce2ff6a79e40adac092fc986c49cbf1/coverage-7.15.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:d34a010905fb6401324ba016b5da03d574967f7b21ce48ea41e66f0f1f95f641", size = 221638, upload-time = "2026-07-02T13:10:19.703Z" }, + { url = "https://files.pythonhosted.org/packages/ba/8e/9d0092c96a3d3a26951ecc7020826aa57bcb1b119ca81acbba996884ab13/coverage-7.15.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:bb25d825d885ca8036795dacfc3924d33091fc76d71ebc99420c6b79e77d96fa", size = 221903, upload-time = "2026-07-02T13:10:21.514Z" }, + { url = "https://files.pythonhosted.org/packages/6d/b4/c0ca3028f42c9a08e51feb4561ef1192e5de99797cd1db5b04590c215bda/coverage-7.15.0-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:94c9686bfe8a9a6810297aecbd99beaa3445f9e8dc2f80b1382cca0d86b64461", size = 263267, upload-time = "2026-07-02T13:10:23.261Z" }, + { url = "https://files.pythonhosted.org/packages/5f/aa/a375e3846e5d3c013dc600b2a3231089055c73d77f5393dd2192a8d64da6/coverage-7.15.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9bd671c25f9d85f09d7ec481d0e43d5139f486c06a37139847a7ce569788af72", size = 265390, upload-time = "2026-07-02T13:10:25.152Z" }, + { url = "https://files.pythonhosted.org/packages/92/e1/5783cdabb797305e1c9e4809fea496d31834c51fa772514f73dc148bcfc9/coverage-7.15.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:110cbdf8d2e216577312cf06ccf85539c0e5a5420ef747e4a4719b5e483c88cd", size = 267811, upload-time = "2026-07-02T13:10:27.249Z" }, + { url = "https://files.pythonhosted.org/packages/85/31/96d8bbf58b8e9193bc8389574a91a0db48355ee98feb66aa6bf8d1b32eea/coverage-7.15.0-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2c5d4619214f1d9993e7b00a8600d14614b7e9d84e89507460b126aa5e6559e5", size = 268928, upload-time = "2026-07-02T13:10:29.242Z" }, + { url = "https://files.pythonhosted.org/packages/5e/7a/5294567e811a1cb7eda93140c628fa050d66189da28da320f93d1d815c73/coverage-7.15.0-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:781a704516e2d8346fbbd5be6c6f3412dd824785146528b3a01816f26c081007", size = 262378, upload-time = "2026-07-02T13:10:31.107Z" }, + { url = "https://files.pythonhosted.org/packages/69/3f/3f48538421f899f28946f90a3d272136a4686e1abf461cc9249a783ee0f3/coverage-7.15.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:bd4a1b44bcb65ee29e947ac92bbee04956df3a6bfc6143641bb6cae7ede00fc9", size = 265263, upload-time = "2026-07-02T13:10:32.942Z" }, + { url = "https://files.pythonhosted.org/packages/ce/d3/092df15efcab8a9c1467ee960eb8019bbad3f9300d115d89ea6195f369ff/coverage-7.15.0-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:0e4950c9d6d3e39c64c991814ff315e2d0b9cb8152363594212c9e55208c0a8f", size = 262866, upload-time = "2026-07-02T13:10:35.104Z" }, + { url = "https://files.pythonhosted.org/packages/e5/ab/0254d2b88665efb2c57ad368cc77ab5de3435bd8d5add4729c1b0e79431e/coverage-7.15.0-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:fe9c87ff42e5472d80d21704972e1f96e104a0a599d77c5e35db5a3c562e2571", size = 266599, upload-time = "2026-07-02T13:10:37.05Z" }, + { url = "https://files.pythonhosted.org/packages/a8/79/1cfa4023e489ce6fbc7be4a5d442dbc375edb4f4fda39a352cedb53263c2/coverage-7.15.0-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f00d5ae1dd2fe13fb8186e3e7d37bcbd8b25c0d764ff7d1b32cef9be058510a8", size = 261714, upload-time = "2026-07-02T13:10:38.966Z" }, + { url = "https://files.pythonhosted.org/packages/b7/eb/fee5c8665656be63f497418d410484637c438172568688e8ac92e06574e7/coverage-7.15.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:363ab38cc78b615f11c9cac3cf1d7eef950c18b9fdedfb9066f59461dcf84d68", size = 264025, upload-time = "2026-07-02T13:10:40.789Z" }, + { url = "https://files.pythonhosted.org/packages/ab/99/63005db722f91edc81abc16302f9cc2f6228c1679e46e15be9ae144b14d0/coverage-7.15.0-cp314-cp314t-win32.whl", hash = "sha256:54fd9c53a5fafff509195f1b6a3f9be615d8e8362a3629ff1de23d270c03c86b", size = 223413, upload-time = "2026-07-02T13:10:42.597Z" }, + { url = "https://files.pythonhosted.org/packages/c1/e8/2bc6181c4fb06f1a6b981eb85330cc57bfad7e3f710fc9c9d350013ba228/coverage-7.15.0-cp314-cp314t-win_amd64.whl", hash = "sha256:87b47553097ba185ed964866078e7e63adea9f5f51b5f39691c34f30afd21080", size = 224245, upload-time = "2026-07-02T13:10:44.47Z" }, + { url = "https://files.pythonhosted.org/packages/79/b8/4d959bf9cc45d0cfed2f4d35cafcab978cdb6ea02eb5100009cd740632a3/coverage-7.15.0-cp314-cp314t-win_arm64.whl", hash = "sha256:aeefb2dd178fe7eee79f0ad25d75855cb35ee9ed472db2c5ea06f5b4fd00cec5", size = 223558, upload-time = "2026-07-02T13:10:46.368Z" }, + { url = "https://files.pythonhosted.org/packages/52/30/21b2ad45959cd50e909e02ebac1e30b4ceb7162e91c11d4c570223a458b7/coverage-7.15.0-py3-none-any.whl", hash = "sha256:56da6a4cbe8f7e9e80bd072ca9cefe67d7106a440a7ec06519ec6507ac94ad19", size = 212632, upload-time = "2026-07-02T13:10:48.641Z" }, ] [[package]] @@ -294,11 +346,11 @@ wheels = [ [[package]] name = "distlib" -version = "0.4.1" +version = "0.4.3" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/86/b2/d6fc3f2347f43dada79e5ff118493e8109c98400a0e29a1d5264a3aa479b/distlib-0.4.1.tar.gz", hash = "sha256:c3804d0d2d4b5fcd44036eb860cb6660485fcdf5c2aba53dc324d805837ea65b", size = 610526, upload-time = "2026-06-02T11:17:40.691Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c9/02/bd72be9134d25ed783ecbbc38a539ffaefbf90c78418c7fb7229600dbac7/distlib-0.4.3.tar.gz", hash = "sha256:f152097224a0ae24be5a0f6bae1b9359af82133bce63f98a95f86cae1aede9ed", size = 615141, upload-time = "2026-06-12T08:04:52.847Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/25/18/3497c4fa83a76dcb154923fd2075522e8dd6995ecee4093c00ae18160046/distlib-0.4.1-py2.py3-none-any.whl", hash = "sha256:9c2c552c68cbadc619f2d0ed3a69e27c351a3f4c9baa9ffb7df9e9cdc3d19a97", size = 469216, upload-time = "2026-06-02T11:17:38.779Z" }, + { url = "https://files.pythonhosted.org/packages/02/08/9c41fb51ab5b43eb21674aff13df270e8ba6c4b29c8624e328dc7a9482af/distlib-0.4.3-py2.py3-none-any.whl", hash = "sha256:4b0ce306c966eb73bc3a7b6abad017c556dadd92c44701562cd528ac7fde4d5b", size = 470628, upload-time = "2026-06-12T08:04:50.506Z" }, ] [[package]] @@ -337,7 +389,7 @@ name = "exceptiongroup" version = "1.3.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions", marker = "python_full_version < '3.13'" }, + { name = "typing-extensions" }, ] sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } wheels = [ @@ -346,11 +398,11 @@ wheels = [ [[package]] name = "filelock" -version = "3.29.1" +version = "3.29.5" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/1f/f9/f38573ed5844586db374d085911740a501ccfa373b455fc9413f09f85237/filelock-3.29.1.tar.gz", hash = "sha256:d97e6b1b9757569626c58caa07dc4beb1613f4a2938b1e8cc81afca398906c9e", size = 59335, upload-time = "2026-06-03T15:19:04.053Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/ee/29c668c50888588c432a702f7c2e8ee8a0c9e5286028d91f170308d6b2e9/filelock-3.29.5.tar.gz", hash = "sha256:6e6034c57a00a020e767f2614a5539863f056de7e7991d6d1473aef7ff73f156", size = 68927, upload-time = "2026-07-03T03:50:31.818Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/4c/a0/614c5fe402fd88951df45f4dda2fa3b4e17a99ecd92340771929169b3b95/filelock-3.29.1-py3-none-any.whl", hash = "sha256:85199dfd706869641b72b2e8955d5416a4b2b7dc4b0e8e6d97b4cc1299a6983b", size = 40750, upload-time = "2026-06-03T15:19:02.959Z" }, + { url = "https://files.pythonhosted.org/packages/4a/e3/f1fae3647d170919c2cf2a898e77e7d1a4e5c7cae0aed7bb4bd3f5ebff6f/filelock-3.29.5-py3-none-any.whl", hash = "sha256:8af830889ba3a0ffcefbd6c7d2af8a54012058103771f2e10848222f476a1693", size = 45073, upload-time = "2026-07-03T03:50:30.445Z" }, ] [[package]] @@ -377,6 +429,43 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/20/7a/1c6e3562dfd8950adbb11ffbc65d21e7c89d01a6e4f137fa981056de25c5/gitpython-3.1.50-py3-none-any.whl", hash = "sha256:d352abe2908d07355014abdd21ddf798c2a961469239afec4962e9da884858f9", size = 212507, upload-time = "2026-05-06T04:01:23.799Z" }, ] +[[package]] +name = "h11" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, +] + +[[package]] +name = "httpcore" +version = "1.0.9" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "h11" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, +] + +[[package]] +name = "httpx" +version = "0.28.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "certifi" }, + { name = "httpcore" }, + { name = "idna" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, +] + [[package]] name = "identify" version = "2.6.19" @@ -430,37 +519,41 @@ name = "mailersend" version = "2.0.3" source = { editable = "." } dependencies = [ + { name = "httpx" }, { name = "pydantic", extra = ["email"] }, { name = "requests" }, ] [package.dev-dependencies] dev = [ + { name = "black" }, { name = "coverage" }, { name = "pre-commit" }, { name = "pytest" }, + { name = "pytest-asyncio" }, { name = "pytest-mock" }, { name = "python-dotenv" }, { name = "python-semantic-release" }, - { name = "ruff" }, { name = "vcrpy" }, ] [package.metadata] requires-dist = [ + { name = "httpx", specifier = ">=0.28.1" }, { name = "pydantic", extras = ["email"], specifier = ">=2.11.0" }, { name = "requests", specifier = ">=2.28.1" }, ] [package.metadata.requires-dev] dev = [ + { name = "black", specifier = ">=26.0.0" }, { name = "coverage", specifier = ">=7.0.0" }, { name = "pre-commit", specifier = ">=2.12.1" }, { name = "pytest", specifier = ">=9.0.0" }, + { name = "pytest-asyncio", specifier = ">=1.3.0" }, { name = "pytest-mock", specifier = ">=3.10.0" }, { name = "python-dotenv", specifier = ">=0.21.0" }, { name = "python-semantic-release", specifier = ">=7.32.2" }, - { name = "ruff", specifier = ">=0.9.0" }, { name = "vcrpy", specifier = ">=8.0.0" }, ] @@ -570,6 +663,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", size = 9979, upload-time = "2022-08-14T12:40:09.779Z" }, ] +[[package]] +name = "mypy-extensions" +version = "1.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a2/6e/371856a3fb9d31ca8dac321cda606860fa4548858c0cc45d9d1d4ca2628b/mypy_extensions-1.1.0.tar.gz", hash = "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558", size = 6343, upload-time = "2025-04-22T14:54:24.164Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/79/7b/2c79738432f5c924bef5071f933bcc9efd0473bac3b4aa584a6f7c1c8df8/mypy_extensions-1.1.0-py3-none-any.whl", hash = "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", size = 4963, upload-time = "2025-04-22T14:54:22.983Z" }, +] + [[package]] name = "nodeenv" version = "1.10.0" @@ -588,6 +690,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/df/b2/87e62e8c3e2f4b32e5fe99e0b86d576da1312593b39f47d8ceef365e95ed/packaging-26.2-py3-none-any.whl", hash = "sha256:5fc45236b9446107ff2415ce77c807cee2862cb6fac22b8a73826d0693b0980e", size = 100195, upload-time = "2026-04-24T20:15:22.081Z" }, ] +[[package]] +name = "pathspec" +version = "1.1.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/82/42f767fc1c1143d6fd36efb827202a2d997a375e160a71eb2888a925aac1/pathspec-1.1.1.tar.gz", hash = "sha256:17db5ecd524104a120e173814c90367a96a98d07c45b2e10c2f3919fff91bf5a", size = 135180, upload-time = "2026-04-27T01:46:08.907Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f1/d9/7fb5aa316bc299258e68c73ba3bddbc499654a07f151cba08f6153988714/pathspec-1.1.1-py3-none-any.whl", hash = "sha256:a00ce642f577bf7f473932318056212bc4f8bfdf53128c78bbd5af0b9b20b189", size = 57328, upload-time = "2026-04-27T01:46:07.06Z" }, +] + [[package]] name = "platformdirs" version = "4.10.0" @@ -769,7 +880,7 @@ wheels = [ [[package]] name = "pytest" -version = "9.0.3" +version = "9.1.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, @@ -780,9 +891,23 @@ dependencies = [ { name = "pygments" }, { name = "tomli", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/7d/0d/549bd94f1a0a402dc8cf64563a117c0f3765662e2e668477624baeec44d5/pytest-9.0.3.tar.gz", hash = "sha256:b86ada508af81d19edeb213c681b1d48246c1a91d304c6c81a427674c17eb91c", size = 1572165, upload-time = "2026-04-07T17:16:18.027Z" } +sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, +] + +[[package]] +name = "pytest-asyncio" +version = "1.4.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "backports-asyncio-runner", marker = "python_full_version < '3.11'" }, + { name = "pytest" }, + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/43/7c/d36d04db312ecf4298932ef77e6e4a9e8ad017906e24e34f0b0c361a2473/pytest_asyncio-1.4.0.tar.gz", hash = "sha256:c6c0d2259945122819f171a32ecea2c349ead889ee28176caaf492143424be42", size = 58514, upload-time = "2026-05-26T09:56:04.083Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/d4/24/a372aaf5c9b7208e7112038812994107bc65a84cd00e0354a88c2c77a617/pytest-9.0.3-py3-none-any.whl", hash = "sha256:2c5efc453d45394fdd706ade797c0a81091eccd1d6e4bccfcd476e2b8e0ab5d9", size = 375249, upload-time = "2026-04-07T17:16:16.13Z" }, + { url = "https://files.pythonhosted.org/packages/03/e2/08a497ef684b88559c9cc5f4ad53a37e7b99e727094a86d6ea32536d5d3c/pytest_asyncio-1.4.0-py3-none-any.whl", hash = "sha256:933ca923a23075a87fb7070c0ec272a6848489824d887c85c812670932835aa1", size = 16930, upload-time = "2026-05-26T09:56:02.576Z" }, ] [[package]] @@ -799,15 +924,15 @@ wheels = [ [[package]] name = "python-discovery" -version = "1.4.0" +version = "1.4.3" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "filelock" }, { name = "platformdirs" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/a6/12/38c1a0b1e64806780c9563e3fc9f6e472251839662587cfbe9bfaf2ae10a/python_discovery-1.4.0.tar.gz", hash = "sha256:eb8bc7daad3c226c147e45bb4e970a1feb1bf4048ee178e6db59e197b8010ce3", size = 68455, upload-time = "2026-05-28T01:15:37.639Z" } +sdist = { url = "https://files.pythonhosted.org/packages/66/26/8b004cc36f430345136f6f00fa1aa9ed596c8ed1e8504625fa79522ff39c/python_discovery-1.4.3.tar.gz", hash = "sha256:ad57d7045a862460d4a235986c33f13ed707d3aeb9153fa47eb7dfd0d4673289", size = 70438, upload-time = "2026-07-03T13:21:51.621Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c8/8d/3d316429f65029532bb1e28ff77b797d86b5ac3915bb44ca4e19aa283d43/python_discovery-1.4.0-py3-none-any.whl", hash = "sha256:26ed78d703e234879a66244c7d4114563fb13ec5cd30a2d1357e5fb4850782da", size = 33217, upload-time = "2026-05-28T01:15:36.573Z" }, + { url = "https://files.pythonhosted.org/packages/28/78/9b77ecb4644d1bbea94d29abf78f21c47eca6eb79e9745b702ec0bed2e19/python_discovery-1.4.3-py3-none-any.whl", hash = "sha256:b6e1e4a7d9e3f6948c39746ffe8218225162d738ba39d05ab1d2f6c1cac4878c", size = 33885, upload-time = "2026-07-03T13:21:50.174Z" }, ] [[package]] @@ -821,20 +946,20 @@ wheels = [ [[package]] name = "python-gitlab" -version = "6.5.0" +version = "8.4.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "requests" }, { name = "requests-toolbelt" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/9a/bd/b30f1d3b303cb5d3c72e2d57a847d699e8573cbdfd67ece5f1795e49da1c/python_gitlab-6.5.0.tar.gz", hash = "sha256:97553652d94b02de343e9ca92782239aa2b5f6594c5482331a9490d9d5e8737d", size = 400591, upload-time = "2025-10-17T21:40:02.89Z" } +sdist = { url = "https://files.pythonhosted.org/packages/cc/96/c20b37e7fd86481e1bf2b1922e84b98dc5477fd9aafd30e5c5086f94d922/python_gitlab-8.4.0.tar.gz", hash = "sha256:f36f20ec3f09138f3b12089394941f4dbe5a407021bed71b70a04bbdd37b8a74", size = 410803, upload-time = "2026-05-28T02:43:32.857Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/34/bd/b0d440685fbcafee462bed793a74aea88541887c4c30556a55ac64914b8d/python_gitlab-6.5.0-py3-none-any.whl", hash = "sha256:494e1e8e5edd15286eaf7c286f3a06652688f1ee20a49e2a0218ddc5cc475e32", size = 144419, upload-time = "2025-10-17T21:40:01.233Z" }, + { url = "https://files.pythonhosted.org/packages/b1/af/1c3540dbdccb85fca0b0bbc58cdaf514d0a830d7e0302b2059a6c627b172/python_gitlab-8.4.0-py3-none-any.whl", hash = "sha256:102c747d9c107820e215cc5913627388001592a9a3ba1b43fc341a40f6943e72", size = 148242, upload-time = "2026-05-28T02:43:31.505Z" }, ] [[package]] name = "python-semantic-release" -version = "10.5.3" +version = "10.6.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "click" }, @@ -851,9 +976,48 @@ dependencies = [ { name = "shellingham" }, { name = "tomlkit" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/19/3a/7332b822825ed0e902c6e950e0d1e90e8f666fd12eb27855d1c8b6677eff/python_semantic_release-10.5.3.tar.gz", hash = "sha256:de4da78635fa666e5774caaca2be32063cae72431eb75e2ac23b9f2dfd190785", size = 618034, upload-time = "2025-12-14T22:37:29.782Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a6/f6/06d5aa54b46bb192b00ef3e74234300ea5932dd310d142a3c8070e770e93/python_semantic_release-10.6.1.tar.gz", hash = "sha256:ee6369238f72e75a009b3724481232c8b813416191be099bc0266e375fd02b2b", size = 626453, upload-time = "2026-07-06T06:14:35.507Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/6b/01/ada29a1215df601bded0a2efd3b6d53864a0a9e0a9ea52aeaebe14fd03fd/python_semantic_release-10.5.3-py3-none-any.whl", hash = "sha256:1be0e07c36fa1f1ec9da4f438c1f6bbd7bc10eb0d6ac0089b0643103708c2823", size = 152716, upload-time = "2025-12-14T22:37:28.089Z" }, + { url = "https://files.pythonhosted.org/packages/18/97/be812cd1eb350551d2f3cc38426864cce493a03ed31f4749133bcff8d053/python_semantic_release-10.6.1-py3-none-any.whl", hash = "sha256:36f7319515f218719d0972bc9535813a930f04cd19556767599e9863242efcdc", size = 155674, upload-time = "2026-07-06T06:14:33.575Z" }, +] + +[[package]] +name = "pytokens" +version = "0.4.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b6/34/b4e015b99031667a7b960f888889c5bd34ef585c85e1cb56a594b92836ac/pytokens-0.4.1.tar.gz", hash = "sha256:292052fe80923aae2260c073f822ceba21f3872ced9a68bb7953b348e561179a", size = 23015, upload-time = "2026-01-30T01:03:45.924Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/42/24/f206113e05cb8ef51b3850e7ef88f20da6f4bf932190ceb48bd3da103e10/pytokens-0.4.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2a44ed93ea23415c54f3face3b65ef2b844d96aeb3455b8a69b3df6beab6acc5", size = 161522, upload-time = "2026-01-30T01:02:50.393Z" }, + { url = "https://files.pythonhosted.org/packages/d4/e9/06a6bf1b90c2ed81a9c7d2544232fe5d2891d1cd480e8a1809ca354a8eb2/pytokens-0.4.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:add8bf86b71a5d9fb5b89f023a80b791e04fba57960aa790cc6125f7f1d39dfe", size = 246945, upload-time = "2026-01-30T01:02:52.399Z" }, + { url = "https://files.pythonhosted.org/packages/69/66/f6fb1007a4c3d8b682d5d65b7c1fb33257587a5f782647091e3408abe0b8/pytokens-0.4.1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:670d286910b531c7b7e3c0b453fd8156f250adb140146d234a82219459b9640c", size = 259525, upload-time = "2026-01-30T01:02:53.737Z" }, + { url = "https://files.pythonhosted.org/packages/04/92/086f89b4d622a18418bac74ab5db7f68cf0c21cf7cc92de6c7b919d76c88/pytokens-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:4e691d7f5186bd2842c14813f79f8884bb03f5995f0575272009982c5ac6c0f7", size = 262693, upload-time = "2026-01-30T01:02:54.871Z" }, + { url = "https://files.pythonhosted.org/packages/b4/7b/8b31c347cf94a3f900bdde750b2e9131575a61fdb620d3d3c75832262137/pytokens-0.4.1-cp310-cp310-win_amd64.whl", hash = "sha256:27b83ad28825978742beef057bfe406ad6ed524b2d28c252c5de7b4a6dd48fa2", size = 103567, upload-time = "2026-01-30T01:02:56.414Z" }, + { url = "https://files.pythonhosted.org/packages/3d/92/790ebe03f07b57e53b10884c329b9a1a308648fc083a6d4a39a10a28c8fc/pytokens-0.4.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:d70e77c55ae8380c91c0c18dea05951482e263982911fc7410b1ffd1dadd3440", size = 160864, upload-time = "2026-01-30T01:02:57.882Z" }, + { url = "https://files.pythonhosted.org/packages/13/25/a4f555281d975bfdd1eba731450e2fe3a95870274da73fb12c40aeae7625/pytokens-0.4.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4a58d057208cb9075c144950d789511220b07636dd2e4708d5645d24de666bdc", size = 248565, upload-time = "2026-01-30T01:02:59.912Z" }, + { url = "https://files.pythonhosted.org/packages/17/50/bc0394b4ad5b1601be22fa43652173d47e4c9efbf0044c62e9a59b747c56/pytokens-0.4.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b49750419d300e2b5a3813cf229d4e5a4c728dae470bcc89867a9ad6f25a722d", size = 260824, upload-time = "2026-01-30T01:03:01.471Z" }, + { url = "https://files.pythonhosted.org/packages/4e/54/3e04f9d92a4be4fc6c80016bc396b923d2a6933ae94b5f557c939c460ee0/pytokens-0.4.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d9907d61f15bf7261d7e775bd5d7ee4d2930e04424bab1972591918497623a16", size = 264075, upload-time = "2026-01-30T01:03:04.143Z" }, + { url = "https://files.pythonhosted.org/packages/d1/1b/44b0326cb5470a4375f37988aea5d61b5cc52407143303015ebee94abfd6/pytokens-0.4.1-cp311-cp311-win_amd64.whl", hash = "sha256:ee44d0f85b803321710f9239f335aafe16553b39106384cef8e6de40cb4ef2f6", size = 103323, upload-time = "2026-01-30T01:03:05.412Z" }, + { url = "https://files.pythonhosted.org/packages/41/5d/e44573011401fb82e9d51e97f1290ceb377800fb4eed650b96f4753b499c/pytokens-0.4.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:140709331e846b728475786df8aeb27d24f48cbcf7bcd449f8de75cae7a45083", size = 160663, upload-time = "2026-01-30T01:03:06.473Z" }, + { url = "https://files.pythonhosted.org/packages/f0/e6/5bbc3019f8e6f21d09c41f8b8654536117e5e211a85d89212d59cbdab381/pytokens-0.4.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d6c4268598f762bc8e91f5dbf2ab2f61f7b95bdc07953b602db879b3c8c18e1", size = 255626, upload-time = "2026-01-30T01:03:08.177Z" }, + { url = "https://files.pythonhosted.org/packages/bf/3c/2d5297d82286f6f3d92770289fd439956b201c0a4fc7e72efb9b2293758e/pytokens-0.4.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:24afde1f53d95348b5a0eb19488661147285ca4dd7ed752bbc3e1c6242a304d1", size = 269779, upload-time = "2026-01-30T01:03:09.756Z" }, + { url = "https://files.pythonhosted.org/packages/20/01/7436e9ad693cebda0551203e0bf28f7669976c60ad07d6402098208476de/pytokens-0.4.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:5ad948d085ed6c16413eb5fec6b3e02fa00dc29a2534f088d3302c47eb59adf9", size = 268076, upload-time = "2026-01-30T01:03:10.957Z" }, + { url = "https://files.pythonhosted.org/packages/2e/df/533c82a3c752ba13ae7ef238b7f8cdd272cf1475f03c63ac6cf3fcfb00b6/pytokens-0.4.1-cp312-cp312-win_amd64.whl", hash = "sha256:3f901fe783e06e48e8cbdc82d631fca8f118333798193e026a50ce1b3757ea68", size = 103552, upload-time = "2026-01-30T01:03:12.066Z" }, + { url = "https://files.pythonhosted.org/packages/cb/dc/08b1a080372afda3cceb4f3c0a7ba2bde9d6a5241f1edb02a22a019ee147/pytokens-0.4.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:8bdb9d0ce90cbf99c525e75a2fa415144fd570a1ba987380190e8b786bc6ef9b", size = 160720, upload-time = "2026-01-30T01:03:13.843Z" }, + { url = "https://files.pythonhosted.org/packages/64/0c/41ea22205da480837a700e395507e6a24425151dfb7ead73343d6e2d7ffe/pytokens-0.4.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:5502408cab1cb18e128570f8d598981c68a50d0cbd7c61312a90507cd3a1276f", size = 254204, upload-time = "2026-01-30T01:03:14.886Z" }, + { url = "https://files.pythonhosted.org/packages/e0/d2/afe5c7f8607018beb99971489dbb846508f1b8f351fcefc225fcf4b2adc0/pytokens-0.4.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:29d1d8fb1030af4d231789959f21821ab6325e463f0503a61d204343c9b355d1", size = 268423, upload-time = "2026-01-30T01:03:15.936Z" }, + { url = "https://files.pythonhosted.org/packages/68/d4/00ffdbd370410c04e9591da9220a68dc1693ef7499173eb3e30d06e05ed1/pytokens-0.4.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:970b08dd6b86058b6dc07efe9e98414f5102974716232d10f32ff39701e841c4", size = 266859, upload-time = "2026-01-30T01:03:17.458Z" }, + { url = "https://files.pythonhosted.org/packages/a7/c9/c3161313b4ca0c601eeefabd3d3b576edaa9afdefd32da97210700e47652/pytokens-0.4.1-cp313-cp313-win_amd64.whl", hash = "sha256:9bd7d7f544d362576be74f9d5901a22f317efc20046efe2034dced238cbbfe78", size = 103520, upload-time = "2026-01-30T01:03:18.652Z" }, + { url = "https://files.pythonhosted.org/packages/8f/a7/b470f672e6fc5fee0a01d9e75005a0e617e162381974213a945fcd274843/pytokens-0.4.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:4a14d5f5fc78ce85e426aa159489e2d5961acf0e47575e08f35584009178e321", size = 160821, upload-time = "2026-01-30T01:03:19.684Z" }, + { url = "https://files.pythonhosted.org/packages/80/98/e83a36fe8d170c911f864bfded690d2542bfcfacb9c649d11a9e6eb9dc41/pytokens-0.4.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:97f50fd18543be72da51dd505e2ed20d2228c74e0464e4262e4899797803d7fa", size = 254263, upload-time = "2026-01-30T01:03:20.834Z" }, + { url = "https://files.pythonhosted.org/packages/0f/95/70d7041273890f9f97a24234c00b746e8da86df462620194cef1d411ddeb/pytokens-0.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:dc74c035f9bfca0255c1af77ddd2d6ae8419012805453e4b0e7513e17904545d", size = 268071, upload-time = "2026-01-30T01:03:21.888Z" }, + { url = "https://files.pythonhosted.org/packages/da/79/76e6d09ae19c99404656d7db9c35dfd20f2086f3eb6ecb496b5b31163bad/pytokens-0.4.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f66a6bbe741bd431f6d741e617e0f39ec7257ca1f89089593479347cc4d13324", size = 271716, upload-time = "2026-01-30T01:03:23.633Z" }, + { url = "https://files.pythonhosted.org/packages/79/37/482e55fa1602e0a7ff012661d8c946bafdc05e480ea5a32f4f7e336d4aa9/pytokens-0.4.1-cp314-cp314-win_amd64.whl", hash = "sha256:b35d7e5ad269804f6697727702da3c517bb8a5228afa450ab0fa787732055fc9", size = 104539, upload-time = "2026-01-30T01:03:24.788Z" }, + { url = "https://files.pythonhosted.org/packages/30/e8/20e7db907c23f3d63b0be3b8a4fd1927f6da2395f5bcc7f72242bb963dfe/pytokens-0.4.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:8fcb9ba3709ff77e77f1c7022ff11d13553f3c30299a9fe246a166903e9091eb", size = 168474, upload-time = "2026-01-30T01:03:26.428Z" }, + { url = "https://files.pythonhosted.org/packages/d6/81/88a95ee9fafdd8f5f3452107748fd04c24930d500b9aba9738f3ade642cc/pytokens-0.4.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:79fc6b8699564e1f9b521582c35435f1bd32dd06822322ec44afdeba666d8cb3", size = 290473, upload-time = "2026-01-30T01:03:27.415Z" }, + { url = "https://files.pythonhosted.org/packages/cf/35/3aa899645e29b6375b4aed9f8d21df219e7c958c4c186b465e42ee0a06bf/pytokens-0.4.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d31b97b3de0f61571a124a00ffe9a81fb9939146c122c11060725bd5aea79975", size = 303485, upload-time = "2026-01-30T01:03:28.558Z" }, + { url = "https://files.pythonhosted.org/packages/52/a0/07907b6ff512674d9b201859f7d212298c44933633c946703a20c25e9d81/pytokens-0.4.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:967cf6e3fd4adf7de8fc73cd3043754ae79c36475c1c11d514fc72cf5490094a", size = 306698, upload-time = "2026-01-30T01:03:29.653Z" }, + { url = "https://files.pythonhosted.org/packages/39/2a/cbbf9250020a4a8dd53ba83a46c097b69e5eb49dd14e708f496f548c6612/pytokens-0.4.1-cp314-cp314t-win_amd64.whl", hash = "sha256:584c80c24b078eec1e227079d56dc22ff755e0ba8654d8383b2c549107528918", size = 116287, upload-time = "2026-01-30T01:03:30.912Z" }, + { url = "https://files.pythonhosted.org/packages/c6/78/397db326746f0a342855b81216ae1f0a32965deccfd7c830a2dbc66d2483/pytokens-0.4.1-py3-none-any.whl", hash = "sha256:26cef14744a8385f35d0e095dc8b3a7583f6c953c2e3d269c7f82484bf5ad2de", size = 13729, upload-time = "2026-01-30T01:03:45.029Z" }, ] [[package]] @@ -960,31 +1124,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/b3/76/6d163cfac87b632216f71879e6b2cf17163f773ff59c00b5ff4900a80fa3/rich-14.3.4-py3-none-any.whl", hash = "sha256:07e7adb4690f68864777b1450859253bed81a99a31ac321ac1817b2313558952", size = 310480, upload-time = "2026-04-11T02:57:47.484Z" }, ] -[[package]] -name = "ruff" -version = "0.15.16" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/a6/bd/5f7ec371001337d8fa61701c186ff8b613ecac1651848c5950f4c4d5f2e9/ruff-0.15.16.tar.gz", hash = "sha256:d05e78d38c78caf020b03789e25106c93017db5a0cb6e2819885018c61343b78", size = 4714267, upload-time = "2026-06-04T16:33:09.974Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/0c/42/53ef1c3953f157956db9bf7861e3bc50b9b887ce93300aa48cdba8336fe6/ruff-0.15.16-py3-none-linux_armv6l.whl", hash = "sha256:6ac3c0b3969cc6cf6b158c4e2f8f682acb58e7d700d8a44b65ecdc72d66ab0b2", size = 10709025, upload-time = "2026-06-04T16:32:51.935Z" }, - { url = "https://files.pythonhosted.org/packages/93/9a/a79159346f19134a956607754e57d8d128f7a4c00f4ad2f7514d224c172c/ruff-0.15.16-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:197c207ed75ffba54a0dec23db4aa939a27a3053073e085e0042433cbdc58e4a", size = 11063550, upload-time = "2026-06-04T16:32:42.24Z" }, - { url = "https://files.pythonhosted.org/packages/bc/72/3ce2ac000a5299ec238e01f51397b3b653c93b077d9b1bfe8715bb895f20/ruff-0.15.16-py3-none-macosx_11_0_arm64.whl", hash = "sha256:3a39fec45ab316cc23e7558f23fea4a70403ddb5648ea9a4a3854a16973d0071", size = 10421345, upload-time = "2026-06-04T16:32:37.251Z" }, - { url = "https://files.pythonhosted.org/packages/b0/c2/cc7fad3ec9169373f5b6a18f1917b91080feec40c3f9658334a1d28e2f03/ruff-0.15.16-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ba93191d79003116b95128c9d306e045200fdbd0bccb782b110f3cd1d4abc5cf", size = 10757217, upload-time = "2026-06-04T16:32:54.722Z" }, - { url = "https://files.pythonhosted.org/packages/69/d2/3474009eaa0a65b31fa7152a2fad5e2f050c640ceb1e6b02ee6922e94c82/ruff-0.15.16-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:c6ee4b90520630120ef032aa5cc10db483852dff950e78b1d717e2993a61ac8d", size = 10507035, upload-time = "2026-06-04T16:33:05.343Z" }, - { url = "https://files.pythonhosted.org/packages/ca/81/b7ae6ccbd11f0c8dc3d5d67fc4be9b57ff57ca86ba56152021378e1277f2/ruff-0.15.16-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e4215bc938bc3c8215c1472c1aa437e310fee20cd427335fec9d7e609563628", size = 11255291, upload-time = "2026-06-04T16:32:49.49Z" }, - { url = "https://files.pythonhosted.org/packages/d9/e1/46e526f1a7cc90857ce6ddf25fbb77eb6568651ac38d71b033af07076dd5/ruff-0.15.16-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:7c8d26be963b090f10e29abc8b3e74a2a321f6fa34e02424e30b5af89350ecbb", size = 12124922, upload-time = "2026-06-04T16:33:07.821Z" }, - { url = "https://files.pythonhosted.org/packages/1a/da/5c791b088b596b24d0deb967fa28ae02ad751a140c0b9ea81c5ab915d6c0/ruff-0.15.16-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f198cf4123602a2280ed46c307bcbafe41758d6fee5b456b6b6058ca1514b3b4", size = 11332186, upload-time = "2026-06-04T16:33:02.971Z" }, - { url = "https://files.pythonhosted.org/packages/72/11/5da87abe20047c8962361473923ebb2f62b595250126aadfad8c20649c1e/ruff-0.15.16-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bb27515fa6240fb586ae82b901a59e67d24acff86f2190b433dc542fe0435aeb", size = 11373541, upload-time = "2026-06-04T16:32:47.007Z" }, - { url = "https://files.pythonhosted.org/packages/fe/2a/8554754c23a854ae3fd6b507e36ad61ddb121e298c6d5d617dec94ed0f14/ruff-0.15.16-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:a267c46ba1593fc26b8eecbea050b39d40c0b6bb7781ee11c90a02cd10032951", size = 11353014, upload-time = "2026-06-04T16:32:34.795Z" }, - { url = "https://files.pythonhosted.org/packages/62/25/62ea41529ec89f742ea3fed9cb1059c72877ec7cf9b9e99ac9cf3294d1d9/ruff-0.15.16-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:528c68f39a91498a8d50e91ff5985df3d105782bab49cc378e73ac26bff083e8", size = 10737467, upload-time = "2026-06-04T16:32:26.348Z" }, - { url = "https://files.pythonhosted.org/packages/90/17/334d3ad9de4d40f9dd58fdd09e35ce64553bb501e2f19a839e2fb6be14fc/ruff-0.15.16-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:7ed55c58950df60589a9a7a5d2f8fa5f54ebd287163be805adfe6ee95a9de123", size = 10521910, upload-time = "2026-06-04T16:32:32.54Z" }, - { url = "https://files.pythonhosted.org/packages/4d/bd/3ac7c6ae77a885c1004b3dda2446ea401768d24f851c14b4ad4b24f6639c/ruff-0.15.16-py3-none-musllinux_1_2_i686.whl", hash = "sha256:d482feaf51512b50f9790ceb417a56a61dd1e9d9bf967662b9ed27c01b34f53a", size = 10979190, upload-time = "2026-06-04T16:32:57.492Z" }, - { url = "https://files.pythonhosted.org/packages/33/d7/609546e6a413c3f216fbf2a50c928f97c80939154f6a0503114094a86191/ruff-0.15.16-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:1e15bc8c94513dae2a40cc9ef07c94fdd4ecc9e29dabebeebe170f952322c9e3", size = 11477014, upload-time = "2026-06-04T16:32:44.687Z" }, - { url = "https://files.pythonhosted.org/packages/74/0d/f2cd247ad32633a5c36e97141a2c21b11c6279f7957bc2ff360b1e08fddd/ruff-0.15.16-py3-none-win32.whl", hash = "sha256:580378f7bd4aa25f72e74aa54948a9622f142b1e509521dd10902e886681cc1e", size = 10735541, upload-time = "2026-06-04T16:32:30.145Z" }, - { url = "https://files.pythonhosted.org/packages/8b/9e/02e845ef151b1dee585e55c4739f8e1734ae1d9f1221dff65761c162208b/ruff-0.15.16-py3-none-win_amd64.whl", hash = "sha256:408256017284eddf98fff77b29aa4fb30f586042d535b2d9befc6512f400aaec", size = 11843403, upload-time = "2026-06-04T16:32:39.76Z" }, - { url = "https://files.pythonhosted.org/packages/15/19/016553f86f207450aebebc2b2b5088d086b901cc8186c02ac4284db3bd88/ruff-0.15.16-py3-none-win_arm64.whl", hash = "sha256:8cd61783afb39638a7133ef0d2dfb1e91277593962f81b5a8423eb0b888a6121", size = 11134555, upload-time = "2026-06-04T16:33:00.136Z" }, -] - [[package]] name = "shellingham" version = "1.5.4" @@ -1098,20 +1237,20 @@ wheels = [ [[package]] name = "vcrpy" -version = "8.1.1" +version = "8.3.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "pyyaml" }, { name = "wrapt" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/b3/07/bcfd5ebd7cb308026ab78a353e091bd699593358be49197d39d004e5ad83/vcrpy-8.1.1.tar.gz", hash = "sha256:58e3053e33b423f3594031cb758c3f4d1df931307f1e67928e30cf352df7709f", size = 85770, upload-time = "2026-01-04T19:22:03.886Z" } +sdist = { url = "https://files.pythonhosted.org/packages/39/d5/8a1f8eb603e2d35fbb0ecd1e309d0c5c18a0ecfc8c0a8f04088bbc8f833b/vcrpy-8.3.0.tar.gz", hash = "sha256:46d64e77e8d95e5c76c7d9a94ff05d8b38b2ae4e1d4869eb0235024b6fcb5212", size = 96117, upload-time = "2026-07-04T14:27:01.608Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/3a/d7/f79b05a5d728f8786876a7d75dfb0c5cae27e428081b2d60152fb52f155f/vcrpy-8.1.1-py3-none-any.whl", hash = "sha256:2d16f31ad56493efb6165182dd99767207031b0da3f68b18f975545ede8ac4b9", size = 42445, upload-time = "2026-01-04T19:22:02.532Z" }, + { url = "https://files.pythonhosted.org/packages/34/77/cb4219be91508399cbcb6143bad89462cfb16f6c638458f454a5d46ac95a/vcrpy-8.3.0-py3-none-any.whl", hash = "sha256:bd66e6143746778157f00e2a922527a8d96b2fdc350be8988a45a29c843815b9", size = 46530, upload-time = "2026-07-04T14:27:00.546Z" }, ] [[package]] name = "virtualenv" -version = "21.4.2" +version = "21.5.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "distlib" }, @@ -1120,93 +1259,93 @@ dependencies = [ { name = "python-discovery" }, { name = "typing-extensions", marker = "python_full_version < '3.11'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/e1/0d/4e93c8e6d1001a75763f87d8f5ecda8ebc7f4aa2153dddfaf4ae8892821a/virtualenv-21.4.2.tar.gz", hash = "sha256:38e6ee0a555615c0ea9da2ac7e9998fe8dc3b911dd33ad8eaad2020957653b0c", size = 7613326, upload-time = "2026-05-31T17:01:22.827Z" } +sdist = { url = "https://files.pythonhosted.org/packages/f1/a5/81f987504738e6defeed61ec1c47e2aefab3c35d8eeb87e1b3f38cf28254/virtualenv-21.5.1.tar.gz", hash = "sha256:dca3bf98275a59c652b69d68e73433e597d977c2da9198882479d1a7188009c8", size = 4578798, upload-time = "2026-06-16T16:23:58.603Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/bf/c4/557dc082be035381b85fdb2b74e21d3d21b57750b74f2b47a32f3a639ff9/virtualenv-21.4.2-py3-none-any.whl", hash = "sha256:854210ca524a1a4d0d744734f4acbc721c3ffe163b85bbf5d56d14d5ae2f0fae", size = 7594079, upload-time = "2026-05-31T17:01:20.735Z" }, + { url = "https://files.pythonhosted.org/packages/2c/02/3623e6169bed617ed1e2d372f7c69f92ec28d54c4dfc997055c8578ec148/virtualenv-21.5.1-py3-none-any.whl", hash = "sha256:55aa670b67bbfb991b03fda39bd3276d92c419d702376e98c5df1c9989a26783", size = 4558820, upload-time = "2026-06-16T16:23:56.963Z" }, ] [[package]] name = "wrapt" -version = "2.2.1" +version = "2.2.2" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/2d/9f/06263fcd8ad6c405f05a3905fd7a84dd3176eb5ad46e44bccc0cd16348bb/wrapt-2.2.1.tar.gz", hash = "sha256:6744f504375775d7609c82c8d3d94af1c9a6f05586984536905908ba905277b9", size = 127620, upload-time = "2026-05-22T14:49:43.056Z" } +sdist = { url = "https://files.pythonhosted.org/packages/fe/a4/282c8e64300a59fc834518a54bf0afabb4ff9218b5fa76958b450459a844/wrapt-2.2.2.tar.gz", hash = "sha256:0788e321027c999bf221b667bd4a54aaefd1a36283749a860ac3eb77daed0302", size = 129068, upload-time = "2026-06-20T23:49:44.49Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b4/8b/84bc1ea68b620fe0e2696a8cff07e82f4b962d952ab14efee8955997bb70/wrapt-2.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0f68f478004475d97906686e702ddbddeaf717c0b68ad2794384308f2dc713ae", size = 80093, upload-time = "2026-05-22T14:47:27.074Z" }, - { url = "https://files.pythonhosted.org/packages/f3/8f/64ec81194a0bc708d9720174c998c8a32116e82b5b32c04e20a7fe01176c/wrapt-2.2.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:e422b2d647a65d6b080cad5accd09055d3809bdff00c76fba8dca00ca935572a", size = 81183, upload-time = "2026-05-22T14:47:29.062Z" }, - { url = "https://files.pythonhosted.org/packages/94/c2/3d186944aae923631d1def58f4c4ff8f0b6309906afc0b6978de3e69b3e0/wrapt-2.2.1-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:036dfb40128819a751c6f451c6b9c10172c49e4c401aebcdb8ecf2aec1683598", size = 152494, upload-time = "2026-05-22T14:47:30.583Z" }, - { url = "https://files.pythonhosted.org/packages/01/d1/6b3d0ea995b867d2862aad5619bd5e17de09a9d64a821f46832dcd272d40/wrapt-2.2.1-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:09ac16c081bebfd15d8e4dfa5bdc805990bbd52249ecff22530da7a129d6120b", size = 154310, upload-time = "2026-05-22T14:47:32.175Z" }, - { url = "https://files.pythonhosted.org/packages/f9/4b/37ecb90a8c3753e580327fb40731a984b754e3df65d2ef932bf359fe4adc/wrapt-2.2.1-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:07be671fa8875971222b0ba9059ed8b4dc738631122feba17c93aa36b4213e9a", size = 149002, upload-time = "2026-05-22T14:47:34.021Z" }, - { url = "https://files.pythonhosted.org/packages/e7/d0/918884d9dfa84d0d135b42a51c00910f5c5447fe7a5e211a8e16ac324dd4/wrapt-2.2.1-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:93fc2bf40cd7f4a0256010dce073d44eeb4a351b9bca94d0477ce2b6e62532b3", size = 153185, upload-time = "2026-05-22T14:47:35.722Z" }, - { url = "https://files.pythonhosted.org/packages/4c/00/382299d8ced610b29b59b099a89eda821e8c489aa152b7183748ac83f32a/wrapt-2.2.1-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:ba519b2d765df9871a25879e6f7fa78948ea59a2a31f9c1a257e34b651994afc", size = 148040, upload-time = "2026-05-22T14:47:37.052Z" }, - { url = "https://files.pythonhosted.org/packages/6c/46/62a79b79e35bbebb1207ca5d15b81192f37f20cc5659cf4e3ce955b7fcc8/wrapt-2.2.1-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:9011395be8db1827d106c6449b4bb6dd17e331ff6ec521f227e4588f1c78e46f", size = 151773, upload-time = "2026-05-22T14:47:38.713Z" }, - { url = "https://files.pythonhosted.org/packages/a1/db/95c152151d206d4b430516c89725306e92484072f38e65492afde63f6d19/wrapt-2.2.1-cp310-cp310-win32.whl", hash = "sha256:a8f7176b83664af44567e9cc06e0d3827823fcc1a5e52307ebb8ac3aa95860b9", size = 77393, upload-time = "2026-05-22T14:47:40.061Z" }, - { url = "https://files.pythonhosted.org/packages/13/d3/882d50452c6fbd13f24fe5d2644b97cdad2565a7e1522cbb6312de8a52cf/wrapt-2.2.1-cp310-cp310-win_amd64.whl", hash = "sha256:d7f513d3185e6fec82d0c3518f2e6365d8b4e49f5f45f29640d5162d56a23b54", size = 80350, upload-time = "2026-05-22T14:47:41.194Z" }, - { url = "https://files.pythonhosted.org/packages/58/0f/148376523b4e370692286a9ba14d5715cf3c5b86da3bd3630926367b6b73/wrapt-2.2.1-cp310-cp310-win_arm64.whl", hash = "sha256:44255c84bc57554fed822e83e70036b51afa9edb56fc7ca56c54410ece7898c9", size = 79149, upload-time = "2026-05-22T14:47:42.835Z" }, - { url = "https://files.pythonhosted.org/packages/5f/ac/4370bde262c0e633e6c4f0e56d55095710024cf9a5cecc20c59a10de483c/wrapt-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:dd57607acc85678925940bd5df0385ff8332083a32fa8d7a43f8767f4997263c", size = 80321, upload-time = "2026-05-22T14:47:43.996Z" }, - { url = "https://files.pythonhosted.org/packages/eb/79/b8ff3a61e71babf58a8cf4c0d63358e8bad383e15bf7f35e62d2f6b6e4a4/wrapt-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:1ae574d65c9fa8e86f64f6a7c2668f9fcd507b183e0e577619f504b883cb0a6c", size = 81216, upload-time = "2026-05-22T14:47:45.243Z" }, - { url = "https://files.pythonhosted.org/packages/6e/fd/c0cac1f77c9c4f6fe58a920ca632ce379bb8be928720e11e8d73de28a5e9/wrapt-2.2.1-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9a04c28c10ba7fd12842b109d2edb0678872a2fe65277ca4ff06a0d61edee245", size = 159208, upload-time = "2026-05-22T14:47:47.176Z" }, - { url = "https://files.pythonhosted.org/packages/d9/4f/744132a7b2fbefa6b81118ec5942eca5fc2e9a129f9055a0c5e46885a549/wrapt-2.2.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3e2f02472a1cbbf3884b365714a810b5947134a95ad6952b554cb8cce9d492b0", size = 160322, upload-time = "2026-05-22T14:47:49.04Z" }, - { url = "https://files.pythonhosted.org/packages/d6/95/b7cd9a22a06cf93e6482904ee6afc956248983553593fd1009296d1b3b31/wrapt-2.2.1-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:ac2745950b2bff80219c15ebf2fa9d8427eba7e249739f97e55c9d169e47e9e1", size = 153243, upload-time = "2026-05-22T14:47:50.386Z" }, - { url = "https://files.pythonhosted.org/packages/4c/4a/eb79423192015f46f0db2872e7e04a3dde8d359b83411e8959e7c9287eaa/wrapt-2.2.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:67a97e5b6c457f0cd3cfc19ebb2d84463e60c3ece754cc831e4281a3ca29bb18", size = 159231, upload-time = "2026-05-22T14:47:51.753Z" }, - { url = "https://files.pythonhosted.org/packages/ec/dc/435015b58ce33c6fc4104158fa91ddb0e809ab03a5751fb7465d1d461456/wrapt-2.2.1-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:c803a3d331796255af51ba2c79ed0ac8275865b516c09e61f248d1e7aff31ce9", size = 152351, upload-time = "2026-05-22T14:47:53.214Z" }, - { url = "https://files.pythonhosted.org/packages/77/ac/5d203f98df8fd136b95c5227139aea02d34505e18baf812d0c005df61963/wrapt-2.2.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:9b984d1eb252145d6302c1dbd5e87fc6d404d45531447c84eadec04bf1fcb027", size = 158347, upload-time = "2026-05-22T14:47:54.982Z" }, - { url = "https://files.pythonhosted.org/packages/52/2f/a92427dbdc74e54c1674abbed27e61b2cb5e7a94441b8c1270c70671d928/wrapt-2.2.1-cp311-cp311-win32.whl", hash = "sha256:8a983a603a18c8708f024f7f6991b2e66159219abbf894634c5056243c55f3cd", size = 77562, upload-time = "2026-05-22T14:47:56.275Z" }, - { url = "https://files.pythonhosted.org/packages/c8/56/987b9c13b3e1c1a3c6de71284076f996b79caec90e75a87c044a40c23db9/wrapt-2.2.1-cp311-cp311-win_amd64.whl", hash = "sha256:9c210a6994b21aa9b29e81c8d11560e8fdab54c117e9cff37870d0a27bde1343", size = 80616, upload-time = "2026-05-22T14:47:57.854Z" }, - { url = "https://files.pythonhosted.org/packages/7e/25/d01f560888d99d94a959c85533de349ce68d71ace3f2591d6ea8f632cfed/wrapt-2.2.1-cp311-cp311-win_arm64.whl", hash = "sha256:401229e9d63ca09f9b8891ecf83798d26c11bbb445d11ed9f1836b6d4585b38a", size = 79025, upload-time = "2026-05-22T14:47:59.089Z" }, - { url = "https://files.pythonhosted.org/packages/89/0c/bfae7b9401583b6d05938cd16dedc43857d96da2f8a3d50d78cc515bf6ff/wrapt-2.2.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:3ffad790d9d11d8ecf9f17c4bb671a5b4089e4d8b575c46c5129597f41f836b0", size = 81021, upload-time = "2026-05-22T14:48:00.313Z" }, - { url = "https://files.pythonhosted.org/packages/26/58/80f6a6599f933f4caecc1cb3ee88a04faf81e8b9bddbd6109c688dd63e0f/wrapt-2.2.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:628f5220c7a904d5fc78f7075c8d7871433eb6d035c94728a22fdf85f193d2a8", size = 81692, upload-time = "2026-05-22T14:48:01.49Z" }, - { url = "https://files.pythonhosted.org/packages/17/93/fb357cc7847c58a8ae790be718903afa81a28d23e642c843dc4129e8a0b2/wrapt-2.2.1-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:61acce4257a9883669703c525447c5b4c392edf0f987ae77ec32668440158f0e", size = 169364, upload-time = "2026-05-22T14:48:02.791Z" }, - { url = "https://files.pythonhosted.org/packages/aa/0b/76b601ee309a8bd556af0eecb184394c20b3c49aa9c8e085aa1ffacc2568/wrapt-2.2.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:727ab4244622cd6ad2390f322642090c877d2e83a608d2653a7643ae5368d926", size = 171079, upload-time = "2026-05-22T14:48:04.22Z" }, - { url = "https://files.pythonhosted.org/packages/cd/87/ee3f32d5658e3e26d3e0e457922b47a36dd3bfbdfee7f97bb3e802344a66/wrapt-2.2.1-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:03df9ebed4c73ab93fa8c07e3d41d818dfca1852b15731a3de59457b27814624", size = 160205, upload-time = "2026-05-22T14:48:05.553Z" }, - { url = "https://files.pythonhosted.org/packages/b1/d0/ae2fd64277a67f5d7bffcf2d05eea1e476263fb2a072baf0b0129ab85984/wrapt-2.2.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0d9ff006f420b2ec8296aa56ade43ea7da3e997e85769f0aafc5e0661aacb710", size = 168922, upload-time = "2026-05-22T14:48:07.132Z" }, - { url = "https://files.pythonhosted.org/packages/b1/f3/2d541a060c5bbafb9400bca4917e4d78bfd1f239f404782c86831a8f6b29/wrapt-2.2.1-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:844c858fc3bb7eacc0ba8efa904935d16aac6a4470948ad1e7e55c9f5a2a665f", size = 158388, upload-time = "2026-05-22T14:48:08.629Z" }, - { url = "https://files.pythonhosted.org/packages/1d/68/8d92c8800c57e93cb116ae9e9d6cbafc34fade5ee9f9107b6f203fb4dc35/wrapt-2.2.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:87bacdaf225117a342a20d9c03438d701c02112f6e3f351ce9b7f32354f14797", size = 167682, upload-time = "2026-05-22T14:48:10.042Z" }, - { url = "https://files.pythonhosted.org/packages/30/72/83ea3790ea352439442349388e29ff07b76e0686265f9088bbb505d1608d/wrapt-2.2.1-cp312-cp312-win32.whl", hash = "sha256:2f8c90c8afde51969487be4e1343ae049b268854877d415c2510baf833775052", size = 77857, upload-time = "2026-05-22T14:48:11.782Z" }, - { url = "https://files.pythonhosted.org/packages/ef/cb/99450668dd3502d62a54a1c8aa56e44f34cb8c1261b381cfe2e7926c3b75/wrapt-2.2.1-cp312-cp312-win_amd64.whl", hash = "sha256:6ce32763ac31ce94fe9aada947e479b1975012bff166da409b4b9e4e376cf7e5", size = 80825, upload-time = "2026-05-22T14:48:13.046Z" }, - { url = "https://files.pythonhosted.org/packages/e6/3a/87512881be64e743f9ee4c66f4cbe8e884974bef2a5989af71f999653ac7/wrapt-2.2.1-cp312-cp312-win_arm64.whl", hash = "sha256:8d1b4d0e0c2119587a31f5c029abd547e0c81d93b89d394566fe1588659eb579", size = 79087, upload-time = "2026-05-22T14:48:14.323Z" }, - { url = "https://files.pythonhosted.org/packages/88/d1/a1b08f8f4fac8cbb156fa51cf64ee2c7f7f74f9875ba3cf70b3c58368694/wrapt-2.2.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:d2beb1c7cab10603aecdc42f8edd6ff013f9a32e4543474e38e6b77ce9975aeb", size = 80831, upload-time = "2026-05-22T14:48:15.598Z" }, - { url = "https://files.pythonhosted.org/packages/54/ce/57890814991446a845e09b3445ce8b694f27eb0577004f2c2a36a9772ed4/wrapt-2.2.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e0cb7e4dd71f4c32e5e84843cd3c4cd65dda034314004bbe1d7f99af2426ab80", size = 81375, upload-time = "2026-05-22T14:48:17.071Z" }, - { url = "https://files.pythonhosted.org/packages/38/65/08d7a6c76ac4493bdb668205ee9c1de1bd5daca61717c3e9aa49b4c01499/wrapt-2.2.1-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:95821352042722cd9f1108874579a47989d0a7e12a37d87d2fc4af20fd99ab8a", size = 167417, upload-time = "2026-05-22T14:48:18.303Z" }, - { url = "https://files.pythonhosted.org/packages/62/ce/f1ccbee7a1bfe5cdc6b3da6bab4b45713d628b9294da32a39f563d648140/wrapt-2.2.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:abd621552ede77c4c69be7fac44ba911225b0c812b6ba604e5964cf98085b474", size = 166948, upload-time = "2026-05-22T14:48:19.768Z" }, - { url = "https://files.pythonhosted.org/packages/86/2a/f85d48d1cd4869aee6704028d257d740a47c1c467b457ce396b4b5b55d07/wrapt-2.2.1-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e3677c7146ce694874941ba82b57092cc4875445aadf29d72807351023105143", size = 158148, upload-time = "2026-05-22T14:48:21.96Z" }, - { url = "https://files.pythonhosted.org/packages/fe/5c/93939ad11d4a12358ab1aab219a2ef5efa5612e0db6b9fc65af8af1a891b/wrapt-2.2.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:9a5934eaea872e17936b5f45501eba5ab0bce9a74122e172b663d7c28c459c4a", size = 165905, upload-time = "2026-05-22T14:48:23.373Z" }, - { url = "https://files.pythonhosted.org/packages/e0/22/b8c2aa89862ff58605934d7abf4b70e6a5a1c33df96656f49035ccdf1c8a/wrapt-2.2.1-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:f5b9daf6b629fce418e0cc3dd0436eac045188fa35deadb7a7f3941d5b8203f9", size = 156712, upload-time = "2026-05-22T14:48:24.767Z" }, - { url = "https://files.pythonhosted.org/packages/5d/78/bf00a7b02239c12bb02ddcc3c0b971bfcc36e578c5a44f1ccfef5b458545/wrapt-2.2.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:f53ac9f3ef573326d009ed809beff4efcac6451931c2b8132586da4b9e53ff31", size = 166560, upload-time = "2026-05-22T14:48:26.83Z" }, - { url = "https://files.pythonhosted.org/packages/fe/93/6390ca9c5b787683cef588d04f57c8d41b9a2323b5597a65f18638c90ef2/wrapt-2.2.1-cp313-cp313-win32.whl", hash = "sha256:1ffa9cfd4bdb581539951b14ae661ff20ed0c3599b3e911a131ee0ec5ac11337", size = 77817, upload-time = "2026-05-22T14:48:28.221Z" }, - { url = "https://files.pythonhosted.org/packages/97/73/ce10f0e71c0cfaa1a65faadb8efd4852028b3bb9ba28932b8889df769d38/wrapt-2.2.1-cp313-cp313-win_amd64.whl", hash = "sha256:368eac1e20fd0bb03dd3cc42bf9887154c3861b60989389ccb5fac032617d215", size = 80736, upload-time = "2026-05-22T14:48:30.139Z" }, - { url = "https://files.pythonhosted.org/packages/c7/4c/89f4a6818fafbbd840330e4fa3873073e1bfc166133a64cac7f8fde7a5e3/wrapt-2.2.1-cp313-cp313-win_arm64.whl", hash = "sha256:c754dafdf5aaf0b401b644a90a30046929a0dd1a536e0ff0ec959a59155d9c7f", size = 79099, upload-time = "2026-05-22T14:48:31.405Z" }, - { url = "https://files.pythonhosted.org/packages/bf/f2/9a8741c46f8c208ac0a45b25ba170bcb4fb72a2781d5fb97dbd7b6be73cb/wrapt-2.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ed928d0fda15fc0adc8d13305c8b3c0f2fba5b0669950c9e6d019d9162a3b3e8", size = 82802, upload-time = "2026-05-22T14:48:33.307Z" }, - { url = "https://files.pythonhosted.org/packages/9c/0d/e9c855716a3705eef1416456bdf062b60620726fdc59428ff670fc3c60dc/wrapt-2.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fafb4e739e43544d12cb4abd1605fd4683b6ca6a9ad682b7fd8f4d21973eafa8", size = 83329, upload-time = "2026-05-22T14:48:34.593Z" }, - { url = "https://files.pythonhosted.org/packages/3b/d6/a88f1c13112b7831adac75cea65d8310e0d696d570c8961844c90a57b865/wrapt-2.2.1-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:74d6a0c31472fe5d814917266b9f46495d7c61ed890af08b468acea92fb89a8d", size = 202937, upload-time = "2026-05-22T14:48:35.859Z" }, - { url = "https://files.pythonhosted.org/packages/42/65/e29d54aef06a4d898a5b8a25589a0b3769bde454f922fad8f6f89fbfb650/wrapt-2.2.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ab5be648d5a0b86b7438864f8df3c705a65cef35a2fd3e5561e3e203167e0f27", size = 209997, upload-time = "2026-05-22T14:48:38.153Z" }, - { url = "https://files.pythonhosted.org/packages/2a/91/e4454263516cf0e12640912fbca9a83654e424f0a6ddb79f5cd7ce14bf33/wrapt-2.2.1-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9d8f204c8e3a8bf9ece17e0a83d137fd807440977f8a5e762d59306795011440", size = 194856, upload-time = "2026-05-22T14:48:39.69Z" }, - { url = "https://files.pythonhosted.org/packages/de/d0/fe0ee202286afdf4a7f77dd29f195703145764d572aec209c5086e57d924/wrapt-2.2.1-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:d047f6498c973874ba08ac3f97c69a2c4b2211c8de6f4c205f75cb1c9522596e", size = 205654, upload-time = "2026-05-22T14:48:43.456Z" }, - { url = "https://files.pythonhosted.org/packages/23/b6/87d860dfc6460c246af70b1fd5c8b76df77571b42a493459423ded94fd7d/wrapt-2.2.1-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:7a4fdb9326aab4a5a477a1640e5ad786a8495901009d7e7b038371edd23a9d2b", size = 192206, upload-time = "2026-05-22T14:48:44.858Z" }, - { url = "https://files.pythonhosted.org/packages/df/46/3eea8cde077d985f239a38c0257087b8064fd9ee9b1a99e282d2c86da4ef/wrapt-2.2.1-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:c8cc5094b08abeae52da9c73c8a32003623be691a5193df2f4e3eac3d557c394", size = 198428, upload-time = "2026-05-22T14:48:46.319Z" }, - { url = "https://files.pythonhosted.org/packages/18/dc/b927ee9c7fc67adc3a5658f246a0d275425eb840ba36e7b702e70f18bde8/wrapt-2.2.1-cp313-cp313t-win32.whl", hash = "sha256:9907a4402ab6db12b7077a0ea5d7a4d028ecb22c8eee2b53527080d347cd1562", size = 79448, upload-time = "2026-05-22T14:48:47.901Z" }, - { url = "https://files.pythonhosted.org/packages/ec/b3/fd30b473fe498c70e6b9a5f328b8d3fbaf1b8c3c481465f59724bba8eb70/wrapt-2.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:5590d63f5243251641cf543009b4c9314a79d0598fdb8a8e4cfc918494536c53", size = 83021, upload-time = "2026-05-22T14:48:49.201Z" }, - { url = "https://files.pythonhosted.org/packages/ee/f3/96c39153a8737a6e9aa85adef254ac4195bea3f2d24efc60472ccc3c9e2e/wrapt-2.2.1-cp313-cp313t-win_arm64.whl", hash = "sha256:c318a64b53d97b841d7b5e637517e50a27be64bc695128422953d4b21710954e", size = 80295, upload-time = "2026-05-22T14:48:50.479Z" }, - { url = "https://files.pythonhosted.org/packages/0a/a3/11d7f34ebbf3231bc907a3e6d5ee051b14d034c1bc7b65a97d5cc00516df/wrapt-2.2.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:6f56a647e4eaf5f0ca40330fb070f566bdf9f7b0db89a1af20d71c28dcd7a0ab", size = 80879, upload-time = "2026-05-22T14:48:51.802Z" }, - { url = "https://files.pythonhosted.org/packages/13/3c/b74cfd984cef560b900fb1a727af20352d89e1f06bf2e1114dd3f00f5f5a/wrapt-2.2.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:64b7deeda4b70408e382328d8bbe52a256fe9bc63ae3db86d804608367e5422c", size = 81462, upload-time = "2026-05-22T14:48:53.18Z" }, - { url = "https://files.pythonhosted.org/packages/15/a3/7c8f704b8dc07dfe0a5d01c2edbfd88317aa8e5e3fa7c743eb7a085ae767/wrapt-2.2.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b9cf53ba90717db2e292401de290776c498d4bbfb0d4a559ca2895db8b9dcb5c", size = 167251, upload-time = "2026-05-22T14:48:54.562Z" }, - { url = "https://files.pythonhosted.org/packages/80/85/a34d1888d97247da6c2ff6118c3a721c73ed8cc4dd198c00208bb73b6f80/wrapt-2.2.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:cf3638274ab9d9b724c9baa0b4c04e132cd6faefb78b4dd3dd1a02a4bdaad41e", size = 166316, upload-time = "2026-05-22T14:48:56.065Z" }, - { url = "https://files.pythonhosted.org/packages/e9/d7/72ffaeb01eebc704afe3fb99e840480f4bda45f0fa66e3381b6a39251c8f/wrapt-2.2.1-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:aed9658797d0b45d6c49adcfc6b41f66e6f2d0c6de3ec79e16cf4b1855df240f", size = 157952, upload-time = "2026-05-22T14:48:57.924Z" }, - { url = "https://files.pythonhosted.org/packages/24/5b/36f5d6b024e4edfdd90b140742d11ebcf7836daf5c9daf326c55c24db412/wrapt-2.2.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:1d676ee388bc42a04d56dd7deb5605244dac2e35cc2fadbb43c9fa25bbd93508", size = 166130, upload-time = "2026-05-22T14:48:59.384Z" }, - { url = "https://files.pythonhosted.org/packages/81/06/9296d9e97bfdef5483dfcc859d57b095b257144b2bc5300ab521e06f4bc7/wrapt-2.2.1-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:e395f7bc31851ef9b612050368cb446e9bc14cd7454b025018980349caf25ae5", size = 156604, upload-time = "2026-05-22T14:49:00.921Z" }, - { url = "https://files.pythonhosted.org/packages/53/37/16953929ed6776175720e58fc966e779926d8d71e2c7b2273230590ca71f/wrapt-2.2.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5f1845c2a8cc1180ccccfa45785dd06f562730d19ef75be180334254012b6283", size = 166007, upload-time = "2026-05-22T14:49:02.332Z" }, - { url = "https://files.pythonhosted.org/packages/b9/73/20ee58c0612dae7c31131a7095345812ed2c7b389019e175f68cde34e5b4/wrapt-2.2.1-cp314-cp314-win32.whl", hash = "sha256:436addbc4bb4fc0a88c702577f51195d7d73683a7f3e0e5b253d8404d7847243", size = 78327, upload-time = "2026-05-22T14:49:03.722Z" }, - { url = "https://files.pythonhosted.org/packages/22/b3/ef7c3295d02e0448a71c639a36a057f46d524d057c9486291a7a3039e65c/wrapt-2.2.1-cp314-cp314-win_amd64.whl", hash = "sha256:50972a1d974ea07725a7f6b1cec5f8759008afd030a0024843ebe7d52de47f2b", size = 81144, upload-time = "2026-05-22T14:49:05.093Z" }, - { url = "https://files.pythonhosted.org/packages/ac/dc/7bdf336953f99f4ceb0a584bb8870e42c8f26f93ea10c87834dad62f1668/wrapt-2.2.1-cp314-cp314-win_arm64.whl", hash = "sha256:1c9934ea5d92957e3cd0adbc0845539dccfd62710ebe16195a8c66c53954db36", size = 79569, upload-time = "2026-05-22T14:49:06.413Z" }, - { url = "https://files.pythonhosted.org/packages/6a/6d/6dfae80150ff1919c356d1dd528f049bcdfaae29b4d284bc957e022caef4/wrapt-2.2.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:17de18fc12cea55b8a9587314cb830573e37fb33b247a7515696350863714188", size = 82892, upload-time = "2026-05-22T14:49:07.925Z" }, - { url = "https://files.pythonhosted.org/packages/82/7b/4e34766a7d7804ffce9e71befe47e9b3225dc350c49c94493c4ab39fd3a5/wrapt-2.2.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a9dec1aca52dddde7df94818310fa2fe79739c8f385b2014c4cb1035f5508199", size = 83333, upload-time = "2026-05-22T14:49:09.257Z" }, - { url = "https://files.pythonhosted.org/packages/9d/57/0b34db3e8de44ccfece62d7b337abd1631dd810f5adc5f3db571727836b5/wrapt-2.2.1-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:69f2e9244542cb34dd59c7f073445b9e54ad9f3fce8d93606c368a1b499fc413", size = 202899, upload-time = "2026-05-22T14:49:10.572Z" }, - { url = "https://files.pythonhosted.org/packages/e5/45/ac0c459f154b99d92789a6cba7ca727185b83513b986f8ec7fe2aacddcbf/wrapt-2.2.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2d83966dc7f4f45e8b97b5933685ac2e6e67fc0e19246ea314bceb9a8970c956", size = 209986, upload-time = "2026-05-22T14:49:12.229Z" }, - { url = "https://files.pythonhosted.org/packages/b7/e4/77e37ff33ad018fa81ade52c25fa327b80b56f81d734279a63614fcb4cbc/wrapt-2.2.1-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:78b0aa6bfb7be8deed0ab23e7aa028cc5210c29bc2d32a04d52b50e517a7307e", size = 194893, upload-time = "2026-05-22T14:49:14.139Z" }, - { url = "https://files.pythonhosted.org/packages/dd/9d/7ea651d1ab032fc5fa222fbec91d0f8a1397f6ae04ebb93fa7219aa921d7/wrapt-2.2.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:05d5cb74d1b232ec8cfa130a8f900708699ff2491d97b8f85a4cdc5996294b85", size = 205636, upload-time = "2026-05-22T14:49:15.714Z" }, - { url = "https://files.pythonhosted.org/packages/09/af/8e88031a701275b9085c54e64bc88c0b1cd55c77eadd400691c371cd76c4/wrapt-2.2.1-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f6518b94edb9150452e9aba08027d4cc293433753ec1fbefb4629a21cbc74181", size = 192267, upload-time = "2026-05-22T14:49:17.283Z" }, - { url = "https://files.pythonhosted.org/packages/bf/a8/e657ca876b06710194f243d81c4b0896ade646e244bdbec2d87c8c56a8bd/wrapt-2.2.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:ed55af48b3eb28f43228ca2306788892bcb629eb2b5c4876e2a3659872c2f17a", size = 198378, upload-time = "2026-05-22T14:49:18.785Z" }, - { url = "https://files.pythonhosted.org/packages/c8/59/822efe4ea722a3961331bfa35b7d90937790d2c20f0616de1997ccc3aebd/wrapt-2.2.1-cp314-cp314t-win32.whl", hash = "sha256:2e08688ab16525897da6589d56d0aebaf417bbe91c2d8e3b96203b1efa596e85", size = 80226, upload-time = "2026-05-22T14:49:20.264Z" }, - { url = "https://files.pythonhosted.org/packages/ab/31/2a7dc5f6abb2fca0b6e1610e120419f603650aceb4f1d3ac4cae0354e162/wrapt-2.2.1-cp314-cp314t-win_amd64.whl", hash = "sha256:fd0135d34387f5fd087d9be368ea77ea89cf2451dc1cd1c622d35021bcb3ab50", size = 83835, upload-time = "2026-05-22T14:49:21.634Z" }, - { url = "https://files.pythonhosted.org/packages/9f/c0/782b86e28d1ceebeb74cccea12d2cd3d2ba0bd68e3dec20b1bc5873f6127/wrapt-2.2.1-cp314-cp314t-win_arm64.whl", hash = "sha256:f70db64e8266d7c45d3b735f2e08eeb434b5e03da9a479ae42b2e2e486a21a00", size = 80722, upload-time = "2026-05-22T14:49:23.59Z" }, - { url = "https://files.pythonhosted.org/packages/53/46/29ac9daf11a86c22a8c38cd9236c62928ccae83f7ceb06bd3b0467cf9d05/wrapt-2.2.1-py3-none-any.whl", hash = "sha256:3aafea2975caef8ca49400640dde02cc7426e798f24870ed01f490bc3cffd32f", size = 61000, upload-time = "2026-05-22T14:49:41.593Z" }, + { url = "https://files.pythonhosted.org/packages/e1/8b/59781d0fe7b0adfbea37f600857de4be68921e454aeecf1a11bda35cdccc/wrapt-2.2.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:055e6fcfaa28e58c6a8c247d48b92be9d56f818b7068aa4f22b15b3343a09931", size = 80556, upload-time = "2026-06-20T23:47:28.473Z" }, + { url = "https://files.pythonhosted.org/packages/94/dc/66c61aca927230c9cf97a3cb005c803971a1076ff9f7d61085d035c20085/wrapt-2.2.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:8374eb6b1a58809211e84ff835a182bb17ab2807a5bfef23204c8cff38178a00", size = 81648, upload-time = "2026-06-20T23:47:30.504Z" }, + { url = "https://files.pythonhosted.org/packages/23/1b/545eee1c18f3af4cf140bb5822b6ef81ebe569df0a63ac109973103a30a5/wrapt-2.2.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:656593bb3f5529f03d27af4136c4d7b11990e470bcbc6fefa5ef218695bece55", size = 152956, upload-time = "2026-06-20T23:47:31.867Z" }, + { url = "https://files.pythonhosted.org/packages/44/a7/6f42a3d03e44dc612a5dcff324e7366075a7857f0be2d49a8cb8a68279b8/wrapt-2.2.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dfb00cb7bb22099e2f64b7340fb96113639aa7260c0972af3797ace2297b936c", size = 154771, upload-time = "2026-06-20T23:47:33.352Z" }, + { url = "https://files.pythonhosted.org/packages/bf/55/4d76175aaa97523c38f1d28f79d18ab41a1b116814158a818bc0eba00571/wrapt-2.2.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e7f10ee0bd53673bfd52b67cbce83336fe6cad90d2377b03baf66491d2bbfb91", size = 149460, upload-time = "2026-06-20T23:47:34.712Z" }, + { url = "https://files.pythonhosted.org/packages/84/9b/12e23264d8f4735e8483262f95c5a6b03c3665fd2a84bdf99a45b6a2f4ec/wrapt-2.2.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:4402f57c5f0d0579599858ffbdd9bf4e3f0972f51096f2bd6cc7dab6b76ee49e", size = 153648, upload-time = "2026-06-20T23:47:36.092Z" }, + { url = "https://files.pythonhosted.org/packages/d6/a3/bcd5ec37289dcd85ecd4d15395a6a6063d60bc45ff94a9d77814e1e54d64/wrapt-2.2.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:3a4eb7964ff4643d333c84f880bcf554652b2a1050aebc54ae696327f61acfaf", size = 148502, upload-time = "2026-06-20T23:47:37.623Z" }, + { url = "https://files.pythonhosted.org/packages/f2/be/716d708f607fa70f8a6eb47dff8ee945d5278dfc89ffeeff33039d052e63/wrapt-2.2.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:e542b7c5af91e2123a8aabf19894319d5ec4268d2a9ffd2f239386133fc47746", size = 152238, upload-time = "2026-06-20T23:47:39.118Z" }, + { url = "https://files.pythonhosted.org/packages/b5/c0/1a48e7e54501274f5d906f18372221b13183b0afbb5b8bb4c7ca0392c0b4/wrapt-2.2.2-cp310-cp310-win32.whl", hash = "sha256:6e7e45b43d3c774d244fe7264378f5a3f0f383bc55a54a9866434e524540110f", size = 77278, upload-time = "2026-06-20T23:47:40.476Z" }, + { url = "https://files.pythonhosted.org/packages/b0/82/9cd69a1af288fbdedf01a10e3c8a0b6890b08c7f3f96d36a213699dbcd94/wrapt-2.2.2-cp310-cp310-win_amd64.whl", hash = "sha256:955f1d6e72a352e478de8d8b503abe301c5e139a141b62eb0923bd694995025f", size = 80131, upload-time = "2026-06-20T23:47:41.785Z" }, + { url = "https://files.pythonhosted.org/packages/7f/73/8db7e27daef37ae70a53ea62bef7fe80cc51a8b5e9e9181a8be6eb9a999c/wrapt-2.2.2-cp310-cp310-win_arm64.whl", hash = "sha256:b89d8d73c82db2bb7e6090b3afd7973f980d24e905cc34394eab60b884b3bf67", size = 79615, upload-time = "2026-06-20T23:47:43.109Z" }, + { url = "https://files.pythonhosted.org/packages/27/15/0c2d55168707465abfc41f33c0b23d792a5fa9b65c26983606940900a120/wrapt-2.2.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f1a2ff355ece6a111ca7a20dc86df6659c9205d3fcee674ca34f2a2854fd4e73", size = 80782, upload-time = "2026-06-20T23:47:44.367Z" }, + { url = "https://files.pythonhosted.org/packages/7d/b5/5c0b093eb48f8a062ef6267d3cb36e9bb1b88440181f6545a383c60efdf8/wrapt-2.2.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:55b9a899e6fff5444f229d30aa6e9ac92d2216d9d60f33c771b5d76a760d5f8e", size = 81678, upload-time = "2026-06-20T23:47:45.857Z" }, + { url = "https://files.pythonhosted.org/packages/34/f3/de70937472dd3e8a4e6811192f9c6075efdffd4a2cd9b4596bf160f89668/wrapt-2.2.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a2d78c363f97d8bd718ee40432c66395685e9e98528ccaa423c3355d1715a26d", size = 159671, upload-time = "2026-06-20T23:47:47.345Z" }, + { url = "https://files.pythonhosted.org/packages/a5/ec/40aed2330e7f02ecf74386ffcfef9ccb7108c6a430f15b6a252b663b1bed/wrapt-2.2.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d619e1eed9bd4f6ed9f24cd61971aa086fa86505289628d464bcf8a2c2e3f328", size = 160785, upload-time = "2026-06-20T23:47:48.759Z" }, + { url = "https://files.pythonhosted.org/packages/45/04/aa5309beed5344b00220ae6b3b24055852192656194c27947bee1736306a/wrapt-2.2.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:518b0c5e323511ec56a38894802ddd5e1222626484e68efe63f201854ad788e5", size = 153699, upload-time = "2026-06-20T23:47:50.177Z" }, + { url = "https://files.pythonhosted.org/packages/01/df/2def7e99d1fe87eea413f95f671924cdddcb08823b1ffd212748dfa6d062/wrapt-2.2.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:4bccea5cdecffa9dd70e343741f0e41e0a16619313d04b72f78bb525162ebcd0", size = 159695, upload-time = "2026-06-20T23:47:51.602Z" }, + { url = "https://files.pythonhosted.org/packages/c7/f6/a906d01a2ce12157bad2404957b3e2140da354b8a70b2fa48bbf282871c0/wrapt-2.2.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:209112cafd963710a05d199aae431d79a28bc76eb8e6d1bbbb8ad24340722cae", size = 152813, upload-time = "2026-06-20T23:47:53.03Z" }, + { url = "https://files.pythonhosted.org/packages/02/49/bc0086292d239575b4c08f4cf8a4079fa58abbad58ec23abf84833a283ed/wrapt-2.2.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:e5a5290e4bf2f332fc29ce72ffb9a2fff678aaac047e2e9f5f7165cd7792e099", size = 158809, upload-time = "2026-06-20T23:47:54.391Z" }, + { url = "https://files.pythonhosted.org/packages/55/83/8fbd034de1f3e907edaa18786d5dd8f6932874edee0826c7cecb5cab03a1/wrapt-2.2.2-cp311-cp311-win32.whl", hash = "sha256:5499236ad1dc116012e2a5dd943f3f31af12fce452128e2bbcbd55a7d3d4d14c", size = 77414, upload-time = "2026-06-20T23:47:55.882Z" }, + { url = "https://files.pythonhosted.org/packages/7e/9c/23695baa331c6de4e874c3d78b8e0bed92e1d2a274e665b29858f6841672/wrapt-2.2.2-cp311-cp311-win_amd64.whl", hash = "sha256:8636809939152be6ae20a6cef0fed9fe60f411b47847d0426a826884b469e971", size = 80368, upload-time = "2026-06-20T23:47:57.237Z" }, + { url = "https://files.pythonhosted.org/packages/08/49/40cefc342bf89b234a4490d741290fce781774b831aefb39c25471da96c9/wrapt-2.2.2-cp311-cp311-win_arm64.whl", hash = "sha256:5d0a142f7af07caeb5e5da87493162a7b8efa19ba919e550a746f7446e13fb30", size = 79489, upload-time = "2026-06-20T23:47:58.56Z" }, + { url = "https://files.pythonhosted.org/packages/2a/85/180b40628b23772692a0c76e8030114e1c0ae068470ed531919f0a5f2a4a/wrapt-2.2.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8417fd3c674d3c8023d080292d29301531a12daf8bd938dd419710dd2f464f2b", size = 81484, upload-time = "2026-06-20T23:47:59.924Z" }, + { url = "https://files.pythonhosted.org/packages/94/f2/21c90f2a16689702e2aaff45795b11018dff2c9b1242bac10d225483f676/wrapt-2.2.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:0e7070c7472582e31af3dfc2622b2381a0df7435110a9388ed8db5ffbce67efb", size = 82151, upload-time = "2026-06-20T23:48:01.303Z" }, + { url = "https://files.pythonhosted.org/packages/5f/b3/7e6e9fcf4fe7e1b69a49fe6cc5a44e8224bab6283c5233c97e132f14908e/wrapt-2.2.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:2e096c9d39a59b35b63c9aacfbbbec2088ff51ff1fc31051acc60a07f42f273a", size = 169828, upload-time = "2026-06-20T23:48:02.719Z" }, + { url = "https://files.pythonhosted.org/packages/0b/43/894f132d857ed5a9904d937baf368badcbe5ea9e436e2f1930fe21c9f1f0/wrapt-2.2.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6d1a6050405bf334be33bf66296f113563622972a34900ae6fa60fd283a1a900", size = 171544, upload-time = "2026-06-20T23:48:04.266Z" }, + { url = "https://files.pythonhosted.org/packages/29/de/3c833e03725b477e9ea34028224dd21a48781830101e4e036f77e8b6b102/wrapt-2.2.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:10adb01371408c6de504a6658b9886480f1a4919a83752748a387a504a21df79", size = 160663, upload-time = "2026-06-20T23:48:05.708Z" }, + { url = "https://files.pythonhosted.org/packages/33/be/27edce350b24e3054d9d047f65f16d4c4d4c1f3f31c4278a1f8a95c723c8/wrapt-2.2.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:3442eee2a5798f9b451f1b2cd7518ce8b7e28a2a364696c414460a0e295c012a", size = 169387, upload-time = "2026-06-20T23:48:07.243Z" }, + { url = "https://files.pythonhosted.org/packages/e2/c4/9fd9679af8bf38e146652c7f47b6b352c3e5795b4ad1c0b7f94e15ac2aa7/wrapt-2.2.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:6c99012a22f735a85eed7c4b86a3e99c30fdd57d9e115b2b45f796264b58d0bf", size = 158849, upload-time = "2026-06-20T23:48:08.91Z" }, + { url = "https://files.pythonhosted.org/packages/bc/c2/aa6c0c2206803068c6859dabe01f8c84c43744da93d4c67b8946d21655ee/wrapt-2.2.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:3b686cfc008776a3952d6213cb296ed7f45d782a8453936406faa89eac0835ab", size = 168147, upload-time = "2026-06-20T23:48:10.374Z" }, + { url = "https://files.pythonhosted.org/packages/42/63/3eb25da41049d20ae18fcab2dd8b056e02387c4bfa626cbdfb7c3b872e4f/wrapt-2.2.2-cp312-cp312-win32.whl", hash = "sha256:ef2cce266b5b0b07e19fa82e59673b81142b7a3607c8ed1254113d048ed668da", size = 77734, upload-time = "2026-06-20T23:48:11.769Z" }, + { url = "https://files.pythonhosted.org/packages/da/09/0390e008a305360948fa9ce69507d041ac12cb2ee5d28e34467e2ee79391/wrapt-2.2.2-cp312-cp312-win_amd64.whl", hash = "sha256:abf8c20a2d72ee69e16328b3c91342c446e723bfe48bfcc4dded3b9722ac027f", size = 80585, upload-time = "2026-06-20T23:48:13.117Z" }, + { url = "https://files.pythonhosted.org/packages/d3/b3/84c445c66969f2d3457276b183a48c91097d59bbef9af6c075366b0f8c36/wrapt-2.2.2-cp312-cp312-win_arm64.whl", hash = "sha256:c6c64c5d02578bc4c4bca4f0aef1504de933c1d5b4ac2710b9131111459506c8", size = 79553, upload-time = "2026-06-20T23:48:14.5Z" }, + { url = "https://files.pythonhosted.org/packages/43/fc/f32f4b22c6511173c11d9e541ab4e7d8467a0f1b3455acaf784115d31ff8/wrapt-2.2.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9e8b648270c613720a202d9a45ebabc33261b22c3a839b115ac5bce8c0bb0d69", size = 81296, upload-time = "2026-06-20T23:48:15.881Z" }, + { url = "https://files.pythonhosted.org/packages/72/06/4d117d5d77a9344776c0248b24dae3d3dd2f58e5f765fa08cf887072e719/wrapt-2.2.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e6fb7e94e8fe3e4c3067bb1653a91cce7c5e83acc119fdd41501b1bf74654617", size = 81841, upload-time = "2026-06-20T23:48:17.262Z" }, + { url = "https://files.pythonhosted.org/packages/15/ff/63ad96f98eb58a742b1a20d80f21da88924405910149950b912368150468/wrapt-2.2.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fb18fc51e813df0d9c98049e3bf2298a5495a648602040e21fa3c7329371159e", size = 167882, upload-time = "2026-06-20T23:48:18.764Z" }, + { url = "https://files.pythonhosted.org/packages/20/1f/8bb62d8933df7acf3247194e6e9fc68edf9d2fa203252c89c94b319dd472/wrapt-2.2.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:94b00b00f806eb3ef2abe9049ed45994a81ee9284884d96e6b8314927c6cea3d", size = 167411, upload-time = "2026-06-20T23:48:20.315Z" }, + { url = "https://files.pythonhosted.org/packages/17/09/8789dcb09ee1de715727db7521aabbb68ffa68dfade3a49468440cfced49/wrapt-2.2.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:62415fd095bc590b842b6d092f2b5d9ccbaeb7e0b28535c03dcea2718b48636b", size = 158607, upload-time = "2026-06-20T23:48:21.728Z" }, + { url = "https://files.pythonhosted.org/packages/9c/20/66e02562d53ee67d841f175e38e3c993c2d78a3e104c576cad61c028b43c/wrapt-2.2.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a41e758d80dc0ab8c210f641ac892009d356cf1f955d97db544c8dd317b4d14c", size = 166367, upload-time = "2026-06-20T23:48:23.177Z" }, + { url = "https://files.pythonhosted.org/packages/bd/a3/832ac4e41222fb263b3042d42c2f08d305db7d0f0c9b1d3a271a9eede8f6/wrapt-2.2.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:b84cd4058001c9727b0e9980b7a9e66325b5ca748b1b578e822cade1bc6b304f", size = 157176, upload-time = "2026-06-20T23:48:24.711Z" }, + { url = "https://files.pythonhosted.org/packages/b7/01/1bd5e4d2df9c0178989ac8da9186543465388588ee2ef153e2591accebef/wrapt-2.2.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:26fc73a1b15e0946d2942b9a4426d162b51676338327dc067ccd8d2d76385f94", size = 167025, upload-time = "2026-06-20T23:48:26.118Z" }, + { url = "https://files.pythonhosted.org/packages/1c/69/583ed25291ab53e1ec117135fb1c33425e2f46d2bc8f29c17f7a94cf4274/wrapt-2.2.2-cp313-cp313-win32.whl", hash = "sha256:3c4095803491f6ef72128914c28ec05bbad9758433bb35f6715a3e9c8e46fb2d", size = 77605, upload-time = "2026-06-20T23:48:27.643Z" }, + { url = "https://files.pythonhosted.org/packages/29/68/e69fc6d06e1523c68e0d00f95c9aed1158ce9908ee41603f7f2eae3d5db6/wrapt-2.2.2-cp313-cp313-win_amd64.whl", hash = "sha256:2cb07f414fab25dbe6b5c7398e1491423a5c81a6209533639969a6c928d474a4", size = 80508, upload-time = "2026-06-20T23:48:29.013Z" }, + { url = "https://files.pythonhosted.org/packages/55/21/fe7a393d9e5dc0923bed8f5d857e9dcff210f1fa0888c02cc8f3ffaa55aa/wrapt-2.2.2-cp313-cp313-win_arm64.whl", hash = "sha256:1fc7691f070220215cccb2a20836b9adbaecb8ff22ad47abe63de5f110994fac", size = 79565, upload-time = "2026-06-20T23:48:30.429Z" }, + { url = "https://files.pythonhosted.org/packages/b6/e5/c120d13bf5091164f68c3c1657e84f16f57e71d978421b626393ac5bd7eb/wrapt-2.2.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ec8f83949028366531383603139403cac7a826e4011955813cdd640017845ce5", size = 83264, upload-time = "2026-06-20T23:48:31.807Z" }, + { url = "https://files.pythonhosted.org/packages/d3/b0/d4a1eb97e0e286625bdf21bc7f702637f9607787ffbbdb5ec14d50c79dbf/wrapt-2.2.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:4b481fb0c40d9fd90a5809911208da700987d373a20a4709dc9e3944af7a6bec", size = 83791, upload-time = "2026-06-20T23:48:33.482Z" }, + { url = "https://files.pythonhosted.org/packages/18/1e/f060df47755e87b57684cee7bfc1362b204df55fac96ffebc0631b697b79/wrapt-2.2.2-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:0065a3b657cec06813b4241d2462ccec287f6863103d7445b725fb3a889736f9", size = 203399, upload-time = "2026-06-20T23:48:34.97Z" }, + { url = "https://files.pythonhosted.org/packages/c4/de/2316a757a1abb6453700b79d83e532146dcef2611348282d4d8889792161/wrapt-2.2.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:30f7424af5c5c345b7f26490e097f74a2ef45b3d08b664dc33571aee3bd3b56c", size = 210461, upload-time = "2026-06-20T23:48:36.569Z" }, + { url = "https://files.pythonhosted.org/packages/ed/29/d1160785ae18ca2495a6d82a21154103d74f656c9fd457fb35f6b11b965a/wrapt-2.2.2-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:07fdcb012821859168641acf68afad61ef9783cf37100af85f152550e9677194", size = 195313, upload-time = "2026-06-20T23:48:38.175Z" }, + { url = "https://files.pythonhosted.org/packages/f5/2d/7caa9598ae61a9cf0989cc501739cbeeb7d650ab3193cca1407b9af0c6ab/wrapt-2.2.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:f90038ab58fafb584801ca62d72384d7d5225d93c76f7b773c22fae545bd8066", size = 206116, upload-time = "2026-06-20T23:48:39.804Z" }, + { url = "https://files.pythonhosted.org/packages/ac/02/281ea1088b8650d865f311b35cf86fd21df89128e2909714f1161e01c9d0/wrapt-2.2.2-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:c5d7825491bfa2d08b97e9557768987952c7b9ae687d06c3320b40a37ccb7f20", size = 192668, upload-time = "2026-06-20T23:48:41.346Z" }, + { url = "https://files.pythonhosted.org/packages/be/7d/976e2d5b4b5c5babda40974edd54d0a5585cb60132ed86b46f4b80239b16/wrapt-2.2.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:0ad520e6daa9bbf136f14de735474dbec7dcc0891f718e1d274ce8dc92e645af", size = 198891, upload-time = "2026-06-20T23:48:43.056Z" }, + { url = "https://files.pythonhosted.org/packages/59/b7/e47651797c097f75a37e2ce86dcf04048ff576f3a674f7c558df7b5e9622/wrapt-2.2.2-cp313-cp313t-win32.whl", hash = "sha256:25904acb9475f46c24fe0423dbc8fda8cc5fbc282ab3dc6e72e919748c53f4e9", size = 78537, upload-time = "2026-06-20T23:48:44.509Z" }, + { url = "https://files.pythonhosted.org/packages/d1/6f/9fa5d59fb06d890defb5a8f727ce6a14d2932c8760153f96956628559fee/wrapt-2.2.2-cp313-cp313t-win_amd64.whl", hash = "sha256:305d4c247d61c4115794a169141823c62f719525ddb90b23aa332741c77d2c28", size = 82005, upload-time = "2026-06-20T23:48:46.391Z" }, + { url = "https://files.pythonhosted.org/packages/15/80/4c7bd9873d1f9f7d138d93556b500469dbe24f42710b877519c2b9eb380d/wrapt-2.2.2-cp313-cp313t-win_arm64.whl", hash = "sha256:c20279cd1a29800815d7b2d6338b60a6c6e78263f9d6e62e0eda251ba9cae2d0", size = 80762, upload-time = "2026-06-20T23:48:47.964Z" }, + { url = "https://files.pythonhosted.org/packages/24/05/7fd9c3f83b2c74cbfc572a0b88aa37431e04bd8aed70d2c0efd3464206de/wrapt-2.2.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:0e64826f920c42d9d9f87e8cc09ffae66c51ede12d59061a5a426deb9aa71745", size = 81341, upload-time = "2026-06-20T23:48:49.39Z" }, + { url = "https://files.pythonhosted.org/packages/4b/68/1bfa43100dd90d4ef74a05897b86275cf57e1313ca14aae2545bc9f872c9/wrapt-2.2.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:dcaa5e1451bd8751d7bd1568dfa3321c78092a52a7ecb5d1a0f18a5791e1fd00", size = 81921, upload-time = "2026-06-20T23:48:50.986Z" }, + { url = "https://files.pythonhosted.org/packages/74/eb/df7b7f0b631dbbc750f39be27d8b55f65777d8ac86da80e12be41a644c4b/wrapt-2.2.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:0abfd648dac9ac9c5b3aa9b523d27f1789046640b58dcd5652a720ddb325e1fc", size = 167713, upload-time = "2026-06-20T23:48:52.598Z" }, + { url = "https://files.pythonhosted.org/packages/4d/9a/d1bd36f6d088c8e652a9383cabbd49af30b8c576302a7eccddbab6963e3f/wrapt-2.2.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f4bfd8d1eb438153eff8b8cfe87f032ba65731e1ce06138b5090f745a33f6f95", size = 166779, upload-time = "2026-06-20T23:48:54.33Z" }, + { url = "https://files.pythonhosted.org/packages/4c/ae/24ffacd4187fac2740a1972093929e836dea092d42c87d728cd98fee11a6/wrapt-2.2.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c427c9d06d859848a69f0d928fe28b5c33a941b2265d10a0e1f15cd244f1ee33", size = 158407, upload-time = "2026-06-20T23:48:55.944Z" }, + { url = "https://files.pythonhosted.org/packages/a3/ed/974427668249a356051e8d67d47fa54ef6c777f0fcf3bae9d292c047d4b6/wrapt-2.2.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4250b43d1a129d947e083c4dc6baf333c9bb34edd26f912d5b0457841fc858ab", size = 166594, upload-time = "2026-06-20T23:48:57.617Z" }, + { url = "https://files.pythonhosted.org/packages/fb/5f/e1d7c6e4523f78db2fbd7826babd0348da1d5e0834c4f918b9ab5757dfae/wrapt-2.2.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:173e5bb5ca350a6e0abab60b7ec7cdd7992a814cb14b4de670a28f067f105663", size = 157068, upload-time = "2026-06-20T23:48:59.171Z" }, + { url = "https://files.pythonhosted.org/packages/1e/c1/7ebd1027f00700c0b0233b20aceef2b4784294ed64971424c4a78e069e34/wrapt-2.2.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:aa14b01804bce36c6d63d7b6a4f55df390f29f8648cc13a1f40b166f4d54680d", size = 166470, upload-time = "2026-06-20T23:49:00.737Z" }, + { url = "https://files.pythonhosted.org/packages/99/eb/974e471a6a978b8180186b8a9dc5ae3361ce269a967190b709b8ce17abfb/wrapt-2.2.2-cp314-cp314-win32.whl", hash = "sha256:58f9f8d637c9a6e245c6ef5b109b67ec187d2faed23d1405656b51d96e0a5b56", size = 78062, upload-time = "2026-06-20T23:49:02.327Z" }, + { url = "https://files.pythonhosted.org/packages/49/ec/e1281156cdc7a66693838ad7a0865ad641c74abd337a957d668b575aaffb/wrapt-2.2.2-cp314-cp314-win_amd64.whl", hash = "sha256:385cb1866f20479e83299af585375bfa0a4b0c6c9907a981483ea782ea8ae406", size = 80832, upload-time = "2026-06-20T23:49:03.837Z" }, + { url = "https://files.pythonhosted.org/packages/45/7d/1b6b5ddd94005a2dac97a4490c9838f3154977850d633abcb65b30089437/wrapt-2.2.2-cp314-cp314-win_arm64.whl", hash = "sha256:8ffbeaea6771a6eba6e6eeb09767864995726bc8240bb54baf88a9bb1db34d5c", size = 80029, upload-time = "2026-06-20T23:49:05.237Z" }, + { url = "https://files.pythonhosted.org/packages/b0/33/9ebcf8aafe91c601127cbd93708c16aa8f688f34a10bf004046803ecdc4f/wrapt-2.2.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:09f811d43f6f33ec7515f0be76b159569f4057ab54d3e079c3204dddb90afa2a", size = 83357, upload-time = "2026-06-20T23:49:06.632Z" }, + { url = "https://files.pythonhosted.org/packages/39/38/ec45b635153327b52e52732a0ea980e5f00b7efba65f9e018828f1e69daa/wrapt-2.2.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:a795d3c06e5fbf9ea2f13196180b77aeab1b4685917256ee0d014cc163d90063", size = 83794, upload-time = "2026-06-20T23:49:08.098Z" }, + { url = "https://files.pythonhosted.org/packages/4e/ea/1a89e6d3b7a83c3affe5c09cde77792c947e63e4bc85ad84cd5bb9abb0d8/wrapt-2.2.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:45c2f2768e790c9f8db90f239ef23a2af8e7570f25a35619ef902df4a738447f", size = 203362, upload-time = "2026-06-20T23:49:09.811Z" }, + { url = "https://files.pythonhosted.org/packages/19/d8/3b58763d9863b5a73771c0d97110f9595d248db454009e07e1535ee905a4/wrapt-2.2.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bbf00ee0cb55ec24e2b0995a71942b85b21a066db8f3f46e1dbfdb9433ffba81", size = 210449, upload-time = "2026-06-20T23:49:11.521Z" }, + { url = "https://files.pythonhosted.org/packages/2d/6f/17fd9e053103d8be148d20d5d7505facc72d5fe1f9127973904ceaed79cf/wrapt-2.2.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:2252f77663651b89255895f58cc6ac08fcb206d4371813e5af61bb62d4f7689c", size = 195349, upload-time = "2026-06-20T23:49:13.346Z" }, + { url = "https://files.pythonhosted.org/packages/ef/04/d0d1ccaaa12cb7dccf28a23f0279a608ba498f71e81d949d5ed54bcfd5c1/wrapt-2.2.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:2cd7181ab1c31192ff5219269830744b5a62020b3a6d433588c4f1c95b8f8bff", size = 206099, upload-time = "2026-06-20T23:49:15.051Z" }, + { url = "https://files.pythonhosted.org/packages/44/b3/e8aa07b619890a2aa6cde1931b1887abb08820721b564a5f80b7ca3f3aa0/wrapt-2.2.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:6fe35fd51b74867d8b80174c277bd6bbf6a73e443f908129dc531c4b688a20d5", size = 192728, upload-time = "2026-06-20T23:49:16.854Z" }, + { url = "https://files.pythonhosted.org/packages/b7/f0/1819fb50f0d3c9bd758d8a83b56f1b470dee8b5b8eac8702b7c137cea9d4/wrapt-2.2.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:11d95fc2fbad3163596c39d440e6f21ca9fccece74b56e30a37ac2fca786a07c", size = 198842, upload-time = "2026-06-20T23:49:18.504Z" }, + { url = "https://files.pythonhosted.org/packages/67/7c/e88313f16a99930b899ef970d91c281544a470749a359decad994483bbda/wrapt-2.2.2-cp314-cp314t-win32.whl", hash = "sha256:d8a15813215f33fa83667bfc978b300e35669ea8bb424e970a1426bcb7bc6cca", size = 79059, upload-time = "2026-06-20T23:49:20.107Z" }, + { url = "https://files.pythonhosted.org/packages/a0/4f/ac12fda57a55068a094ec42851fb0a40e8489d8941863d517452de62e507/wrapt-2.2.2-cp314-cp314t-win_amd64.whl", hash = "sha256:d09db0f7e8357060d3c38fc22a018aba683a796bf184360fd1a58f6fc180dc77", size = 82462, upload-time = "2026-06-20T23:49:21.631Z" }, + { url = "https://files.pythonhosted.org/packages/48/a7/df732dac86d9b2027c56bd163dbc883e037b16c3469614752e148d219c61/wrapt-2.2.2-cp314-cp314t-win_arm64.whl", hash = "sha256:f32fe639c39561ccc187bcae17e9271be0eb45f1c2952510d2f29b33ab577347", size = 81182, upload-time = "2026-06-20T23:49:23.199Z" }, + { url = "https://files.pythonhosted.org/packages/6e/d2/6317eb6d4554855bbf12d61857774af34747bf88a42c19bf306de67e2fa3/wrapt-2.2.2-py3-none-any.whl", hash = "sha256:5bad217350f19ce99ca5b5e71d406765ea86fe541628426772b657375ee1c048", size = 61460, upload-time = "2026-06-20T23:49:42.966Z" }, ] From f2336b8f6fea6fb5d8d5b0abe2514dc87866180d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Hr=C4=8Dek?= Date: Mon, 6 Jul 2026 15:47:32 +0200 Subject: [PATCH 07/10] feat: Add secret scanning hook, update conftest --- flake.nix | 2 +- lefthook.yml | 8 +++++ tests/conftest.py | 32 +++++++++---------- .../inbound_api_response_structure.yaml | 6 ++-- .../cassettes/inbound_builder_list_basic.yaml | 6 ++-- .../inbound_builder_list_with_domain.yaml | 4 +-- .../cassettes/inbound_empty_result.yaml | 6 ++-- .../cassettes/inbound_list_basic.yaml | 6 ++-- .../inbound_list_with_domain_filter.yaml | 4 +-- .../inbound_list_with_pagination.yaml | 6 ++-- .../smtp_users_api_response_structure.yaml | 2 +- .../smtp_users_builder_list_basic.yaml | 2 +- ..._users_builder_list_with_custom_limit.yaml | 2 +- .../smtp_users_comprehensive_workflow.yaml | 4 +-- .../cassettes/smtp_users_empty_result.yaml | 2 +- .../cassettes/smtp_users_list_basic.yaml | 2 +- .../cassettes/smtp_users_list_with_limit.yaml | 2 +- .../webhooks_api_response_structure.yaml | 2 +- .../webhooks_builder_list_basic.yaml | 2 +- .../webhooks_comprehensive_workflow.yaml | 4 +-- .../cassettes/webhooks_empty_result.yaml | 2 +- .../cassettes/webhooks_list_basic.yaml | 2 +- 22 files changed, 58 insertions(+), 50 deletions(-) diff --git a/flake.nix b/flake.nix index 49eddf5..fc0a036 100644 --- a/flake.nix +++ b/flake.nix @@ -17,7 +17,7 @@ pkgs.go-task ]; - packages = [ pkgs.lefthook pkgs.terraform ]; + packages = [ pkgs.lefthook pkgs.terraform pkgs.git-secrets ]; }; }); } diff --git a/lefthook.yml b/lefthook.yml index f32c417..0e0f885 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -11,3 +11,11 @@ pre-commit: ruff: glob: "*.py" run: ruff format . + secrets: + run: | + git secrets --list | grep -q 'mssp' || { + git secrets --register-aws + git secrets --add 'mlsn\.[A-Za-z0-9._-]+' + git secrets --add 'mssp\.[A-Za-z0-9._-]+' + } + git secrets --scan {staged_files} diff --git a/tests/conftest.py b/tests/conftest.py index 70cbe7e..9ee30d8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -12,6 +12,18 @@ TEST_API_KEY = os.environ.get("MAILERSEND_API_KEY", "test-api-key") +# Patterns for sensitive values in recorded response bodies +SENSITIVE_PATTERNS = [ + # Any credential-bearing JSON fields, regardless of value format + ( + re.compile(r'"(accessToken|password|token|secret)":"[^"]*"'), + r'"\1":"***FILTERED***"', + ), + # MailerSend API tokens (mlsn.) and SMTP passwords (mssp.), wherever they appear + (re.compile(r"m(?:lsn|ssp)\.[A-Za-z0-9._-]+"), "***FILTERED***"), +] + + def sanitize_response_body(response): """Sanitize response body to remove sensitive data like accessToken.""" try: @@ -30,23 +42,11 @@ def sanitize_response_body(response): if isinstance(body, bytes): body = body.decode("utf-8") - # Only process if it looks like JSON (contains accessToken) - if "accessToken" in body or "mlsn." in body: - # Replace accessToken values - body = re.sub( - r'"accessToken":"mlsn\.[a-f0-9]+"', - '"accessToken":"***FILTERED***"', - body, - ) - - # Replace any other mlsn tokens - body = re.sub(r'"mlsn\.[a-f0-9]{60,}"', '"***FILTERED***"', body) - - # Replace preview tokens - body = re.sub( - r'"preview":"mlsn\.[a-f0-9]+"', '"preview":"***FILTERED***"', body - ) + original = body + for pattern, replacement in SENSITIVE_PATTERNS: + body = pattern.sub(replacement, body) + if body != original: # Update the response body (convert back to bytes for VCR) if isinstance(response["body"], dict): response["body"]["string"] = body.encode("utf-8") diff --git a/tests/fixtures/cassettes/inbound_api_response_structure.yaml b/tests/fixtures/cassettes/inbound_api_response_structure.yaml index e45465a..5031e23 100644 --- a/tests/fixtures/cassettes/inbound_api_response_structure.yaml +++ b/tests/fixtures/cassettes/inbound_api_response_structure.yaml @@ -16,9 +16,9 @@ interactions: uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: diff --git a/tests/fixtures/cassettes/inbound_builder_list_basic.yaml b/tests/fixtures/cassettes/inbound_builder_list_basic.yaml index b19d7b9..5622e4b 100644 --- a/tests/fixtures/cassettes/inbound_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/inbound_builder_list_basic.yaml @@ -16,9 +16,9 @@ interactions: uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: diff --git a/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml b/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml index 6319087..cd6acdc 100644 --- a/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml +++ b/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml @@ -16,8 +16,8 @@ interactions: uri: https://api.mailersend.com/v1/inbound?page=1&limit=10&domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"7dnvo4d971xg5r86","name":"My Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + string: '{"data":[{"id":"7dnvo4d971xg5r86","name":"My Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":2,"total":2}}' headers: diff --git a/tests/fixtures/cassettes/inbound_empty_result.yaml b/tests/fixtures/cassettes/inbound_empty_result.yaml index 864af90..e561a62 100644 --- a/tests/fixtures/cassettes/inbound_empty_result.yaml +++ b/tests/fixtures/cassettes/inbound_empty_result.yaml @@ -16,9 +16,9 @@ interactions: uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: diff --git a/tests/fixtures/cassettes/inbound_list_basic.yaml b/tests/fixtures/cassettes/inbound_list_basic.yaml index 4d2e2b1..1b3787d 100644 --- a/tests/fixtures/cassettes/inbound_list_basic.yaml +++ b/tests/fixtures/cassettes/inbound_list_basic.yaml @@ -16,9 +16,9 @@ interactions: uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: diff --git a/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml b/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml index a257a44..3fa2b02 100644 --- a/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml +++ b/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml @@ -16,8 +16,8 @@ interactions: uri: https://api.mailersend.com/v1/inbound?page=1&limit=10&domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"7dnvo4d971xg5r86","name":"My Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + string: '{"data":[{"id":"7dnvo4d971xg5r86","name":"My Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":2,"total":2}}' headers: diff --git a/tests/fixtures/cassettes/inbound_list_with_pagination.yaml b/tests/fixtures/cassettes/inbound_list_with_pagination.yaml index 1d3e81b..3130593 100644 --- a/tests/fixtures/cassettes/inbound_list_with_pagination.yaml +++ b/tests/fixtures/cassettes/inbound_list_with_pagination.yaml @@ -16,9 +16,9 @@ interactions: uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 response: body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"ZQpuuTEIYqxyGhIQ6W14Kh8hyjgDHAFQ"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"mbZkW9RUTLWN2OyXaoQtvtJLJDBOHivI"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"Y390iwGtlduE6DvoCr7IMtRyQGTIF7jg"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« + string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My + Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My + Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' headers: diff --git a/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml b/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml index 6940181..1527a53 100644 --- a/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml +++ b/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: diff --git a/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml b/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml index 6b699c3..2ca11ed 100644 --- a/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: diff --git a/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml b/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml index 31d1442..280abe3 100644 --- a/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml +++ b/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=50 response: body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":50,"to":1}}' headers: CF-RAY: diff --git a/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml b/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml index e6fd7c5..72ea215 100644 --- a/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: @@ -65,7 +65,7 @@ interactions: uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users response: body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":25,"to":1}}' headers: CF-RAY: diff --git a/tests/fixtures/cassettes/smtp_users_empty_result.yaml b/tests/fixtures/cassettes/smtp_users_empty_result.yaml index 98cc221..bc74779 100644 --- a/tests/fixtures/cassettes/smtp_users_empty_result.yaml +++ b/tests/fixtures/cassettes/smtp_users_empty_result.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: diff --git a/tests/fixtures/cassettes/smtp_users_list_basic.yaml b/tests/fixtures/cassettes/smtp_users_list_basic.yaml index 16bc197..1211086 100644 --- a/tests/fixtures/cassettes/smtp_users_list_basic.yaml +++ b/tests/fixtures/cassettes/smtp_users_list_basic.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 response: body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' headers: CF-RAY: diff --git a/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml b/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml index ae50ea0..3828a74 100644 --- a/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml +++ b/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users response: body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"mssp.1o7LCEP.3yxj6ljykk0ldo2r.VsJxtTp","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 + string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":25,"to":1}}' headers: CF-RAY: diff --git a/tests/fixtures/cassettes/webhooks_api_response_structure.yaml b/tests/fixtures/cassettes/webhooks_api_response_structure.yaml index 23beaa8..dde8687 100644 --- a/tests/fixtures/cassettes/webhooks_api_response_structure.yaml +++ b/tests/fixtures/cassettes/webhooks_api_response_structure.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next diff --git a/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml b/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml index 5d43275..2bb9d41 100644 --- a/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml +++ b/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next diff --git a/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml b/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml index 50fa0ba..370e814 100644 --- a/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml +++ b/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next @@ -68,7 +68,7 @@ interactions: uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next diff --git a/tests/fixtures/cassettes/webhooks_empty_result.yaml b/tests/fixtures/cassettes/webhooks_empty_result.yaml index 1bc5922..31767cd 100644 --- a/tests/fixtures/cassettes/webhooks_empty_result.yaml +++ b/tests/fixtures/cassettes/webhooks_empty_result.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next diff --git a/tests/fixtures/cassettes/webhooks_list_basic.yaml b/tests/fixtures/cassettes/webhooks_list_basic.yaml index e231918..f0b1e09 100644 --- a/tests/fixtures/cassettes/webhooks_list_basic.yaml +++ b/tests/fixtures/cassettes/webhooks_list_basic.yaml @@ -16,7 +16,7 @@ interactions: uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 response: body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"nrgcrVtQNpGBAER7kdCPNUdoIoKLCt81","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom + string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next From a5032528ec5298abd26aa7f549f5ca5902566f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Hr=C4=8Dek?= Date: Mon, 6 Jul 2026 15:50:49 +0200 Subject: [PATCH 08/10] feat: Add secret scanning hook, update conftest --- .gitignore | 3 +- .../cassettes/activity_builder_basic.yaml | 50 --- .../activity_builder_datetime_conversion.yaml | 50 --- .../activity_builder_with_events.yaml | 50 --- .../cassettes/activity_get_basic.yaml | 50 --- .../activity_get_delivery_events.yaml | 50 --- .../cassettes/activity_get_empty_result.yaml | 50 --- .../activity_get_engagement_events.yaml | 50 --- .../cassettes/activity_get_max_limit.yaml | 50 --- .../cassettes/activity_get_min_limit.yaml | 50 --- .../cassettes/activity_get_single_event.yaml | 50 --- .../activity_get_single_not_found.yaml | 50 --- .../cassettes/activity_get_with_datetime.yaml | 50 --- .../cassettes/activity_get_with_events.yaml | 50 --- .../activity_get_with_pagination.yaml | 50 --- .../analytics_comprehensive_test.yaml | 194 ---------- .../cassettes/analytics_country_basic.yaml | 50 --- .../analytics_country_with_tags.yaml | 50 --- .../cassettes/analytics_date_all_events.yaml | 50 --- .../cassettes/analytics_date_basic.yaml | 50 --- .../analytics_date_builder_helpers.yaml | 98 ----- .../cassettes/analytics_date_with_domain.yaml | 50 --- .../cassettes/analytics_date_with_tags.yaml | 50 --- .../cassettes/analytics_error_no_events.yaml | 50 --- .../analytics_reading_env_basic.yaml | 50 --- ...analytics_reading_env_with_recipients.yaml | 50 --- .../cassettes/analytics_user_agent_basic.yaml | 50 --- .../analytics_user_agent_with_domain.yaml | 50 --- .../cassettes/domains_create_minimal.yaml | 96 ----- .../cassettes/domains_delete_not_found.yaml | 52 --- .../cassettes/domains_delete_success.yaml | 96 ----- .../domains_dns_records_not_found.yaml | 50 --- .../domains_dns_records_success.yaml | 52 --- .../cassettes/domains_get_not_found.yaml | 50 --- .../cassettes/domains_get_success.yaml | 52 --- .../cassettes/domains_list_basic.yaml | 58 --- .../cassettes/domains_list_builder.yaml | 58 --- .../cassettes/domains_list_pagination.yaml | 52 --- .../cassettes/domains_list_verified.yaml | 58 --- .../cassettes/domains_recipients_basic.yaml | 50 --- .../cassettes/domains_recipients_builder.yaml | 50 --- .../domains_recipients_pagination.yaml | 50 --- .../cassettes/domains_settings_workflow.yaml | 208 ----------- .../domains_update_settings_builder.yaml | 55 --- .../domains_update_settings_pause.yaml | 54 --- .../domains_update_settings_tracking.yaml | 57 --- .../domains_verification_not_found.yaml | 50 --- .../domains_verification_status.yaml | 50 --- tests/fixtures/cassettes/email_send_bulk.yaml | 54 --- .../cassettes/email_send_bulk_workflow.yaml | 102 ----- .../cassettes/email_send_text_only.yaml | 56 --- .../email_send_with_attachments.yaml | 57 --- .../email_send_with_base_params.yaml | 56 --- .../cassettes/email_send_with_cc_bcc.yaml | 57 --- .../cassettes/email_send_with_headers.yaml | 57 --- .../cassettes/email_send_with_reply_to.yaml | 57 --- .../cassettes/email_send_with_tags.yaml | 56 --- .../cassettes/email_send_with_template.yaml | 57 --- .../email_send_with_text_priority.yaml | 57 --- .../cassettes/email_send_with_threading.yaml | 56 --- .../cassettes/email_send_with_tracking.yaml | 57 --- ...l_verification_api_response_structure.yaml | 59 --- ...l_verification_comprehensive_workflow.yaml | 195 ---------- .../email_verification_create_list.yaml | 51 --- .../email_verification_empty_list.yaml | 59 --- .../email_verification_get_not_found.yaml | 50 --- .../email_verification_get_results.yaml | 50 --- .../email_verification_get_single.yaml | 50 --- .../email_verification_list_basic.yaml | 59 --- ...ail_verification_list_with_pagination.yaml | 59 --- .../email_verification_verify_list.yaml | 50 --- .../identities_create_not_available.yaml | 53 --- .../cassettes/identities_delete_by_email.yaml | 52 --- .../cassettes/identities_delete_by_id.yaml | 52 --- .../cassettes/identities_get_by_email.yaml | 50 --- .../cassettes/identities_get_single.yaml | 50 --- .../cassettes/identities_update_by_email.yaml | 52 --- .../cassettes/identities_update_by_id.yaml | 52 --- .../inbound_api_response_structure.yaml | 54 --- ...inbound_builder_create_invalid_domain.yaml | 53 --- .../inbound_builder_get_not_found.yaml | 50 --- .../cassettes/inbound_builder_list_basic.yaml | 54 --- .../inbound_builder_list_with_domain.yaml | 53 --- .../inbound_create_invalid_domain.yaml | 54 --- .../cassettes/inbound_delete_not_found.yaml | 52 --- .../cassettes/inbound_empty_result.yaml | 54 --- .../cassettes/inbound_get_not_found.yaml | 50 --- .../cassettes/inbound_list_basic.yaml | 54 --- .../inbound_list_with_domain_filter.yaml | 53 --- .../inbound_list_with_pagination.yaml | 54 --- .../cassettes/inbound_update_not_found.yaml | 54 --- tests/fixtures/cassettes/invites_cancel.yaml | 52 --- .../cassettes/invites_get_single.yaml | 50 --- .../cassettes/invites_list_basic.yaml | 52 --- tests/fixtures/cassettes/invites_resend.yaml | 52 --- .../messages_api_response_structure.yaml | 50 --- .../messages_builder_get_not_found.yaml | 50 --- .../messages_builder_list_basic.yaml | 50 --- ...ssages_builder_list_with_custom_limit.yaml | 50 --- .../messages_comprehensive_workflow.yaml | 194 ---------- .../cassettes/messages_empty_result.yaml | 50 --- .../cassettes/messages_get_not_found.yaml | 50 --- .../cassettes/messages_list_basic.yaml | 50 --- .../messages_list_different_limit.yaml | 50 --- .../messages_list_with_pagination.yaml | 50 --- .../recipients_add_hard_bounces.yaml | 51 --- .../recipients_add_spam_complaints.yaml | 51 --- .../recipients_add_to_blocklist.yaml | 51 --- .../recipients_add_unsubscribes.yaml | 51 --- .../recipients_api_response_structure.yaml | 50 --- .../cassettes/recipients_blocklist_basic.yaml | 50 --- .../recipients_comprehensive_workflow.yaml | 51 --- .../recipients_delete_from_blocklist.yaml | 51 --- .../cassettes/recipients_delete_success.yaml | 52 --- .../cassettes/recipients_empty_list.yaml | 50 --- .../cassettes/recipients_get_single.yaml | 50 --- .../recipients_hard_bounces_basic.yaml | 54 --- .../cassettes/recipients_list_basic.yaml | 50 --- .../recipients_list_with_pagination.yaml | 50 --- .../recipients_spam_complaints_basic.yaml | 50 --- .../recipients_unsubscribes_basic.yaml | 50 --- .../schedules_api_response_structure.yaml | 52 --- .../fixtures/cassettes/schedules_delete.yaml | 53 --- .../cassettes/schedules_empty_result.yaml | 52 --- .../cassettes/schedules_get_single.yaml | 50 --- .../cassettes/schedules_list_basic.yaml | 52 --- .../schedules_list_with_domain_filter.yaml | 52 --- .../schedules_list_with_pagination.yaml | 52 --- .../schedules_list_with_status_filter.yaml | 52 --- .../sms_activity_api_response_structure.yaml | 50 --- .../sms_activity_builder_get_not_found.yaml | 50 --- .../sms_activity_builder_list_basic.yaml | 50 --- ...ms_activity_builder_list_with_filters.yaml | 51 --- ...activity_builder_list_with_sms_number.yaml | 49 --- .../sms_activity_comprehensive_workflow.yaml | 195 ---------- .../cassettes/sms_activity_empty_result.yaml | 50 --- .../sms_activity_get_message_not_found.yaml | 50 --- .../cassettes/sms_activity_list_basic.yaml | 50 --- .../sms_activity_list_with_date_range.yaml | 51 --- .../sms_activity_list_with_pagination.yaml | 50 --- ..._activity_list_with_sms_number_filter.yaml | 49 --- .../sms_activity_list_with_status_filter.yaml | 50 --- .../sms_messages_api_response_structure.yaml | 52 --- .../sms_messages_comprehensive_workflow.yaml | 52 --- .../cassettes/sms_messages_get_single.yaml | 50 --- .../cassettes/sms_messages_list_basic.yaml | 52 --- .../cassettes/sms_messages_list_empty.yaml | 52 --- .../sms_messages_list_with_filters.yaml | 52 --- .../sms_messages_list_with_pagination.yaml | 52 --- .../sms_numbers_api_response_structure.yaml | 52 --- .../sms_numbers_delete_not_found.yaml | 52 --- .../cassettes/sms_numbers_empty_result.yaml | 52 --- .../cassettes/sms_numbers_get_not_found.yaml | 50 --- .../sms_numbers_list_active_only.yaml | 52 --- .../cassettes/sms_numbers_list_basic.yaml | 52 --- .../sms_numbers_list_paused_only.yaml | 52 --- .../sms_numbers_list_with_filters.yaml | 52 --- .../sms_numbers_update_not_found.yaml | 52 --- .../cassettes/sms_numbers_update_pause.yaml | 52 --- .../cassettes/sms_numbers_update_unpause.yaml | 52 --- ...sms_recipients_api_response_structure.yaml | 50 --- .../sms_recipients_builder_get_not_found.yaml | 50 --- .../sms_recipients_builder_list_basic.yaml | 50 --- ...cipients_builder_list_with_sms_number.yaml | 49 --- ...s_recipients_builder_list_with_status.yaml | 50 --- ...s_recipients_builder_update_not_found.yaml | 52 --- ...sms_recipients_comprehensive_workflow.yaml | 194 ---------- .../sms_recipients_empty_result.yaml | 50 --- .../sms_recipients_get_not_found.yaml | 50 --- .../cassettes/sms_recipients_list_basic.yaml | 50 --- .../sms_recipients_list_with_pagination.yaml | 50 --- ...ecipients_list_with_sms_number_filter.yaml | 49 --- ...ms_recipients_list_with_status_filter.yaml | 50 --- .../sms_recipients_update_not_found.yaml | 52 --- tests/fixtures/cassettes/sms_send_basic.yaml | 54 --- .../cassettes/sms_send_long_message.yaml | 70 ---- .../sms_send_multiple_recipients.yaml | 54 --- .../sms_send_with_personalization.yaml | 55 --- ...ms_webhooks_create_invalid_sms_number.yaml | 54 --- .../sms_webhooks_create_with_all_events.yaml | 54 --- .../sms_webhooks_delete_not_found.yaml | 52 --- .../cassettes/sms_webhooks_get_not_found.yaml | 50 --- .../cassettes/sms_webhooks_list_basic.yaml | 49 --- ...webhooks_list_with_invalid_sms_number.yaml | 49 --- .../sms_webhooks_update_disable.yaml | 52 --- .../sms_webhooks_update_not_found.yaml | 52 --- .../smtp_users_api_response_structure.yaml | 51 --- ...p_users_builder_create_invalid_domain.yaml | 52 --- .../smtp_users_builder_delete_not_found.yaml | 52 --- .../smtp_users_builder_get_not_found.yaml | 50 --- .../smtp_users_builder_list_basic.yaml | 51 --- ..._users_builder_list_with_custom_limit.yaml | 51 --- .../smtp_users_builder_update_not_found.yaml | 52 --- .../smtp_users_comprehensive_workflow.yaml | 246 ------------ .../smtp_users_create_invalid_domain.yaml | 52 --- .../smtp_users_delete_not_found.yaml | 52 --- .../cassettes/smtp_users_empty_result.yaml | 51 --- .../cassettes/smtp_users_get_not_found.yaml | 50 --- .../cassettes/smtp_users_list_basic.yaml | 51 --- .../smtp_users_list_invalid_domain.yaml | 50 --- .../cassettes/smtp_users_list_with_limit.yaml | 51 --- .../smtp_users_update_not_found.yaml | 52 --- .../templates_api_response_structure.yaml | 51 --- .../fixtures/cassettes/templates_delete.yaml | 52 --- .../cassettes/templates_empty_result.yaml | 51 --- .../cassettes/templates_get_single.yaml | 50 --- .../cassettes/templates_list_basic.yaml | 51 --- .../cassettes/templates_list_no_params.yaml | 51 --- .../templates_list_with_domain_filter.yaml | 50 --- .../templates_list_with_pagination.yaml | 51 --- .../tokens_api_response_structure.yaml | 62 --- .../tokens_builder_create_basic.yaml | 55 --- .../tokens_builder_delete_not_found.yaml | 52 --- .../tokens_builder_get_not_found.yaml | 50 --- .../cassettes/tokens_builder_list_basic.yaml | 62 --- ...tokens_builder_list_with_custom_limit.yaml | 86 ----- .../tokens_builder_update_name_not_found.yaml | 52 --- .../tokens_builder_update_not_found.yaml | 52 --- .../tokens_comprehensive_workflow.yaml | 286 -------------- .../cassettes/tokens_create_basic.yaml | 56 --- .../cassettes/tokens_delete_not_found.yaml | 52 --- .../cassettes/tokens_empty_result.yaml | 62 --- .../cassettes/tokens_get_not_found.yaml | 50 --- .../fixtures/cassettes/tokens_list_basic.yaml | 62 --- .../tokens_list_different_limit.yaml | 85 ----- .../tokens_list_with_pagination.yaml | 62 --- .../tokens_update_name_not_found.yaml | 52 --- .../cassettes/tokens_update_not_found.yaml | 52 --- .../users_api_response_structure.yaml | 61 --- tests/fixtures/cassettes/users_delete.yaml | 52 --- .../cassettes/users_empty_result.yaml | 61 --- .../fixtures/cassettes/users_get_single.yaml | 50 --- tests/fixtures/cassettes/users_invite.yaml | 53 --- .../fixtures/cassettes/users_list_basic.yaml | 61 --- .../cassettes/users_list_with_pagination.yaml | 61 --- tests/fixtures/cassettes/users_update.yaml | 53 --- .../webhooks_api_response_structure.yaml | 54 --- .../webhooks_builder_create_basic.yaml | 104 ------ .../webhooks_builder_delete_not_found.yaml | 52 --- .../webhooks_builder_get_not_found.yaml | 50 --- .../webhooks_builder_list_basic.yaml | 54 --- .../webhooks_builder_update_not_found.yaml | 52 --- .../webhooks_comprehensive_workflow.yaml | 352 ------------------ .../cassettes/webhooks_create_basic.yaml | 53 --- .../webhooks_create_invalid_domain.yaml | 156 -------- .../cassettes/webhooks_delete_not_found.yaml | 52 --- .../cassettes/webhooks_empty_result.yaml | 54 --- .../cassettes/webhooks_get_not_found.yaml | 50 --- .../cassettes/webhooks_list_basic.yaml | 54 --- .../webhooks_list_invalid_domain.yaml | 49 --- .../cassettes/webhooks_update_not_found.yaml | 52 --- 251 files changed, 2 insertions(+), 15048 deletions(-) delete mode 100644 tests/fixtures/cassettes/activity_builder_basic.yaml delete mode 100644 tests/fixtures/cassettes/activity_builder_datetime_conversion.yaml delete mode 100644 tests/fixtures/cassettes/activity_builder_with_events.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_basic.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_delivery_events.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_engagement_events.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_max_limit.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_min_limit.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_single_event.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_single_not_found.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_with_datetime.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_with_events.yaml delete mode 100644 tests/fixtures/cassettes/activity_get_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/analytics_comprehensive_test.yaml delete mode 100644 tests/fixtures/cassettes/analytics_country_basic.yaml delete mode 100644 tests/fixtures/cassettes/analytics_country_with_tags.yaml delete mode 100644 tests/fixtures/cassettes/analytics_date_all_events.yaml delete mode 100644 tests/fixtures/cassettes/analytics_date_basic.yaml delete mode 100644 tests/fixtures/cassettes/analytics_date_builder_helpers.yaml delete mode 100644 tests/fixtures/cassettes/analytics_date_with_domain.yaml delete mode 100644 tests/fixtures/cassettes/analytics_date_with_tags.yaml delete mode 100644 tests/fixtures/cassettes/analytics_error_no_events.yaml delete mode 100644 tests/fixtures/cassettes/analytics_reading_env_basic.yaml delete mode 100644 tests/fixtures/cassettes/analytics_reading_env_with_recipients.yaml delete mode 100644 tests/fixtures/cassettes/analytics_user_agent_basic.yaml delete mode 100644 tests/fixtures/cassettes/analytics_user_agent_with_domain.yaml delete mode 100644 tests/fixtures/cassettes/domains_create_minimal.yaml delete mode 100644 tests/fixtures/cassettes/domains_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/domains_delete_success.yaml delete mode 100644 tests/fixtures/cassettes/domains_dns_records_not_found.yaml delete mode 100644 tests/fixtures/cassettes/domains_dns_records_success.yaml delete mode 100644 tests/fixtures/cassettes/domains_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/domains_get_success.yaml delete mode 100644 tests/fixtures/cassettes/domains_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/domains_list_builder.yaml delete mode 100644 tests/fixtures/cassettes/domains_list_pagination.yaml delete mode 100644 tests/fixtures/cassettes/domains_list_verified.yaml delete mode 100644 tests/fixtures/cassettes/domains_recipients_basic.yaml delete mode 100644 tests/fixtures/cassettes/domains_recipients_builder.yaml delete mode 100644 tests/fixtures/cassettes/domains_recipients_pagination.yaml delete mode 100644 tests/fixtures/cassettes/domains_settings_workflow.yaml delete mode 100644 tests/fixtures/cassettes/domains_update_settings_builder.yaml delete mode 100644 tests/fixtures/cassettes/domains_update_settings_pause.yaml delete mode 100644 tests/fixtures/cassettes/domains_update_settings_tracking.yaml delete mode 100644 tests/fixtures/cassettes/domains_verification_not_found.yaml delete mode 100644 tests/fixtures/cassettes/domains_verification_status.yaml delete mode 100644 tests/fixtures/cassettes/email_send_bulk.yaml delete mode 100644 tests/fixtures/cassettes/email_send_bulk_workflow.yaml delete mode 100644 tests/fixtures/cassettes/email_send_text_only.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_attachments.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_base_params.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_cc_bcc.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_headers.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_reply_to.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_tags.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_template.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_text_priority.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_threading.yaml delete mode 100644 tests/fixtures/cassettes/email_send_with_tracking.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_create_list.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_empty_list.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_get_results.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_get_single.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/email_verification_verify_list.yaml delete mode 100644 tests/fixtures/cassettes/identities_create_not_available.yaml delete mode 100644 tests/fixtures/cassettes/identities_delete_by_email.yaml delete mode 100644 tests/fixtures/cassettes/identities_delete_by_id.yaml delete mode 100644 tests/fixtures/cassettes/identities_get_by_email.yaml delete mode 100644 tests/fixtures/cassettes/identities_get_single.yaml delete mode 100644 tests/fixtures/cassettes/identities_update_by_email.yaml delete mode 100644 tests/fixtures/cassettes/identities_update_by_id.yaml delete mode 100644 tests/fixtures/cassettes/inbound_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/inbound_builder_create_invalid_domain.yaml delete mode 100644 tests/fixtures/cassettes/inbound_builder_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/inbound_builder_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml delete mode 100644 tests/fixtures/cassettes/inbound_create_invalid_domain.yaml delete mode 100644 tests/fixtures/cassettes/inbound_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/inbound_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/inbound_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/inbound_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml delete mode 100644 tests/fixtures/cassettes/inbound_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/inbound_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/invites_cancel.yaml delete mode 100644 tests/fixtures/cassettes/invites_get_single.yaml delete mode 100644 tests/fixtures/cassettes/invites_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/invites_resend.yaml delete mode 100644 tests/fixtures/cassettes/messages_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/messages_builder_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/messages_builder_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/messages_builder_list_with_custom_limit.yaml delete mode 100644 tests/fixtures/cassettes/messages_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/messages_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/messages_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/messages_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/messages_list_different_limit.yaml delete mode 100644 tests/fixtures/cassettes/messages_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/recipients_add_hard_bounces.yaml delete mode 100644 tests/fixtures/cassettes/recipients_add_spam_complaints.yaml delete mode 100644 tests/fixtures/cassettes/recipients_add_to_blocklist.yaml delete mode 100644 tests/fixtures/cassettes/recipients_add_unsubscribes.yaml delete mode 100644 tests/fixtures/cassettes/recipients_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/recipients_blocklist_basic.yaml delete mode 100644 tests/fixtures/cassettes/recipients_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/recipients_delete_from_blocklist.yaml delete mode 100644 tests/fixtures/cassettes/recipients_delete_success.yaml delete mode 100644 tests/fixtures/cassettes/recipients_empty_list.yaml delete mode 100644 tests/fixtures/cassettes/recipients_get_single.yaml delete mode 100644 tests/fixtures/cassettes/recipients_hard_bounces_basic.yaml delete mode 100644 tests/fixtures/cassettes/recipients_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/recipients_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/recipients_spam_complaints_basic.yaml delete mode 100644 tests/fixtures/cassettes/recipients_unsubscribes_basic.yaml delete mode 100644 tests/fixtures/cassettes/schedules_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/schedules_delete.yaml delete mode 100644 tests/fixtures/cassettes/schedules_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/schedules_get_single.yaml delete mode 100644 tests/fixtures/cassettes/schedules_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/schedules_list_with_domain_filter.yaml delete mode 100644 tests/fixtures/cassettes/schedules_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/schedules_list_with_status_filter.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_builder_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_builder_list_with_filters.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_builder_list_with_sms_number.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_get_message_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_list_with_date_range.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_list_with_sms_number_filter.yaml delete mode 100644 tests/fixtures/cassettes/sms_activity_list_with_status_filter.yaml delete mode 100644 tests/fixtures/cassettes/sms_messages_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/sms_messages_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/sms_messages_get_single.yaml delete mode 100644 tests/fixtures/cassettes/sms_messages_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/sms_messages_list_empty.yaml delete mode 100644 tests/fixtures/cassettes/sms_messages_list_with_filters.yaml delete mode 100644 tests/fixtures/cassettes/sms_messages_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_list_active_only.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_list_paused_only.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_list_with_filters.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_update_pause.yaml delete mode 100644 tests/fixtures/cassettes/sms_numbers_update_unpause.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_builder_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_builder_list_with_sms_number.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_builder_list_with_status.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_builder_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_list_with_sms_number_filter.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_list_with_status_filter.yaml delete mode 100644 tests/fixtures/cassettes/sms_recipients_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_send_basic.yaml delete mode 100644 tests/fixtures/cassettes/sms_send_long_message.yaml delete mode 100644 tests/fixtures/cassettes/sms_send_multiple_recipients.yaml delete mode 100644 tests/fixtures/cassettes/sms_send_with_personalization.yaml delete mode 100644 tests/fixtures/cassettes/sms_webhooks_create_invalid_sms_number.yaml delete mode 100644 tests/fixtures/cassettes/sms_webhooks_create_with_all_events.yaml delete mode 100644 tests/fixtures/cassettes/sms_webhooks_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_webhooks_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/sms_webhooks_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/sms_webhooks_list_with_invalid_sms_number.yaml delete mode 100644 tests/fixtures/cassettes/sms_webhooks_update_disable.yaml delete mode 100644 tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_builder_create_invalid_domain.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_builder_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_builder_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_list_invalid_domain.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_list_with_limit.yaml delete mode 100644 tests/fixtures/cassettes/smtp_users_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/templates_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/templates_delete.yaml delete mode 100644 tests/fixtures/cassettes/templates_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/templates_get_single.yaml delete mode 100644 tests/fixtures/cassettes/templates_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/templates_list_no_params.yaml delete mode 100644 tests/fixtures/cassettes/templates_list_with_domain_filter.yaml delete mode 100644 tests/fixtures/cassettes/templates_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/tokens_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/tokens_builder_create_basic.yaml delete mode 100644 tests/fixtures/cassettes/tokens_builder_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/tokens_builder_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/tokens_builder_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/tokens_builder_list_with_custom_limit.yaml delete mode 100644 tests/fixtures/cassettes/tokens_builder_update_name_not_found.yaml delete mode 100644 tests/fixtures/cassettes/tokens_builder_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/tokens_create_basic.yaml delete mode 100644 tests/fixtures/cassettes/tokens_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/tokens_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/tokens_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/tokens_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/tokens_list_different_limit.yaml delete mode 100644 tests/fixtures/cassettes/tokens_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/tokens_update_name_not_found.yaml delete mode 100644 tests/fixtures/cassettes/tokens_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/users_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/users_delete.yaml delete mode 100644 tests/fixtures/cassettes/users_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/users_get_single.yaml delete mode 100644 tests/fixtures/cassettes/users_invite.yaml delete mode 100644 tests/fixtures/cassettes/users_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/users_list_with_pagination.yaml delete mode 100644 tests/fixtures/cassettes/users_update.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_api_response_structure.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_builder_create_basic.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_builder_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_builder_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_builder_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_builder_update_not_found.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_create_basic.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_create_invalid_domain.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_delete_not_found.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_empty_result.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_get_not_found.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_list_basic.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_list_invalid_domain.yaml delete mode 100644 tests/fixtures/cassettes/webhooks_update_not_found.yaml diff --git a/.gitignore b/.gitignore index d9d8ebd..c81b514 100644 --- a/.gitignore +++ b/.gitignore @@ -95,4 +95,5 @@ ENV/ .vscode toolset.py doctester.py -.direnv/ \ No newline at end of file +.direnv/ +tests/fixutres/ \ No newline at end of file diff --git a/tests/fixtures/cassettes/activity_builder_basic.yaml b/tests/fixtures/cassettes/activity_builder_basic.yaml deleted file mode 100644 index 3b22874..0000000 --- a/tests/fixtures/cassettes/activity_builder_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750945671&date_to=1750949271 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed0df5ccee298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:33 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '66' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_builder_datetime_conversion.yaml b/tests/fixtures/cassettes/activity_builder_datetime_conversion.yaml deleted file mode 100644 index 76095a2..0000000 --- a/tests/fixtures/cassettes/activity_builder_datetime_conversion.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?date_from=1750938493&date_to=1750949293 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed0e14d24a8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:33 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '66' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_builder_with_events.yaml b/tests/fixtures/cassettes/activity_builder_with_events.yaml deleted file mode 100644 index 965d9fd..0000000 --- a/tests/fixtures/cassettes/activity_builder_with_events.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?limit=50&date_from=1750942092&date_to=1750949292&event%5B0%5D=sent&event%5B1%5D=delivered&event%5B2%5D=opened - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":50,"to":null}}' - headers: - CF-RAY: - - a16ed0e05b70b01e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:33 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '57' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_basic.yaml b/tests/fixtures/cassettes/activity_get_basic.yaml deleted file mode 100644 index 880d4fb..0000000 --- a/tests/fixtures/cassettes/activity_get_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1754040747&date_to=1754044347 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed0d66c3d1b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:31 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '69' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_delivery_events.yaml b/tests/fixtures/cassettes/activity_get_delivery_events.yaml deleted file mode 100644 index 60a5611..0000000 --- a/tests/fixtures/cassettes/activity_get_delivery_events.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750862891&date_to=1750949291&event%5B0%5D=queued&event%5B1%5D=sent&event%5B2%5D=delivered&event%5B3%5D=soft_bounced&event%5B4%5D=hard_bounced - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed0d9d9af3267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:32 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '72' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_empty_result.yaml b/tests/fixtures/cassettes/activity_get_empty_result.yaml deleted file mode 100644 index 9e995a0..0000000 --- a/tests/fixtures/cassettes/activity_get_empty_result.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750949232&date_to=1750949292&event%5B0%5D=survey_opened - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed0de5f71870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:33 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '60' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_engagement_events.yaml b/tests/fixtures/cassettes/activity_get_engagement_events.yaml deleted file mode 100644 index f267225..0000000 --- a/tests/fixtures/cassettes/activity_get_engagement_events.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750862891&date_to=1750949291&event%5B0%5D=opened&event%5B1%5D=clicked&event%5B2%5D=unsubscribed&event%5B3%5D=spam_complaints - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed0dadd69b01b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:32 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '54' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_max_limit.yaml b/tests/fixtures/cassettes/activity_get_max_limit.yaml deleted file mode 100644 index 7b386e2..0000000 --- a/tests/fixtures/cassettes/activity_get_max_limit.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=100&date_from=1750862870&date_to=1750949270 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":100,"to":null}}' - headers: - CF-RAY: - - a16ed0dc88af0380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:32 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '54' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_min_limit.yaml b/tests/fixtures/cassettes/activity_get_min_limit.yaml deleted file mode 100644 index 85c0884..0000000 --- a/tests/fixtures/cassettes/activity_get_min_limit.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=10&date_from=1750862892&date_to=1750949292 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed0dd6c8855ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:32 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '60' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_single_event.yaml b/tests/fixtures/cassettes/activity_get_single_event.yaml deleted file mode 100644 index 2ad2b67..0000000 --- a/tests/fixtures/cassettes/activity_get_single_event.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750862870&date_to=1750949270&event%5B0%5D=sent - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed0d8fdc58e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:32 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '56' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_single_not_found.yaml b/tests/fixtures/cassettes/activity_get_single_not_found.yaml deleted file mode 100644 index a65af86..0000000 --- a/tests/fixtures/cassettes/activity_get_single_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activities/5ee0b166b251345e407c9207 - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed0e24a7de290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:33 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '50' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_with_datetime.yaml b/tests/fixtures/cassettes/activity_get_with_datetime.yaml deleted file mode 100644 index 3fede41..0000000 --- a/tests/fixtures/cassettes/activity_get_with_datetime.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750927692&date_to=1750949292 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed0dbaca396e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:32 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '55' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_with_events.yaml b/tests/fixtures/cassettes/activity_get_with_events.yaml deleted file mode 100644 index 93f35ce..0000000 --- a/tests/fixtures/cassettes/activity_get_with_events.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=1&limit=25&date_from=1750862861&date_to=1750949261&event%5B0%5D=sent&event%5B1%5D=delivered&event%5B2%5D=opened - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed0d81f88e290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:32 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '59' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/activity_get_with_pagination.yaml b/tests/fixtures/cassettes/activity_get_with_pagination.yaml deleted file mode 100644 index 8005c59..0000000 --- a/tests/fixtures/cassettes/activity_get_with_pagination.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/activity/65qngkdovk8lwr12?page=2&limit=10&date_from=1750862844&date_to=1750949244 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","last":null,"prev":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=1","next":null},"meta":{"current_page":2,"current_page_url":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12?page=2","from":null,"path":"https:\/\/api.mailersend.com\/v1\/activity\/65qngkdovk8lwr12","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed0d74f98c239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:31 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '58' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_comprehensive_test.yaml b/tests/fixtures/cassettes/analytics_comprehensive_test.yaml deleted file mode 100644 index 2ae45a6..0000000 --- a/tests/fixtures/cassettes/analytics_comprehensive_test.yaml +++ /dev/null @@ -1,194 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&tags%5B%5D=integration-test&group_by=days&event%5B%5D=sent&event%5B%5D=delivered - response: - body: - string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"days","stats":[{"date":"1777680000","sent":0,"delivered":0},{"date":"1777766400","sent":0,"delivered":0},{"date":"1777852800","sent":0,"delivered":0},{"date":"1777939200","sent":0,"delivered":0},{"date":"1778025600","sent":0,"delivered":0},{"date":"1778112000","sent":0,"delivered":0},{"date":"1778198400","sent":0,"delivered":0},{"date":"1778284800","sent":0,"delivered":0},{"date":"1778371200","sent":0,"delivered":0},{"date":"1778457600","sent":0,"delivered":0},{"date":"1778544000","sent":0,"delivered":0},{"date":"1778630400","sent":0,"delivered":0},{"date":"1778716800","sent":0,"delivered":0},{"date":"1778803200","sent":0,"delivered":0},{"date":"1778889600","sent":0,"delivered":0},{"date":"1778976000","sent":0,"delivered":0},{"date":"1779062400","sent":0,"delivered":0},{"date":"1779148800","sent":0,"delivered":0},{"date":"1779235200","sent":0,"delivered":0},{"date":"1779321600","sent":0,"delivered":0},{"date":"1779408000","sent":0,"delivered":0},{"date":"1779494400","sent":0,"delivered":0},{"date":"1779580800","sent":0,"delivered":0},{"date":"1779667200","sent":0,"delivered":0},{"date":"1779753600","sent":0,"delivered":0},{"date":"1779840000","sent":0,"delivered":0},{"date":"1779926400","sent":0,"delivered":0},{"date":"1780012800","sent":0,"delivered":0},{"date":"1780099200","sent":0,"delivered":0},{"date":"1780185600","sent":0,"delivered":0},{"date":"1780272000","sent":0,"delivered":0}]}}' - headers: - CF-RAY: - - a16ed0ef7af7dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:35 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '60' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/country?date_from=1777680000&date_to=1780272000&tags%5B%5D=integration-test - response: - body: - string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' - headers: - CF-RAY: - - a16ed0f06f69fa43-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:36 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '54' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/ua-name?date_from=1777680000&date_to=1780272000&tags%5B%5D=integration-test - response: - body: - string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' - headers: - CF-RAY: - - a16ed0f14d9cc239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:36 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '59' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/ua-type?date_from=1777680000&date_to=1780272000&tags%5B%5D=integration-test - response: - body: - string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' - headers: - CF-RAY: - - a16ed0f23edde296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:36 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '95' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_country_basic.yaml b/tests/fixtures/cassettes/analytics_country_basic.yaml deleted file mode 100644 index c6b4f79..0000000 --- a/tests/fixtures/cassettes/analytics_country_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/country?date_from=1777680000&date_to=1780272000 - response: - body: - string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' - headers: - CF-RAY: - - a16ed0e6e955e293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:34 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '52' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_country_with_tags.yaml b/tests/fixtures/cassettes/analytics_country_with_tags.yaml deleted file mode 100644 index 56a432b..0000000 --- a/tests/fixtures/cassettes/analytics_country_with_tags.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/country?date_from=1777680000&date_to=1780272000&tags%5B%5D=newsletter - response: - body: - string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' - headers: - CF-RAY: - - a16ed0e7df87e296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:34 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '52' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_date_all_events.yaml b/tests/fixtures/cassettes/analytics_date_all_events.yaml deleted file mode 100644 index e2b52d7..0000000 --- a/tests/fixtures/cassettes/analytics_date_all_events.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&group_by=days&event%5B%5D=sent&event%5B%5D=delivered&event%5B%5D=opened&event%5B%5D=clicked&event%5B%5D=hard_bounced&event%5B%5D=soft_bounced&event%5B%5D=unsubscribed&event%5B%5D=spam_complaints - response: - body: - string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"days","stats":[{"date":"1777680000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1777766400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1777852800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1777939200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778025600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778112000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778198400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778284800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778371200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778457600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778544000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778630400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778716800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778803200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778889600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1778976000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779062400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779148800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779235200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779321600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779408000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779494400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779580800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779667200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779753600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779840000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1779926400","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780012800","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780099200","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780185600","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780272000","sent":0,"delivered":0,"opened":0,"clicked":0,"hard_bounced":0,"soft_bounced":0,"unsubscribed":0,"spam_complaints":0}]}}' - headers: - CF-RAY: - - a16ed0e5fea43267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:34 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '59' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_date_basic.yaml b/tests/fixtures/cassettes/analytics_date_basic.yaml deleted file mode 100644 index ab3f1c3..0000000 --- a/tests/fixtures/cassettes/analytics_date_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&group_by=days&event%5B%5D=sent&event%5B%5D=delivered&event%5B%5D=opened - response: - body: - string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"days","stats":[{"date":"1777680000","sent":0,"delivered":0,"opened":0},{"date":"1777766400","sent":0,"delivered":0,"opened":0},{"date":"1777852800","sent":0,"delivered":0,"opened":0},{"date":"1777939200","sent":0,"delivered":0,"opened":0},{"date":"1778025600","sent":0,"delivered":0,"opened":0},{"date":"1778112000","sent":0,"delivered":0,"opened":0},{"date":"1778198400","sent":0,"delivered":0,"opened":0},{"date":"1778284800","sent":0,"delivered":0,"opened":0},{"date":"1778371200","sent":0,"delivered":0,"opened":0},{"date":"1778457600","sent":0,"delivered":0,"opened":0},{"date":"1778544000","sent":0,"delivered":0,"opened":0},{"date":"1778630400","sent":0,"delivered":0,"opened":0},{"date":"1778716800","sent":0,"delivered":0,"opened":0},{"date":"1778803200","sent":0,"delivered":0,"opened":0},{"date":"1778889600","sent":0,"delivered":0,"opened":0},{"date":"1778976000","sent":0,"delivered":0,"opened":0},{"date":"1779062400","sent":0,"delivered":0,"opened":0},{"date":"1779148800","sent":0,"delivered":0,"opened":0},{"date":"1779235200","sent":0,"delivered":0,"opened":0},{"date":"1779321600","sent":0,"delivered":0,"opened":0},{"date":"1779408000","sent":0,"delivered":0,"opened":0},{"date":"1779494400","sent":0,"delivered":0,"opened":0},{"date":"1779580800","sent":0,"delivered":0,"opened":0},{"date":"1779667200","sent":0,"delivered":0,"opened":0},{"date":"1779753600","sent":0,"delivered":0,"opened":0},{"date":"1779840000","sent":0,"delivered":0,"opened":0},{"date":"1779926400","sent":0,"delivered":0,"opened":0},{"date":"1780012800","sent":0,"delivered":0,"opened":0},{"date":"1780099200","sent":0,"delivered":0,"opened":0},{"date":"1780185600","sent":0,"delivered":0,"opened":0},{"date":"1780272000","sent":0,"delivered":0,"opened":0}]}}' - headers: - CF-RAY: - - a16ed0e33861e293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:33 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '57' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_date_builder_helpers.yaml b/tests/fixtures/cassettes/analytics_date_builder_helpers.yaml deleted file mode 100644 index 4d96df1..0000000 --- a/tests/fixtures/cassettes/analytics_date_builder_helpers.yaml +++ /dev/null @@ -1,98 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1779667200&date_to=1780272000&group_by=days&event%5B%5D=sent&event%5B%5D=delivered - response: - body: - string: '{"data":{"date_from":"1779667200","date_to":"1780358399","group_by":"days","stats":[{"date":"1779667200","sent":0,"delivered":0},{"date":"1779753600","sent":0,"delivered":0},{"date":"1779840000","sent":0,"delivered":0},{"date":"1779926400","sent":0,"delivered":0},{"date":"1780012800","sent":0,"delivered":0},{"date":"1780099200","sent":0,"delivered":0},{"date":"1780185600","sent":0,"delivered":0},{"date":"1780272000","sent":0,"delivered":0}]}}' - headers: - CF-RAY: - - a16ed0ec7dc30a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:35 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '54' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1779062400&date_to=1780272000&group_by=days&event%5B%5D=opened&event%5B%5D=clicked - response: - body: - string: '{"data":{"date_from":"1779062400","date_to":"1780358399","group_by":"days","stats":[{"date":"1779062400","opened":0,"clicked":0},{"date":"1779148800","opened":0,"clicked":0},{"date":"1779235200","opened":0,"clicked":0},{"date":"1779321600","opened":0,"clicked":0},{"date":"1779408000","opened":0,"clicked":0},{"date":"1779494400","opened":0,"clicked":0},{"date":"1779580800","opened":0,"clicked":0},{"date":"1779667200","opened":0,"clicked":0},{"date":"1779753600","opened":0,"clicked":0},{"date":"1779840000","opened":0,"clicked":0},{"date":"1779926400","opened":0,"clicked":0},{"date":"1780012800","opened":0,"clicked":0},{"date":"1780099200","opened":0,"clicked":0},{"date":"1780185600","opened":0,"clicked":0},{"date":"1780272000","opened":0,"clicked":0}]}}' - headers: - CF-RAY: - - a16ed0ed6e0ee297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:35 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '51' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_date_with_domain.yaml b/tests/fixtures/cassettes/analytics_date_with_domain.yaml deleted file mode 100644 index b9f0723..0000000 --- a/tests/fixtures/cassettes/analytics_date_with_domain.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/date?domain_id=your-domain-id&date_from=1777680000&date_to=1780272000&group_by=months&event%5B%5D=opened&event%5B%5D=clicked&event%5B%5D=unsubscribed&event%5B%5D=spam_complaints - response: - body: - string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"months","stats":[{"date":"1777593600","opened":0,"clicked":0,"unsubscribed":0,"spam_complaints":0},{"date":"1780272000","opened":0,"clicked":0,"unsubscribed":0,"spam_complaints":0}]}}' - headers: - CF-RAY: - - a16ed0e5093d5165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:34 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '57' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_date_with_tags.yaml b/tests/fixtures/cassettes/analytics_date_with_tags.yaml deleted file mode 100644 index 6f6fd64..0000000 --- a/tests/fixtures/cassettes/analytics_date_with_tags.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&tags%5B%5D=newsletter&tags%5B%5D=marketing&group_by=weeks&event%5B%5D=sent&event%5B%5D=delivered&event%5B%5D=opened&event%5B%5D=clicked - response: - body: - string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"weeks","stats":[{"date":"1777248000","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1777852800","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1778457600","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1779062400","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1779667200","sent":0,"delivered":0,"opened":0,"clicked":0},{"date":"1780272000","sent":0,"delivered":0,"opened":0,"clicked":0}]}}' - headers: - CF-RAY: - - a16ed0e41a8396e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:34 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '55' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_error_no_events.yaml b/tests/fixtures/cassettes/analytics_error_no_events.yaml deleted file mode 100644 index 860ccc9..0000000 --- a/tests/fixtures/cassettes/analytics_error_no_events.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/date?date_from=1777680000&date_to=1780272000&group_by=days - response: - body: - string: '{"data":{"date_from":"1777680000","date_to":"1780358399","group_by":"days","stats":[{"date":"1777680000"},{"date":"1777766400"},{"date":"1777852800"},{"date":"1777939200"},{"date":"1778025600"},{"date":"1778112000"},{"date":"1778198400"},{"date":"1778284800"},{"date":"1778371200"},{"date":"1778457600"},{"date":"1778544000"},{"date":"1778630400"},{"date":"1778716800"},{"date":"1778803200"},{"date":"1778889600"},{"date":"1778976000"},{"date":"1779062400"},{"date":"1779148800"},{"date":"1779235200"},{"date":"1779321600"},{"date":"1779408000"},{"date":"1779494400"},{"date":"1779580800"},{"date":"1779667200"},{"date":"1779753600"},{"date":"1779840000"},{"date":"1779926400"},{"date":"1780012800"},{"date":"1780099200"},{"date":"1780185600"},{"date":"1780272000"}]}}' - headers: - CF-RAY: - - a16ed0ee5bdacf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:35 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '51' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_reading_env_basic.yaml b/tests/fixtures/cassettes/analytics_reading_env_basic.yaml deleted file mode 100644 index 79a0265..0000000 --- a/tests/fixtures/cassettes/analytics_reading_env_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/ua-type?date_from=1777680000&date_to=1780272000 - response: - body: - string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' - headers: - CF-RAY: - - a16ed0eaab1f1f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:35 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '54' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_reading_env_with_recipients.yaml b/tests/fixtures/cassettes/analytics_reading_env_with_recipients.yaml deleted file mode 100644 index d1b538c..0000000 --- a/tests/fixtures/cassettes/analytics_reading_env_with_recipients.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/ua-type?recipient_id%5B%5D=recipient-1&recipient_id%5B%5D=recipient-2&date_from=1777680000&date_to=1780272000 - response: - body: - string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' - headers: - CF-RAY: - - a16ed0eb9862562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:35 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '56' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_user_agent_basic.yaml b/tests/fixtures/cassettes/analytics_user_agent_basic.yaml deleted file mode 100644 index 87814c5..0000000 --- a/tests/fixtures/cassettes/analytics_user_agent_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/ua-name?date_from=1777680000&date_to=1780272000 - response: - body: - string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' - headers: - CF-RAY: - - a16ed0e8becc126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:34 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '53' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/analytics_user_agent_with_domain.yaml b/tests/fixtures/cassettes/analytics_user_agent_with_domain.yaml deleted file mode 100644 index ac821b2..0000000 --- a/tests/fixtures/cassettes/analytics_user_agent_with_domain.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/ua-name?domain_id=your-domain-id&date_from=1777680000&date_to=1780272000 - response: - body: - string: '{"data":{"date_from":1777680000,"date_to":1780358399,"stats":[]}}' - headers: - CF-RAY: - - a16ed0e9bf943267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:34 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '63' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_create_minimal.yaml b/tests/fixtures/cassettes/domains_create_minimal.yaml deleted file mode 100644 index 1e9e5bf..0000000 --- a/tests/fixtures/cassettes/domains_create_minimal.yaml +++ /dev/null @@ -1,96 +0,0 @@ -interactions: -- request: - body: '{"name": "test.fail"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '21' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/domains - response: - body: - string: '{"data":{"id":"3m5jgr9n7rxgdpyo","name":"test.fail","dkim":null,"spf":null,"mx":null,"tracking":null,"is_verified":false,"is_dns_active":false,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click - here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"can":{"manage":true},"totals":[],"is_dkim_txt":null,"show_dkim_info":false,"is_being_verified":false,"is_custom_links_available":false}}' - headers: - CF-RAY: - - a16ed0f859ec0a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:57 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '20311' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/domains/3m5jgr9n7rxgdpyo - response: - body: - string: '' - headers: - CF-RAY: - - a16ed177e889e296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Date: - - Mon, 06 Jul 2026 13:04:57 GMT - Server: - - cloudflare - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '117' - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/fixtures/cassettes/domains_delete_not_found.yaml b/tests/fixtures/cassettes/domains_delete_not_found.yaml deleted file mode 100644 index e5beffb..0000000 --- a/tests/fixtures/cassettes/domains_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/domains/non-existent-domain-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed18759d28e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:00 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/domains_delete_success.yaml b/tests/fixtures/cassettes/domains_delete_success.yaml deleted file mode 100644 index 71f9a3d..0000000 --- a/tests/fixtures/cassettes/domains_delete_success.yaml +++ /dev/null @@ -1,96 +0,0 @@ -interactions: -- request: - body: '{"name": "somerandomdomain.com"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '32' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/domains - response: - body: - string: '{"data":{"id":"q3enl6x2jrml2vwr","name":"somerandomdomain.com","dkim":null,"spf":null,"mx":null,"tracking":null,"is_verified":false,"is_dns_active":false,"is_trial_domain":false,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click - here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"can":{"manage":true},"totals":[],"is_dkim_txt":null,"show_dkim_info":false,"is_being_verified":false,"is_custom_links_available":false}}' - headers: - CF-RAY: - - a16ed1846f70aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:59 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '176' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/domains/q3enl6x2jrml2vwr - response: - body: - string: '' - headers: - CF-RAY: - - a16ed1860b065165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Date: - - Mon, 06 Jul 2026 13:05:00 GMT - Server: - - cloudflare - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '111' - status: - code: 204 - message: No Content -version: 1 diff --git a/tests/fixtures/cassettes/domains_dns_records_not_found.yaml b/tests/fixtures/cassettes/domains_dns_records_not_found.yaml deleted file mode 100644 index 1b7e2b6..0000000 --- a/tests/fixtures/cassettes/domains_dns_records_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/non-existent-domain-id/dns-records - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed17cfe46d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:58 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/domains_dns_records_success.yaml b/tests/fixtures/cassettes/domains_dns_records_success.yaml deleted file mode 100644 index a1a9940..0000000 --- a/tests/fixtures/cassettes/domains_dns_records_success.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/dns-records - response: - body: - string: '{"data":{"id":"65qngkdovk8lwr12","spf":{"hostname":"igor.fail","type":"TXT","value":"v=spf1 - include:_spf.mailersend.net include:_spf.mltest.co include:_spf.mx.cloudflare.net - a mx include:_spf.mlsend.com ~all"},"dkim":{"hostname":"mlsend2._domainkey.igor.fail","type":"CNAME","value":"mlsend2._domainkey.mailersend.net"},"return_path":{"hostname":"mta.igor.fail","type":"CNAME","value":"mailersend.net"},"custom_tracking":{"hostname":"track.igor.fail","type":"CNAME","value":"links.mailersend.net"},"inbound_routing":{"hostname":"inbound.igor.fail","type":"MX","value":"inbound.mailersend.net","priority":"10"}}}' - headers: - CF-RAY: - - a16ed17bfae8aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:58 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '74' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_get_not_found.yaml b/tests/fixtures/cassettes/domains_get_not_found.yaml deleted file mode 100644 index 4c0db10..0000000 --- a/tests/fixtures/cassettes/domains_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/non-existent-domain-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed0f778001b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:37 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/domains_get_success.yaml b/tests/fixtures/cassettes/domains_get_success.yaml deleted file mode 100644 index 565027c..0000000 --- a/tests/fixtures/cassettes/domains_get_success.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12 - response: - body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:02:21.000000Z","totals":{"sent":0,"delivered":94,"hard_bounced":2,"soft_bounced":0}}}' - headers: - CF-RAY: - - a16ed0f6aba0dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:36 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_list_basic.yaml b/tests/fixtures/cassettes/domains_list_basic.yaml deleted file mode 100644 index 785cdfb..0000000 --- a/tests/fixtures/cassettes/domains_list_basic.yaml +++ /dev/null @@ -1,58 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":1,"queued":0,"sent":0,"rejected":0,"delivered":1},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click - here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":true,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z","totals":[]},{"id":"xkjn41mjxp94z781","name":"bob.fail","dkim":false,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":2,"queued":0,"sent":0,"rejected":0,"delivered":2},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click - here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z","totals":[]},{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:02:21.000000Z","totals":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":10,"to":3,"total":3}}' - headers: - CF-RAY: - - a16ed0f36e7355ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:36 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_list_builder.yaml b/tests/fixtures/cassettes/domains_list_builder.yaml deleted file mode 100644 index 557d58e..0000000 --- a/tests/fixtures/cassettes/domains_list_builder.yaml +++ /dev/null @@ -1,58 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains?page=1&limit=15 - response: - body: - string: '{"data":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":1,"queued":0,"sent":0,"rejected":0,"delivered":1},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click - here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":true,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z","totals":[]},{"id":"xkjn41mjxp94z781","name":"bob.fail","dkim":false,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":2,"queued":0,"sent":0,"rejected":0,"delivered":2},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click - here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z","totals":[]},{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:02:21.000000Z","totals":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":15,"to":3,"total":3}}' - headers: - CF-RAY: - - a16ed0f5da270db0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:36 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_list_pagination.yaml b/tests/fixtures/cassettes/domains_list_pagination.yaml deleted file mode 100644 index 869e6a2..0000000 --- a/tests/fixtures/cassettes/domains_list_pagination.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains?page=2&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":"https:\/\/api.mailersend.com\/v1\/domains?page=1","next":null},"meta":{"current_page":2,"from":null,"last_page":1,"links":[{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"« - Previous","page":1,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","page":1,"active":false},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":10,"to":null,"total":3}}' - headers: - CF-RAY: - - a16ed0f438ca8e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:36 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_list_verified.yaml b/tests/fixtures/cassettes/domains_list_verified.yaml deleted file mode 100644 index 802f456..0000000 --- a/tests/fixtures/cassettes/domains_list_verified.yaml +++ /dev/null @@ -1,58 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":false,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":1,"queued":0,"sent":0,"rejected":0,"delivered":1},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click - here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":true,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z","totals":[]},{"id":"xkjn41mjxp94z781","name":"bob.fail","dkim":false,"spf":false,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":false,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":2,"queued":0,"sent":0,"rejected":0,"delivered":2},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Click - here to unsubscribe<\/a><\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Click - here to unsubscribe: {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":false,"custom_tracking_subdomain":"email","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false},"created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z","totals":[]},{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:02:21.000000Z","totals":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains?page=1","last":"https:\/\/api.mailersend.com\/v1\/domains?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/domains?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/domains","per_page":10,"to":3,"total":3}}' - headers: - CF-RAY: - - a16ed0f50d4dcf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:36 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_recipients_basic.yaml b/tests/fixtures/cassettes/domains_recipients_basic.yaml deleted file mode 100644 index e886407..0000000 --- a/tests/fixtures/cassettes/domains_recipients_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/recipients?page=1&limit=25 - response: - body: - string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients","per_page":25,"to":9}}' - headers: - CF-RAY: - - a16ed181bd83f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:59 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_recipients_builder.yaml b/tests/fixtures/cassettes/domains_recipients_builder.yaml deleted file mode 100644 index a48dc22..0000000 --- a/tests/fixtures/cassettes/domains_recipients_builder.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/recipients?page=1&limit=20 - response: - body: - string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients","per_page":20,"to":9}}' - headers: - CF-RAY: - - a16ed18388d2c239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:59 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_recipients_pagination.yaml b/tests/fixtures/cassettes/domains_recipients_pagination.yaml deleted file mode 100644 index cd9a82e..0000000 --- a/tests/fixtures/cassettes/domains_recipients_pagination.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/recipients?page=2&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","last":null,"prev":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=1","next":null},"meta":{"current_page":2,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients?page=2","from":null,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/recipients","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed182af131f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:59 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '49' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_settings_workflow.yaml b/tests/fixtures/cassettes/domains_settings_workflow.yaml deleted file mode 100644 index ae39b7b..0000000 --- a/tests/fixtures/cassettes/domains_settings_workflow.yaml +++ /dev/null @@ -1,208 +0,0 @@ -interactions: -- request: - body: '{"send_paused": false, "track_clicks": true, "track_opens": true, "track_unsubscribe": - true, "track_content": true, "custom_tracking_enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '148' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings - response: - body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:58.000000Z","totals":[]}}' - headers: - CF-RAY: - - a16ed1883ff9126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:00 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '45' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12 - response: - body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:58.000000Z","totals":{"sent":0,"delivered":94,"hard_bounced":2,"soft_bounced":0}}}' - headers: - CF-RAY: - - a16ed1891bb8e291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:00 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '49' - status: - code: 200 - message: OK -- request: - body: '{"send_paused": true, "track_clicks": false, "track_opens": false, "track_unsubscribe": - false, "track_content": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '118' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings - response: - body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z","totals":[]}}' - headers: - CF-RAY: - - a16ed189e82eb01e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:00 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '55' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12 - response: - body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z","totals":{"sent":0,"delivered":94,"hard_bounced":2,"soft_bounced":0}}}' - headers: - CF-RAY: - - a16ed18aefd9d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:00 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '43' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_update_settings_builder.yaml b/tests/fixtures/cassettes/domains_update_settings_builder.yaml deleted file mode 100644 index 39369e2..0000000 --- a/tests/fixtures/cassettes/domains_update_settings_builder.yaml +++ /dev/null @@ -1,55 +0,0 @@ -interactions: -- request: - body: '{"send_paused": false, "track_clicks": true, "track_opens": true, "track_unsubscribe": - true, "track_content": true, "custom_tracking_subdomain": "track"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '153' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings - response: - body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:58.000000Z","totals":[]}}' - headers: - CF-RAY: - - a16ed17af81fe297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:58 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '55' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_update_settings_pause.yaml b/tests/fixtures/cassettes/domains_update_settings_pause.yaml deleted file mode 100644 index 71b474d..0000000 --- a/tests/fixtures/cassettes/domains_update_settings_pause.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '{"send_paused": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '21' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings - response: - body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":true,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:58.000000Z","totals":[]}}' - headers: - CF-RAY: - - a16ed17a1d88e294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:58 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_update_settings_tracking.yaml b/tests/fixtures/cassettes/domains_update_settings_tracking.yaml deleted file mode 100644 index 7de3065..0000000 --- a/tests/fixtures/cassettes/domains_update_settings_tracking.yaml +++ /dev/null @@ -1,57 +0,0 @@ -interactions: -- request: - body: '{"send_paused": false, "track_clicks": true, "track_opens": true, "track_unsubscribe": - true, "track_content": true, "track_unsubscribe_html": "

Custom unsubscribe - {{unsubscribe}}

", "track_unsubscribe_plain": "Custom unsubscribe {{unsubscribe}}", - "custom_tracking_enabled": true, "custom_tracking_subdomain": "track"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '322' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/settings - response: - body: - string: '{"data":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"domain_stats":{"total":122,"queued":0,"sent":0,"rejected":2,"delivered":120},"has_not_queued_messages":true,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":true,"track_opens":true,"track_opens_pixel_on_top":false,"track_unsubscribe":true,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":true,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:04:57.000000Z","totals":[]}}' - headers: - CF-RAY: - - a16ed1793bd35165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:57 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '53' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/domains_verification_not_found.yaml b/tests/fixtures/cassettes/domains_verification_not_found.yaml deleted file mode 100644 index f243a59..0000000 --- a/tests/fixtures/cassettes/domains_verification_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/non-existent-domain-id/verify - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed180fa779857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:59 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '35' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/domains_verification_status.yaml b/tests/fixtures/cassettes/domains_verification_status.yaml deleted file mode 100644 index 51dd44b..0000000 --- a/tests/fixtures/cassettes/domains_verification_status.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/verify - response: - body: - string: '{"message":"The domain is verified.","data":{"dkim":true,"spf":true,"mx":true,"tracking":false,"cname":false,"rp_cname":true}}' - headers: - CF-RAY: - - a16ed17dbcb8f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:04:58 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '422' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/email_send_bulk.yaml b/tests/fixtures/cassettes/email_send_bulk.yaml deleted file mode 100644 index 695ac90..0000000 --- a/tests/fixtures/cassettes/email_send_bulk.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '[{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

First - Email

"}, {"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

Second - Email

"}]' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '337' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/bulk-email - response: - body: - string: '{"message":"The bulk email is being processed.","bulk_email_id":"6a4ba7fecead680ed75f1be3"}' - headers: - CF-RAY: - - a16ed1964d77c687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:02 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '60' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_bulk_workflow.yaml b/tests/fixtures/cassettes/email_send_bulk_workflow.yaml deleted file mode 100644 index bd55da1..0000000 --- a/tests/fixtures/cassettes/email_send_bulk_workflow.yaml +++ /dev/null @@ -1,102 +0,0 @@ -interactions: -- request: - body: '[{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

First - Email

"}, {"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

Second - Email

"}]' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '337' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/bulk-email - response: - body: - string: '{"message":"The bulk email is being processed.","bulk_email_id":"6a4ba7fe601233499cce2610"}' - headers: - CF-RAY: - - a16ed1973dff562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:02 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '65' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/bulk-email/6a4ba7fe601233499cce2610 - response: - body: - string: '{"data":{"id":"6a4ba7fe601233499cce2610","state":"queued","total_recipients_count":2,"suppressed_recipients_count":0,"suppressed_recipients":null,"validation_errors_count":0,"validation_errors":null,"messages_id":null,"created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"}}' - headers: - CF-RAY: - - a16ed1980d99e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:02 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '47' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/email_send_text_only.yaml b/tests/fixtures/cassettes/email_send_text_only.yaml deleted file mode 100644 index 0ecad1e..0000000 --- a/tests/fixtures/cassettes/email_send_text_only.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "text": "This - is a test email"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '168' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed18cd81af339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:01 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '82' - x-message-id: - - 6a4ba7fda0a5e230c0a64b6d - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_attachments.yaml b/tests/fixtures/cassettes/email_send_with_attachments.yaml deleted file mode 100644 index 5b1263e..0000000 --- a/tests/fixtures/cassettes/email_send_with_attachments.yaml +++ /dev/null @@ -1,57 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This - is a test email

", "attachments": [{"content": "VGhpcyBpcyBhIHRlc3QgYXR0YWNobWVudCBmaWxlLg==", - "disposition": "attachment", "filename": "test_attachment.txt"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '317' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed18f1c1e8e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:01 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '102' - x-message-id: - - 6a4ba7fdf9f7d7c86a80e254 - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_base_params.yaml b/tests/fixtures/cassettes/email_send_with_base_params.yaml deleted file mode 100644 index 306964b..0000000 --- a/tests/fixtures/cassettes/email_send_with_base_params.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This - is a test email

"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '175' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed18bca86d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:00 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '79' - x-message-id: - - 6a4ba7fc3d9443c28e9a2d19 - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_cc_bcc.yaml b/tests/fixtures/cassettes/email_send_with_cc_bcc.yaml deleted file mode 100644 index 5995358..0000000 --- a/tests/fixtures/cassettes/email_send_with_cc_bcc.yaml +++ /dev/null @@ -1,57 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "cc": [{"email": "cc@igor.fail", "name": - "Recipient"}], "bcc": [{"email": "bcc@igor.fail", "name": "Recipient"}], "subject": - "Test Email", "html": "

This is a test email

"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '289' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16eda733ad81f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:11:05 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '100' - x-message-id: - - 6a4ba969f1ad063e8c7d47af - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_headers.yaml b/tests/fixtures/cassettes/email_send_with_headers.yaml deleted file mode 100644 index 698496f..0000000 --- a/tests/fixtures/cassettes/email_send_with_headers.yaml +++ /dev/null @@ -1,57 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This - is a test email

", "headers": [{"name": "X-Custom-Header", "value": "Custom - Value"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '242' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed1933ed7e293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:02 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '84' - x-message-id: - - 6a4ba7fe89757eb80bdfbffe - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_reply_to.yaml b/tests/fixtures/cassettes/email_send_with_reply_to.yaml deleted file mode 100644 index 94ceac6..0000000 --- a/tests/fixtures/cassettes/email_send_with_reply_to.yaml +++ /dev/null @@ -1,57 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "reply_to": {"email": "replyto@igor.fail", - "name": "Reply Handler"}, "subject": "Test Email", "html": "

This is a test - email

"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '244' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed1943d9ee28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:02 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '78' - x-message-id: - - 6a4ba7fe257e065d3cdcc01e - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_tags.yaml b/tests/fixtures/cassettes/email_send_with_tags.yaml deleted file mode 100644 index 7688e3e..0000000 --- a/tests/fixtures/cassettes/email_send_with_tags.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This - is a test email

", "tags": ["test", "automation", "api-test"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '219' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed19048a0aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:01 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '76' - x-message-id: - - 6a4ba7fd18eecf5fff31b852 - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_template.yaml b/tests/fixtures/cassettes/email_send_with_template.yaml deleted file mode 100644 index be7dff0..0000000 --- a/tests/fixtures/cassettes/email_send_with_template.yaml +++ /dev/null @@ -1,57 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This - is a test email

", "personalization": [{"email": "to@igor.fail", "data": - {"name": "Recipient Name"}}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '259' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed192386755ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:01 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '89' - x-message-id: - - 6a4ba7fd8bf4b9799385c29e - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_text_priority.yaml b/tests/fixtures/cassettes/email_send_with_text_priority.yaml deleted file mode 100644 index b17a22e..0000000 --- a/tests/fixtures/cassettes/email_send_with_text_priority.yaml +++ /dev/null @@ -1,57 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "text": "This - is a plain text email for testing.", "html": "

This is a test email

", - "precedence_bulk": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '251' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed18dfacfa8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:01 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '82' - x-message-id: - - 6a4ba7fdb8148e47a0a27202 - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_threading.yaml b/tests/fixtures/cassettes/email_send_with_threading.yaml deleted file mode 100644 index cb7c6da..0000000 --- a/tests/fixtures/cassettes/email_send_with_threading.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This - is a test email

", "in_reply_to": "replyto@igor.fail", "references": ["123456"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '237' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed1953dc70380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:02 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '90' - x-message-id: - - 6a4ba7fe5d67d4122d52ef46 - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_send_with_tracking.yaml b/tests/fixtures/cassettes/email_send_with_tracking.yaml deleted file mode 100644 index 99cd035..0000000 --- a/tests/fixtures/cassettes/email_send_with_tracking.yaml +++ /dev/null @@ -1,57 +0,0 @@ -interactions: -- request: - body: '{"from": {"email": "from@igor.fail", "name": "Sender"}, "to": [{"email": - "to@igor.fail", "name": "Recipient"}], "subject": "Test Email", "html": "

This - is a test email

", "settings": {"track_clicks": true, "track_opens": true, - "track_content": false}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '256' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email - response: - body: - string: '' - headers: - CF-RAY: - - a16ed1912e1d96e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=utf-8 - Date: - - Mon, 06 Jul 2026 13:05:01 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '82' - x-message-id: - - 6a4ba7fd29cbd2c32f82e6e2 - x-send-paused: - - 'true' - status: - code: 202 - message: Accepted -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_api_response_structure.yaml b/tests/fixtures/cassettes/email_verification_api_response_structure.yaml deleted file mode 100644 index 4ba79ab..0000000 --- a/tests/fixtures/cassettes/email_verification_api_response_structure.yaml +++ /dev/null @@ -1,59 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"ynrw7gym99jg2k8e","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:51:56.000000Z","updated_at":"2026-07-06T12:51:57.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"v69oxl5e22kl785k","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:51:57.000000Z","verification_ended":"2026-07-06T12:52:57.000000Z","created_at":"2026-07-06T12:51:57.000000Z","updated_at":"2026-07-06T12:52:57.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"z86org8e221gew13","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:53:09.000000Z","updated_at":"2026-07-06T12:53:09.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"zr6ke4n1xxvgon12","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:53:10.000000Z","verification_ended":"2026-07-06T12:54:10.000000Z","created_at":"2026-07-06T12:53:10.000000Z","updated_at":"2026-07-06T12:54:10.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"pxkjn41m2204z781","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:55:31.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"vywj2lpnqqmg7oqz","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:55:32.000000Z","verification_ended":"2026-07-06T12:56:32.000000Z","created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:56:32.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"0r83ql3pwwzgzw1j","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:57:23.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"k68zxl27rrk4j905","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:24.000000Z","updated_at":"2026-07-06T12:57:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xw117g9yjr","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:02:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"neqvygm0z0zl0p7w","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:24.000000Z","updated_at":"2026-07-06T13:02:25.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/email-verification?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":10}}' - headers: - CF-RAY: - - a16ed1a39cc7fa43-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:04 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_comprehensive_workflow.yaml b/tests/fixtures/cassettes/email_verification_comprehensive_workflow.yaml deleted file mode 100644 index 0318362..0000000 --- a/tests/fixtures/cassettes/email_verification_comprehensive_workflow.yaml +++ /dev/null @@ -1,195 +0,0 @@ -interactions: -- request: - body: '{"name": "Comprehensive Test List", "emails": ["test1@example.com", "test2@example.com", - "invalid-email", "test3@validexample.com"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '132' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email-verification - response: - body: - string: '{"data":{"id":"351ndgwv7vrlzqx8","name":"Comprehensive Test List","total":0,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:03.000000Z","status":{"name":"uploading","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}}}' - headers: - CF-RAY: - - a16ed19f2ec4a8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:04 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '218' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification/351ndgwv7vrlzqx8 - response: - body: - string: '{"data":{"id":"351ndgwv7vrlzqx8","name":"Comprehensive Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:04.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}}' - headers: - CF-RAY: - - a16ed1a108ede295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:04 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification/351ndgwv7vrlzqx8/verify - response: - body: - string: '{"data":{"id":"351ndgwv7vrlzqx8","name":"Comprehensive Test List","total":4,"verification_started":"2026-07-06T13:05:04.000000Z","verification_ended":null,"created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:04.000000Z","status":{"name":"verifying","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}}' - headers: - CF-RAY: - - a16ed1a1b83b3267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:04 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '66' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification/351ndgwv7vrlzqx8/results?page=1&limit=10 - response: - body: - string: '{"data":[{"address":"test1@example.com","result":null},{"address":"test2@example.com","result":null},{"address":"invalid-email","result":null},{"address":"test3@validexample.com","result":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification\/351ndgwv7vrlzqx8\/results?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification\/351ndgwv7vrlzqx8\/results?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification\/351ndgwv7vrlzqx8\/results","per_page":"10","to":4}}' - headers: - CF-RAY: - - a16ed1a29a50e28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:04 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '73' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_create_list.yaml b/tests/fixtures/cassettes/email_verification_create_list.yaml deleted file mode 100644 index b2cf696..0000000 --- a/tests/fixtures/cassettes/email_verification_create_list.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: '{"name": "Test Verification List", "emails": ["test1@example.com", "test2@example.com", - "invalid-email", "test3@validexample.com"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '131' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/email-verification - response: - body: - string: '{"data":{"id":"z3m5jgro7oogdpyo","name":"Test Verification List","total":0,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:03.000000Z","status":{"name":"uploading","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}}}' - headers: - CF-RAY: - - a16ed19a69530380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:03 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '219' - status: - code: 201 - message: Created -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_empty_list.yaml b/tests/fixtures/cassettes/email_verification_empty_list.yaml deleted file mode 100644 index e684a98..0000000 --- a/tests/fixtures/cassettes/email_verification_empty_list.yaml +++ /dev/null @@ -1,59 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"ynrw7gym99jg2k8e","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:51:56.000000Z","updated_at":"2026-07-06T12:51:57.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"v69oxl5e22kl785k","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:51:57.000000Z","verification_ended":"2026-07-06T12:52:57.000000Z","created_at":"2026-07-06T12:51:57.000000Z","updated_at":"2026-07-06T12:52:57.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"z86org8e221gew13","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:53:09.000000Z","updated_at":"2026-07-06T12:53:09.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"zr6ke4n1xxvgon12","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:53:10.000000Z","verification_ended":"2026-07-06T12:54:10.000000Z","created_at":"2026-07-06T12:53:10.000000Z","updated_at":"2026-07-06T12:54:10.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"pxkjn41m2204z781","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:55:31.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"vywj2lpnqqmg7oqz","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:55:32.000000Z","verification_ended":"2026-07-06T12:56:32.000000Z","created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:56:32.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"0r83ql3pwwzgzw1j","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:57:23.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"k68zxl27rrk4j905","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:24.000000Z","updated_at":"2026-07-06T12:57:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xw117g9yjr","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:02:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"neqvygm0z0zl0p7w","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:24.000000Z","updated_at":"2026-07-06T13:02:25.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/email-verification?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":10}}' - headers: - CF-RAY: - - a16ed1a46cc0b30f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:04 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_get_not_found.yaml b/tests/fixtures/cassettes/email_verification_get_not_found.yaml deleted file mode 100644 index fe3a0ec..0000000 --- a/tests/fixtures/cassettes/email_verification_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification/non-existent-list-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed19d0c70dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:03 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_get_results.yaml b/tests/fixtures/cassettes/email_verification_get_results.yaml deleted file mode 100644 index bc6a035..0000000 --- a/tests/fixtures/cassettes/email_verification_get_results.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification/test-verification-list-id/results?page=1&limit=10 - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed19e6f299857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:03 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_get_single.yaml b/tests/fixtures/cassettes/email_verification_get_single.yaml deleted file mode 100644 index ec8c910..0000000 --- a/tests/fixtures/cassettes/email_verification_get_single.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification/test-verification-list-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed19c58585165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:03 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_list_basic.yaml b/tests/fixtures/cassettes/email_verification_list_basic.yaml deleted file mode 100644 index 41da8f7..0000000 --- a/tests/fixtures/cassettes/email_verification_list_basic.yaml +++ /dev/null @@ -1,59 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"ynrw7gym99jg2k8e","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:51:56.000000Z","updated_at":"2026-07-06T12:51:57.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"v69oxl5e22kl785k","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:51:57.000000Z","verification_ended":"2026-07-06T12:52:57.000000Z","created_at":"2026-07-06T12:51:57.000000Z","updated_at":"2026-07-06T12:52:57.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"z86org8e221gew13","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:53:09.000000Z","updated_at":"2026-07-06T12:53:09.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"zr6ke4n1xxvgon12","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:53:10.000000Z","verification_ended":"2026-07-06T12:54:10.000000Z","created_at":"2026-07-06T12:53:10.000000Z","updated_at":"2026-07-06T12:54:10.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"pxkjn41m2204z781","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:55:31.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"vywj2lpnqqmg7oqz","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:55:32.000000Z","verification_ended":"2026-07-06T12:56:32.000000Z","created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:56:32.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"0r83ql3pwwzgzw1j","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:57:23.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"k68zxl27rrk4j905","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:24.000000Z","updated_at":"2026-07-06T12:57:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xw117g9yjr","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:02:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"neqvygm0z0zl0p7w","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:24.000000Z","updated_at":"2026-07-06T13:02:25.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/email-verification?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":10}}' - headers: - CF-RAY: - - a16ed198d8aee291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:02 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '51' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_list_with_pagination.yaml b/tests/fixtures/cassettes/email_verification_list_with_pagination.yaml deleted file mode 100644 index 0a06f92..0000000 --- a/tests/fixtures/cassettes/email_verification_list_with_pagination.yaml +++ /dev/null @@ -1,59 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"ynrw7gym99jg2k8e","name":"Test Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:51:56.000000Z","updated_at":"2026-07-06T12:51:57.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"v69oxl5e22kl785k","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:51:57.000000Z","verification_ended":"2026-07-06T12:52:57.000000Z","created_at":"2026-07-06T12:51:57.000000Z","updated_at":"2026-07-06T12:52:57.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"z86org8e221gew13","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:53:09.000000Z","updated_at":"2026-07-06T12:53:09.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"zr6ke4n1xxvgon12","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:53:10.000000Z","verification_ended":"2026-07-06T12:54:10.000000Z","created_at":"2026-07-06T12:53:10.000000Z","updated_at":"2026-07-06T12:54:10.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"pxkjn41m2204z781","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:55:31.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"vywj2lpnqqmg7oqz","name":"Comprehensive - Test List","total":4,"verification_started":"2026-07-06T12:55:32.000000Z","verification_ended":"2026-07-06T12:56:32.000000Z","created_at":"2026-07-06T12:55:31.000000Z","updated_at":"2026-07-06T12:56:32.000000Z","status":{"name":"verified","count":4},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":1,"typo":0,"mailbox_not_found":3,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":0}},{"id":"0r83ql3pwwzgzw1j","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:57:23.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"k68zxl27rrk4j905","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T12:57:24.000000Z","updated_at":"2026-07-06T12:57:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"0p7kx4xw117g9yjr","name":"Test - Verification List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:02:24.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}},{"id":"neqvygm0z0zl0p7w","name":"Comprehensive - Test List","total":4,"verification_started":null,"verification_ended":null,"created_at":"2026-07-06T13:02:24.000000Z","updated_at":"2026-07-06T13:02:25.000000Z","status":{"name":"created","count":0},"source":"api","statistics":{"valid":0,"catch_all":0,"mailbox_full":0,"role_based":0,"unknown":0,"syntax_error":0,"typo":0,"mailbox_not_found":0,"disposable":0,"mailbox_blocked":0,"failed":0,"not_verified":4}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/email-verification?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/email-verification?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/email-verification","per_page":"10","to":10}}' - headers: - CF-RAY: - - a16ed199ab2a1f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:03 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/email_verification_verify_list.yaml b/tests/fixtures/cassettes/email_verification_verify_list.yaml deleted file mode 100644 index c717479..0000000 --- a/tests/fixtures/cassettes/email_verification_verify_list.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification/test-verification-list-id/verify - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed19dbdb7e290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:03 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '35' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/identities_create_not_available.yaml b/tests/fixtures/cassettes/identities_create_not_available.yaml deleted file mode 100644 index 12fd0ad..0000000 --- a/tests/fixtures/cassettes/identities_create_not_available.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: '{"domain_id": "65qngkdovk8lwr12", "name": "Test Identity", "email": "from@igor.fail", - "reply_to_email": "from@igor.fail", "reply_to_name": "Reply Test", "add_note": - true, "personal_note": "Test identity for integration testing"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '228' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/identities - response: - body: - string: '{"message":"The email has already been taken.","errors":{"email":["The - email has already been taken."]}}' - headers: - CF-RAY: - - a16ed1a52dbe1f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:04 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '101' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/identities_delete_by_email.yaml b/tests/fixtures/cassettes/identities_delete_by_email.yaml deleted file mode 100644 index e56b89a..0000000 --- a/tests/fixtures/cassettes/identities_delete_by_email.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/identities/email/test@example.com - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1a9fcc53267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:05 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '35' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/identities_delete_by_id.yaml b/tests/fixtures/cassettes/identities_delete_by_id.yaml deleted file mode 100644 index ffde7f6..0000000 --- a/tests/fixtures/cassettes/identities_delete_by_id.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/identities/test-identity-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1a9480ce294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:05 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/identities_get_by_email.yaml b/tests/fixtures/cassettes/identities_get_by_email.yaml deleted file mode 100644 index 8f0d095..0000000 --- a/tests/fixtures/cassettes/identities_get_by_email.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/identities/email/test@example.com - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1a70a900a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:05 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/identities_get_single.yaml b/tests/fixtures/cassettes/identities_get_single.yaml deleted file mode 100644 index 2b11502..0000000 --- a/tests/fixtures/cassettes/identities_get_single.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/identities/test-identity-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1a65883e294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:05 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/identities_update_by_email.yaml b/tests/fixtures/cassettes/identities_update_by_email.yaml deleted file mode 100644 index 835bf68..0000000 --- a/tests/fixtures/cassettes/identities_update_by_email.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Updated Test Identity"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/identities/email/test@example.com - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1a8aef11778-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:05 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/identities_update_by_id.yaml b/tests/fixtures/cassettes/identities_update_by_id.yaml deleted file mode 100644 index ee8af40..0000000 --- a/tests/fixtures/cassettes/identities_update_by_id.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Updated Test Identity"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '33' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/identities/test-identity-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1a7cfdb870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:05 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '50' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/inbound_api_response_structure.yaml b/tests/fixtures/cassettes/inbound_api_response_structure.yaml deleted file mode 100644 index 5031e23..0000000 --- a/tests/fixtures/cassettes/inbound_api_response_structure.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' - headers: - CF-RAY: - - a16ed1b0bab3b01e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:06 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '56' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/inbound_builder_create_invalid_domain.yaml b/tests/fixtures/cassettes/inbound_builder_create_invalid_domain.yaml deleted file mode 100644 index f03ad44..0000000 --- a/tests/fixtures/cassettes/inbound_builder_create_invalid_domain.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: '{"domain_id": "invalid-domain-id", "name": "Test Route", "domain_enabled": - false, "catch_filter": {"type": "catch_all"}, "match_filter": {"type": "match_all"}, - "forwards": [{"type": "email", "value": "test@example.com"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '221' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/inbound - response: - body: - string: '{"message":"The domain id field is required. #MS42209","errors":{"domain_id":["The - domain id field is required. #MS42209"]}}' - headers: - CF-RAY: - - a16ed1b4fb141f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:07 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '59' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/inbound_builder_get_not_found.yaml b/tests/fixtures/cassettes/inbound_builder_get_not_found.yaml deleted file mode 100644 index 3a9e8ca..0000000 --- a/tests/fixtures/cassettes/inbound_builder_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound/test-inbound-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1b42bd41b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:07 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/inbound_builder_list_basic.yaml b/tests/fixtures/cassettes/inbound_builder_list_basic.yaml deleted file mode 100644 index 5622e4b..0000000 --- a/tests/fixtures/cassettes/inbound_builder_list_basic.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' - headers: - CF-RAY: - - a16ed1b28c0e3267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:07 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '53' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml b/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml deleted file mode 100644 index cd6acdc..0000000 --- a/tests/fixtures/cassettes/inbound_builder_list_with_domain.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound?page=1&limit=10&domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[{"id":"7dnvo4d971xg5r86","name":"My Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":2,"total":2}}' - headers: - CF-RAY: - - a16ed1b35fba5165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:07 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '55' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/inbound_create_invalid_domain.yaml b/tests/fixtures/cassettes/inbound_create_invalid_domain.yaml deleted file mode 100644 index 094e3b1..0000000 --- a/tests/fixtures/cassettes/inbound_create_invalid_domain.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '{"domain_id": "invalid-domain-id", "name": "Test Inbound Route", "domain_enabled": - false, "catch_filter": {"type": "catch_all"}, "catch_type": "all", "match_filter": - {"type": "match_all"}, "match_type": "all", "forwards": [{"type": "email", "value": - "from@igor.fail"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '269' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/inbound - response: - body: - string: '{"message":"The domain id field is required. #MS42209","errors":{"domain_id":["The - domain id field is required. #MS42209"]}}' - headers: - CF-RAY: - - a16ed1ae28ee870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:06 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '57' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/inbound_delete_not_found.yaml b/tests/fixtures/cassettes/inbound_delete_not_found.yaml deleted file mode 100644 index 8a28292..0000000 --- a/tests/fixtures/cassettes/inbound_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/inbound/test-inbound-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1afeaf3cf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:06 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '51' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/inbound_empty_result.yaml b/tests/fixtures/cassettes/inbound_empty_result.yaml deleted file mode 100644 index e561a62..0000000 --- a/tests/fixtures/cassettes/inbound_empty_result.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' - headers: - CF-RAY: - - a16ed1b19bb1e297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:06 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '60' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/inbound_get_not_found.yaml b/tests/fixtures/cassettes/inbound_get_not_found.yaml deleted file mode 100644 index 646de4a..0000000 --- a/tests/fixtures/cassettes/inbound_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound/test-inbound-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1ad5c290380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:06 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '48' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/inbound_list_basic.yaml b/tests/fixtures/cassettes/inbound_list_basic.yaml deleted file mode 100644 index 1b3787d..0000000 --- a/tests/fixtures/cassettes/inbound_list_basic.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' - headers: - CF-RAY: - - a16ed1aabd13e28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:05 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '51' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml b/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml deleted file mode 100644 index 3fa2b02..0000000 --- a/tests/fixtures/cassettes/inbound_list_with_domain_filter.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound?page=1&limit=10&domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[{"id":"7dnvo4d971xg5r86","name":"My Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":2,"total":2}}' - headers: - CF-RAY: - - a16ed1ac797ee28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:06 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '54' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/inbound_list_with_pagination.yaml b/tests/fixtures/cassettes/inbound_list_with_pagination.yaml deleted file mode 100644 index 3130593..0000000 --- a/tests/fixtures/cassettes/inbound_list_with_pagination.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/inbound?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"v69oxl5e83zl785k","name":"Email Receiver","address":"vpv6muiv4toxmhu7v5ac@inbound.mailersend.net","domain":"inbound.cypress.litehub.io","dns_checked_at":"2026-07-06T01:11:27.000000Z","enabled":true,"filters":[{"type":"catch_all","key":null,"comparer":null,"value":null},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/receiver.litesrv.io\/api\/webhooks\/inbound-email","secret":"***FILTERED***"}],"priority":10,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"7dnvo4d971xg5r86","name":"My - Inbound Route","address":"9xbbdxn5lbewxaqu2wih@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_all","key":null,"comparer":null,"value":null}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"},{"id":"yzkq340ezw6gd796","name":"My - Inbound Route","address":"9bihxzuv97bjt91w7jvd@inbound.mailersend.net","domain":null,"dns_checked_at":null,"enabled":true,"filters":[{"type":"catch_recipient","key":null,"comparer":"equal","value":"support"},{"type":"match_sender","key":null,"comparer":"equal","value":"support"}],"forwards":[{"type":"webhook","value":"https:\/\/igor.fail\/webhook","secret":"***FILTERED***"}],"priority":0,"mxValues":{"priority":"10","target":"inbound.mailersend.net"},"catch_type":"all","match_type":"all"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","last":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/inbound?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/inbound","per_page":10,"to":3,"total":3}}' - headers: - CF-RAY: - - a16ed1ab9ea4e298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:05 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '62' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/inbound_update_not_found.yaml b/tests/fixtures/cassettes/inbound_update_not_found.yaml deleted file mode 100644 index c9cb33c..0000000 --- a/tests/fixtures/cassettes/inbound_update_not_found.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '{"name": "Test Inbound Route", "domain_enabled": false, "catch_filter": - {"type": "catch_all"}, "catch_type": "all", "match_filter": {"type": "match_all"}, - "match_type": "all", "forwards": [{"type": "email", "value": "from@igor.fail"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '235' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/inbound/test-inbound-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1af095ca8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:06 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '53' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/invites_cancel.yaml b/tests/fixtures/cassettes/invites_cancel.yaml deleted file mode 100644 index 4e7fbd4..0000000 --- a/tests/fixtures/cassettes/invites_cancel.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/invites/test-invite-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed239cfc6e28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:28 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/invites_get_single.yaml b/tests/fixtures/cassettes/invites_get_single.yaml deleted file mode 100644 index aec1e1d..0000000 --- a/tests/fixtures/cassettes/invites_get_single.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/invites/test-invite-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2385f23f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:28 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '40' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/invites_list_basic.yaml b/tests/fixtures/cassettes/invites_list_basic.yaml deleted file mode 100644 index d6c41f1..0000000 --- a/tests/fixtures/cassettes/invites_list_basic.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/invites?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/invites?page=1","last":"https:\/\/api.mailersend.com\/v1\/invites?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/invites?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/invites","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed2379eb79857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:28 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/invites_resend.yaml b/tests/fixtures/cassettes/invites_resend.yaml deleted file mode 100644 index c6263f5..0000000 --- a/tests/fixtures/cassettes/invites_resend.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/invites/test-invite-id/resend - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2391a0ce294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:28 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/messages_api_response_structure.yaml b/tests/fixtures/cassettes/messages_api_response_structure.yaml deleted file mode 100644 index cd7c998..0000000 --- a/tests/fixtures/cassettes/messages_api_response_structure.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1b8fc1ea8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:08 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '50' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/messages_builder_get_not_found.yaml b/tests/fixtures/cassettes/messages_builder_get_not_found.yaml deleted file mode 100644 index 38ec285..0000000 --- a/tests/fixtures/cassettes/messages_builder_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages/test-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1bc496ddfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:08 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '47' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/messages_builder_list_basic.yaml b/tests/fixtures/cassettes/messages_builder_list_basic.yaml deleted file mode 100644 index 4f30476..0000000 --- a/tests/fixtures/cassettes/messages_builder_list_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1ba9efebbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:08 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '52' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/messages_builder_list_with_custom_limit.yaml b/tests/fixtures/cassettes/messages_builder_list_with_custom_limit.yaml deleted file mode 100644 index ff67284..0000000 --- a/tests/fixtures/cassettes/messages_builder_list_with_custom_limit.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages?page=1&limit=50 - response: - body: - string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2c2e6b9b53356cbff","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1fbedf140a2b0dbed","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c20177de662f3db3a3","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c28348ff065eb1121e","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2fe9099c351f54f82","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba632004badd365b44374","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63146a4165473302091","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba633bd923db80f5a6251","created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632888abafb5a5a32e5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6310a4b8a2879f705b5","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63151e50cf2b3cb2559","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631911f4baa390dc243","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631db3afb306eb3415d","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6325c2cb15ea31dc0d7","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63280cc4753b40972c5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632b3a5034416588e3e","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632d5f22702b2612a33","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63368a5216de94f4267","created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba75e907cfdf50292e5fc","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75faa37a22449f58734","created_at":"2026-07-06T13:02:23.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75e48249ee995199c66","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75eedcba7918ae37054","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba7fdb8148e47a0a27202","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fd8bf4b9799385c29e","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fffa0835ce18da847d","created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:03.000000Z"},{"id":"6a4ba7fda0a5e230c0a64b6d","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fc3d9443c28e9a2d19","created_at":"2026-07-06T13:05:00.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"6a4ba75d4252c69473584e14","created_at":"2026-07-06T13:02:21.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75db9cdb689ca850767","created_at":"2026-07-06T13:02:21.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75de37a63aad0569ac4","created_at":"2026-07-06T13:02:21.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75e6ca896bf12848b5e","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75e84b64ff660bd66b7","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba75ec1cfe2b68e6ea48c","created_at":"2026-07-06T13:02:22.000000Z","updated_at":"2026-07-06T13:04:57.000000Z"},{"id":"6a4ba7fd29cbd2c32f82e6e2","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fe5d67d4122d52ef46","created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"},{"id":"6a4ba7fed7659d937361ec56","created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"},{"id":"6a4ba7fe0ece81c23c7dd18c","created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"},{"id":"6a4ba7ffbb0c377478310fed","created_at":"2026-07-06T13:05:03.000000Z","updated_at":"2026-07-06T13:05:03.000000Z"},{"id":"6a4ba7fd18eecf5fff31b852","created_at":"2026-07-06T13:05:01.000000Z","updated_at":"2026-07-06T13:05:01.000000Z"},{"id":"6a4ba7fe257e065d3cdcc01e","created_at":"2026-07-06T13:05:02.000000Z","updated_at":"2026-07-06T13:05:02.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":50,"to":50}}' - headers: - CF-RAY: - - a16ed1bb6c44076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:08 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '52' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/messages_comprehensive_workflow.yaml b/tests/fixtures/cassettes/messages_comprehensive_workflow.yaml deleted file mode 100644 index dee875b..0000000 --- a/tests/fixtures/cassettes/messages_comprehensive_workflow.yaml +++ /dev/null @@ -1,194 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1bd1b55e28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:08 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '51' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages?page=1&limit=25 - response: - body: - string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2c2e6b9b53356cbff","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1fbedf140a2b0dbed","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c20177de662f3db3a3","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c28348ff065eb1121e","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2fe9099c351f54f82","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba632004badd365b44374","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63146a4165473302091","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba633bd923db80f5a6251","created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632888abafb5a5a32e5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6310a4b8a2879f705b5","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63151e50cf2b3cb2559","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631911f4baa390dc243","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631db3afb306eb3415d","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6325c2cb15ea31dc0d7","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63280cc4753b40972c5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":25,"to":25}}' - headers: - CF-RAY: - - a16ed1bde951562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:08 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '51' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1beae370380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:09 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages/another-non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1bf6f32a8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:09 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '56' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/messages_empty_result.yaml b/tests/fixtures/cassettes/messages_empty_result.yaml deleted file mode 100644 index 3a2c04d..0000000 --- a/tests/fixtures/cassettes/messages_empty_result.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1b9cd1b126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:08 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '47' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/messages_get_not_found.yaml b/tests/fixtures/cassettes/messages_get_not_found.yaml deleted file mode 100644 index 455b71e..0000000 --- a/tests/fixtures/cassettes/messages_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages/test-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1b82eeae28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:07 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/messages_list_basic.yaml b/tests/fixtures/cassettes/messages_list_basic.yaml deleted file mode 100644 index 377e8a1..0000000 --- a/tests/fixtures/cassettes/messages_list_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1b5ca7cbbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:07 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '48' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/messages_list_different_limit.yaml b/tests/fixtures/cassettes/messages_list_different_limit.yaml deleted file mode 100644 index 4eba7df..0000000 --- a/tests/fixtures/cassettes/messages_list_different_limit.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages?page=1&limit=25 - response: - body: - string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2c2e6b9b53356cbff","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1fbedf140a2b0dbed","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c20177de662f3db3a3","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c28348ff065eb1121e","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c2fe9099c351f54f82","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba632004badd365b44374","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63146a4165473302091","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba633bd923db80f5a6251","created_at":"2026-07-06T12:57:23.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba632888abafb5a5a32e5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6310a4b8a2879f705b5","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63151e50cf2b3cb2559","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631911f4baa390dc243","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba631db3afb306eb3415d","created_at":"2026-07-06T12:57:21.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba6325c2cb15ea31dc0d7","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"},{"id":"6a4ba63280cc4753b40972c5","created_at":"2026-07-06T12:57:22.000000Z","updated_at":"2026-07-06T12:59:40.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":25,"to":25}}' - headers: - CF-RAY: - - a16ed1b74dedf339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:07 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '56' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/messages_list_with_pagination.yaml b/tests/fixtures/cassettes/messages_list_with_pagination.yaml deleted file mode 100644 index 67ff439..0000000 --- a/tests/fixtures/cassettes/messages_list_with_pagination.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/messages?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"6a44bc5f0c8e812371766201","created_at":"2026-07-01T07:06:07.000000Z","updated_at":"2026-07-01T07:06:07.000000Z"},{"id":"6a44bc8f52019566f0edc648","created_at":"2026-07-01T07:06:55.000000Z","updated_at":"2026-07-01T07:06:55.000000Z"},{"id":"6a4ba5c2951f22dbbb2b2d3b","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c0787af57005278af5","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c10d5d3e5e25f01c9a","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c130ac794e5c499eb1","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1431a4ec16c8165b3","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1b34bcda56e2d285d","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c1c9893703784d2195","created_at":"2026-07-06T12:55:29.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"},{"id":"6a4ba5c23a96dc84079aad30","created_at":"2026-07-06T12:55:30.000000Z","updated_at":"2026-07-06T12:57:18.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/messages?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/messages?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/messages?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/messages","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1b68f8d8e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:07 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '50' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/recipients_add_hard_bounces.yaml b/tests/fixtures/cassettes/recipients_add_hard_bounces.yaml deleted file mode 100644 index 96ed99e..0000000 --- a/tests/fixtures/cassettes/recipients_add_hard_bounces.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: '{"domain_id": "test-domain-id", "recipients": ["test@example.com"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '67' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/suppressions/hard-bounces - response: - body: - string: '{"message":"The domain id field is required. #MS42209","errors":{"domain_id":["The - domain id field is required. #MS42209"]}}' - headers: - CF-RAY: - - a16ed1c7d831dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:10 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/recipients_add_spam_complaints.yaml b/tests/fixtures/cassettes/recipients_add_spam_complaints.yaml deleted file mode 100644 index d28c4e9..0000000 --- a/tests/fixtures/cassettes/recipients_add_spam_complaints.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: '{"domain_id": "test-domain-id", "recipients": ["test@example.com"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '67' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/suppressions/spam-complaints - response: - body: - string: '{"message":"The domain id field is required. #MS42209","errors":{"domain_id":["The - domain id field is required. #MS42209"]}}' - headers: - CF-RAY: - - a16ed1c89d300a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:10 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/recipients_add_to_blocklist.yaml b/tests/fixtures/cassettes/recipients_add_to_blocklist.yaml deleted file mode 100644 index c6b07fd..0000000 --- a/tests/fixtures/cassettes/recipients_add_to_blocklist.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: '{"domain_id": "test-domain-id", "recipients": ["test@example.com"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '67' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/suppressions/blocklist - response: - body: - string: '{"message":"The selected domain id is invalid.","errors":{"domain_id":["The - selected domain id is invalid."]}}' - headers: - CF-RAY: - - a16ed1c72a041778-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:10 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/recipients_add_unsubscribes.yaml b/tests/fixtures/cassettes/recipients_add_unsubscribes.yaml deleted file mode 100644 index a4baf41..0000000 --- a/tests/fixtures/cassettes/recipients_add_unsubscribes.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: '{"domain_id": "test-domain-id", "recipients": ["test@example.com"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '67' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/suppressions/unsubscribes - response: - body: - string: '{"message":"The domain id field is required. #MS42209","errors":{"domain_id":["The - domain id field is required. #MS42209"]}}' - headers: - CF-RAY: - - a16ed1c95ce9dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:10 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '33' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/recipients_api_response_structure.yaml b/tests/fixtures/cassettes/recipients_api_response_structure.yaml deleted file mode 100644 index 7a41042..0000000 --- a/tests/fixtures/cassettes/recipients_api_response_structure.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/recipients?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""},{"id":"6977580d0e29e82266465bdd","email":"igor@mailerlite.com","created_at":"2026-01-26T12:03:25.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/recipients?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1cb6ba4e28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/recipients_blocklist_basic.yaml b/tests/fixtures/cassettes/recipients_blocklist_basic.yaml deleted file mode 100644 index b7c1e99..0000000 --- a/tests/fixtures/cassettes/recipients_blocklist_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/suppressions/blocklist?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"688ec2bbe0b75b54b0119874","type":"exact","pattern":"ms-sdk-bcc@igor.fail","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},"created_at":"2025-08-03T02:00:27.000000Z","updated_at":"2025-08-03T02:00:27.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/blocklist?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/suppressions\/blocklist?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/blocklist","per_page":10,"to":1}}' - headers: - CF-RAY: - - a16ed1c32a53d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:09 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '167' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/recipients_comprehensive_workflow.yaml b/tests/fixtures/cassettes/recipients_comprehensive_workflow.yaml deleted file mode 100644 index e091e07..0000000 --- a/tests/fixtures/cassettes/recipients_comprehensive_workflow.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: '{"domain_id": "test-domain-id", "recipients": ["workflow-test@example.com"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '76' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/suppressions/blocklist - response: - body: - string: '{"message":"The selected domain id is invalid.","errors":{"domain_id":["The - selected domain id is invalid."]}}' - headers: - CF-RAY: - - a16ed1cabc1f55ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:10 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/recipients_delete_from_blocklist.yaml b/tests/fixtures/cassettes/recipients_delete_from_blocklist.yaml deleted file mode 100644 index 15b6762..0000000 --- a/tests/fixtures/cassettes/recipients_delete_from_blocklist.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: '{"domain_id": "test-domain-id", "ids": ["test-id"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '51' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/suppressions/blocklist - response: - body: - string: '{"message":"The selected domain id is invalid. (and 1 more error)","errors":{"domain_id":["The - selected domain id is invalid."],"ids.0":["The selected ids.0 is invalid."]}}' - headers: - CF-RAY: - - a16ed1c9fdc79857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:10 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '51' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/recipients_delete_success.yaml b/tests/fixtures/cassettes/recipients_delete_success.yaml deleted file mode 100644 index c4e61a9..0000000 --- a/tests/fixtures/cassettes/recipients_delete_success.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/recipients/test-recipient-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1c27bcf076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:09 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/recipients_empty_list.yaml b/tests/fixtures/cassettes/recipients_empty_list.yaml deleted file mode 100644 index 2e2e014..0000000 --- a/tests/fixtures/cassettes/recipients_empty_list.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/recipients?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""},{"id":"6977580d0e29e82266465bdd","email":"igor@mailerlite.com","created_at":"2026-01-26T12:03:25.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/recipients?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1cc194dbbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '48' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/recipients_get_single.yaml b/tests/fixtures/cassettes/recipients_get_single.yaml deleted file mode 100644 index ab9f668..0000000 --- a/tests/fixtures/cassettes/recipients_get_single.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/recipients/test-recipient-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1c1def4126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:09 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/recipients_hard_bounces_basic.yaml b/tests/fixtures/cassettes/recipients_hard_bounces_basic.yaml deleted file mode 100644 index fc1f3e1..0000000 --- a/tests/fixtures/cassettes/recipients_hard_bounces_basic.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/suppressions/hard-bounces?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"67efa6f1b810e35168ead88e","reason":"The email account - that you tried to reach does not exist. Please try double-checking the recipient''s - email address for typos or unnecessary spaces.","created_at":"2025-04-04T09:31:29.000000Z","recipient":{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":"","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}},{"id":"67efa6f13f3ebb599dc1210e","reason":"The - email account that you tried to reach does not exist. Please try double-checking - the recipient''s email address for typos or unnecessary spaces.","created_at":"2025-04-04T09:31:29.000000Z","recipient":{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":"","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/hard-bounces?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/suppressions\/hard-bounces?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/hard-bounces","per_page":10,"to":2}}' - headers: - CF-RAY: - - a16ed1c4bcbee28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:09 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '52' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/recipients_list_basic.yaml b/tests/fixtures/cassettes/recipients_list_basic.yaml deleted file mode 100644 index 7584e2a..0000000 --- a/tests/fixtures/cassettes/recipients_list_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/recipients?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""},{"id":"6977580d0e29e82266465bdd","email":"igor@mailerlite.com","created_at":"2026-01-26T12:03:25.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/recipients?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1c04d08e294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:09 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/recipients_list_with_pagination.yaml b/tests/fixtures/cassettes/recipients_list_with_pagination.yaml deleted file mode 100644 index e8ff552..0000000 --- a/tests/fixtures/cassettes/recipients_list_with_pagination.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/recipients?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"67ec6ab5bef95df839307ebb","email":"igor@mailerlite.com","created_at":"2025-04-01T22:37:41.000000Z","updated_at":"2025-04-01T22:37:41.000000Z","deleted_at":""},{"id":"67efa6b06eebb6cf5947ec61","email":"igo.r@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa6b0bc82b271476e086f","email":"ig.or@mailerlite.com","created_at":"2025-04-04T09:30:24.000000Z","updated_at":"2025-04-04T09:31:29.000000Z","deleted_at":""},{"id":"67efa8167b4d692450bdf95b","email":"ms-sdk-cc@igor.fail","created_at":"2025-04-04T09:36:22.000000Z","updated_at":"2025-04-04T09:36:22.000000Z","deleted_at":""},{"id":"688b456306c2017ead4365b8","email":"one@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688b456368e7384ef46d188d","email":"two@igor.fail","created_at":"2025-07-31T10:28:51.000000Z","updated_at":"2025-07-31T10:28:51.000000Z","deleted_at":""},{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":""},{"id":"6895a71f0d8acab3223ad7ae","email":"igor@hrcek.rs","created_at":"2025-08-08T07:28:31.000000Z","updated_at":"2025-08-08T07:28:31.000000Z","deleted_at":""},{"id":"6a4ba5c0fea813fc81f0cfa6","email":"to@igor.fail","created_at":"2026-07-06T12:55:28.000000Z","updated_at":"2026-07-06T12:55:28.000000Z","deleted_at":""},{"id":"6977580d0e29e82266465bdd","email":"igor@mailerlite.com","created_at":"2026-01-26T12:03:25.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","deleted_at":""}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","last":null,"prev":null,"next":"https:\/\/api.mailersend.com\/v1\/recipients?page=2"},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/recipients?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/recipients","per_page":10,"to":10}}' - headers: - CF-RAY: - - a16ed1c10da2e290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:09 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '54' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/recipients_spam_complaints_basic.yaml b/tests/fixtures/cassettes/recipients_spam_complaints_basic.yaml deleted file mode 100644 index 0f219b1..0000000 --- a/tests/fixtures/cassettes/recipients_spam_complaints_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/suppressions/spam-complaints?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/spam-complaints?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/suppressions\/spam-complaints?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/spam-complaints","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed1c59da2e298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:10 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '43' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/recipients_unsubscribes_basic.yaml b/tests/fixtures/cassettes/recipients_unsubscribes_basic.yaml deleted file mode 100644 index 029ed38..0000000 --- a/tests/fixtures/cassettes/recipients_unsubscribes_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/suppressions/unsubscribes?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"688bd436557b3f31bfb99c31","reason":null,"readable_reason":null,"recipient":{"id":"688bd40bc49b1cf19fe2e95e","email":"bounced@example.com","created_at":"2025-07-31T20:37:31.000000Z","updated_at":"2025-07-31T20:38:14.000000Z","deleted_at":"","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},"created_at":"2025-07-31T20:38:14.000000Z"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/suppressions\/unsubscribes?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/suppressions\/unsubscribes?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/suppressions\/unsubscribes","per_page":10,"to":1}}' - headers: - CF-RAY: - - a16ed1c65b56bbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:10 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '47' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/schedules_api_response_structure.yaml b/tests/fixtures/cassettes/schedules_api_response_structure.yaml deleted file mode 100644 index 82bd0c4..0000000 --- a/tests/fixtures/cassettes/schedules_api_response_structure.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/message-schedules?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1d16da90db0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '45' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/schedules_delete.yaml b/tests/fixtures/cassettes/schedules_delete.yaml deleted file mode 100644 index fd9c73f..0000000 --- a/tests/fixtures/cassettes/schedules_delete.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/message-schedules/test-message-id - response: - body: - string: "{\n \"message\": \"This message is scheduled to be sent shortly - or has already been sent, it's not possible to delete it.\"\n}" - headers: - CF-RAY: - - a16ed1d0ae6d870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '43' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/schedules_empty_result.yaml b/tests/fixtures/cassettes/schedules_empty_result.yaml deleted file mode 100644 index 2d32ce4..0000000 --- a/tests/fixtures/cassettes/schedules_empty_result.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/message-schedules?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1d23d8c126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:12 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/schedules_get_single.yaml b/tests/fixtures/cassettes/schedules_get_single.yaml deleted file mode 100644 index 225fbdd..0000000 --- a/tests/fixtures/cassettes/schedules_get_single.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/message-schedules/test-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1cfea19fa43-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/schedules_list_basic.yaml b/tests/fixtures/cassettes/schedules_list_basic.yaml deleted file mode 100644 index 9867f5c..0000000 --- a/tests/fixtures/cassettes/schedules_list_basic.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/message-schedules?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1cceb7571a6-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '49' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/schedules_list_with_domain_filter.yaml b/tests/fixtures/cassettes/schedules_list_with_domain_filter.yaml deleted file mode 100644 index 34948ef..0000000 --- a/tests/fixtures/cassettes/schedules_list_with_domain_filter.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/message-schedules?domain_id=65qngkdovk8lwr12&page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1ce7b59e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '45' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/schedules_list_with_pagination.yaml b/tests/fixtures/cassettes/schedules_list_with_pagination.yaml deleted file mode 100644 index 04cb914..0000000 --- a/tests/fixtures/cassettes/schedules_list_with_pagination.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/message-schedules?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1cdbae7aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '52' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/schedules_list_with_status_filter.yaml b/tests/fixtures/cassettes/schedules_list_with_status_filter.yaml deleted file mode 100644 index ab06d2a..0000000 --- a/tests/fixtures/cassettes/schedules_list_with_status_filter.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/message-schedules?status=scheduled&page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","last":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/message-schedules?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/message-schedules","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1cf2885e290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:11 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '43' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_api_response_structure.yaml b/tests/fixtures/cassettes/sms_activity_api_response_structure.yaml deleted file mode 100644 index e1cfa9d..0000000 --- a/tests/fixtures/cassettes/sms_activity_api_response_structure.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed1d7ca9c126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:13 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '52' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_builder_get_not_found.yaml b/tests/fixtures/cassettes/sms_activity_builder_get_not_found.yaml deleted file mode 100644 index bdb3741..0000000 --- a/tests/fixtures/cassettes/sms_activity_builder_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages/test-sms-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1dbaa6abbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:13 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml b/tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml deleted file mode 100644 index fb35768..0000000 --- a/tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed1d96c89870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:13 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_builder_list_with_filters.yaml b/tests/fixtures/cassettes/sms_activity_builder_list_with_filters.yaml deleted file mode 100644 index 9f4b308..0000000 --- a/tests/fixtures/cassettes/sms_activity_builder_list_with_filters.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?date_from=1753195200&date_to=1753800000&status%5B%5D=sent&status%5B%5D=delivered&page=1&limit=25 - response: - body: - string: '{"message":"Date selection out of range. Your account has a 30-day - data retention limit. Upgrade your plan or acquire a data retention addon.","errors":{"date_from":["Date - selection out of range. Your account has a 30-day data retention limit. Upgrade - your plan or acquire a data retention addon."]}}' - headers: - CF-RAY: - - a16ed1da2e34e293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:13 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '59' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_builder_list_with_sms_number.yaml b/tests/fixtures/cassettes/sms_activity_builder_list_with_sms_number.yaml deleted file mode 100644 index 8f24563..0000000 --- a/tests/fixtures/cassettes/sms_activity_builder_list_with_sms_number.yaml +++ /dev/null @@ -1,49 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?sms_number_id=test-sms-number-id&page=1&limit=10 - response: - body: - string: '{"message":"The selected sms number id is invalid.","errors":{"sms_number_id":["The - selected sms number id is invalid."]}}' - headers: - CF-RAY: - - a16ed1dafeb5c239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:13 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_comprehensive_workflow.yaml b/tests/fixtures/cassettes/sms_activity_comprehensive_workflow.yaml deleted file mode 100644 index 8cf1f7c..0000000 --- a/tests/fixtures/cassettes/sms_activity_comprehensive_workflow.yaml +++ /dev/null @@ -1,195 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed1dc588be290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:13 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?date_from=1753195200&date_to=1753800000&status%5B%5D=sent&page=1&limit=25 - response: - body: - string: '{"message":"Date selection out of range. Your account has a 30-day - data retention limit. Upgrade your plan or acquire a data retention addon.","errors":{"date_from":["Date - selection out of range. Your account has a 30-day data retention limit. Upgrade - your plan or acquire a data retention addon."]}}' - headers: - CF-RAY: - - a16ed1dd1cd8cf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:13 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 422 - message: Unprocessable Entity -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1ddcc70e290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:13 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages/another-non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1de8a5dd814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:14 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_empty_result.yaml b/tests/fixtures/cassettes/sms_activity_empty_result.yaml deleted file mode 100644 index 3bdafcb..0000000 --- a/tests/fixtures/cassettes/sms_activity_empty_result.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed1d8a96e0db0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:13 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_get_message_not_found.yaml b/tests/fixtures/cassettes/sms_activity_get_message_not_found.yaml deleted file mode 100644 index 71b4e96..0000000 --- a/tests/fixtures/cassettes/sms_activity_get_message_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages/test-sms-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1d70b8fe290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:12 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_list_basic.yaml b/tests/fixtures/cassettes/sms_activity_list_basic.yaml deleted file mode 100644 index ddc105a..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed1d3091cf969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:12 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '54' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_list_with_date_range.yaml b/tests/fixtures/cassettes/sms_activity_list_with_date_range.yaml deleted file mode 100644 index 443a0c5..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_with_date_range.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?date_from=1753195200&date_to=1753800000&page=1&limit=10 - response: - body: - string: '{"message":"Date selection out of range. Your account has a 30-day - data retention limit. Upgrade your plan or acquire a data retention addon.","errors":{"date_from":["Date - selection out of range. Your account has a 30-day data retention limit. Upgrade - your plan or acquire a data retention addon."]}}' - headers: - CF-RAY: - - a16ed1d57efedfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:12 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_list_with_pagination.yaml b/tests/fixtures/cassettes/sms_activity_list_with_pagination.yaml deleted file mode 100644 index 071b656..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_with_pagination.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?page=1&limit=25 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed1d3edd9bbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:12 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_list_with_sms_number_filter.yaml b/tests/fixtures/cassettes/sms_activity_list_with_sms_number_filter.yaml deleted file mode 100644 index a2868ff..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_with_sms_number_filter.yaml +++ /dev/null @@ -1,49 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?sms_number_id=test-sms-number-id&page=1&limit=10 - response: - body: - string: '{"message":"The selected sms number id is invalid.","errors":{"sms_number_id":["The - selected sms number id is invalid."]}}' - headers: - CF-RAY: - - a16ed1d4a83cbbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:12 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_activity_list_with_status_filter.yaml b/tests/fixtures/cassettes/sms_activity_list_with_status_filter.yaml deleted file mode 100644 index c7c21b6..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_with_status_filter.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-activity?status%5B%5D=queued&status%5B%5D=sent&page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-activity?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-activity","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed1d63c5de296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:12 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_messages_api_response_structure.yaml b/tests/fixtures/cassettes/sms_messages_api_response_structure.yaml deleted file mode 100644 index f17f5d8..0000000 --- a/tests/fixtures/cassettes/sms_messages_api_response_structure.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1e2df635165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:14 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_messages_comprehensive_workflow.yaml b/tests/fixtures/cassettes/sms_messages_comprehensive_workflow.yaml deleted file mode 100644 index 00f3262..0000000 --- a/tests/fixtures/cassettes/sms_messages_comprehensive_workflow.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1e39f89d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:14 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_messages_get_single.yaml b/tests/fixtures/cassettes/sms_messages_get_single.yaml deleted file mode 100644 index 893f849..0000000 --- a/tests/fixtures/cassettes/sms_messages_get_single.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages/test-sms-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1e16ea7a8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:14 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '43' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_messages_list_basic.yaml b/tests/fixtures/cassettes/sms_messages_list_basic.yaml deleted file mode 100644 index b5b6827..0000000 --- a/tests/fixtures/cassettes/sms_messages_list_basic.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1df3d7e870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:14 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '48' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_messages_list_empty.yaml b/tests/fixtures/cassettes/sms_messages_list_empty.yaml deleted file mode 100644 index 19f8210..0000000 --- a/tests/fixtures/cassettes/sms_messages_list_empty.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1e0ab32076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:14 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_messages_list_with_filters.yaml b/tests/fixtures/cassettes/sms_messages_list_with_filters.yaml deleted file mode 100644 index 741a005..0000000 --- a/tests/fixtures/cassettes/sms_messages_list_with_filters.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":25,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1e22a78e292-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:14 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_messages_list_with_pagination.yaml b/tests/fixtures/cassettes/sms_messages_list_with_pagination.yaml deleted file mode 100644 index 20a3922..0000000 --- a/tests/fixtures/cassettes/sms_messages_list_with_pagination.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-messages?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-messages?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-messages","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1dffc12e298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:14 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_api_response_structure.yaml b/tests/fixtures/cassettes/sms_numbers_api_response_structure.yaml deleted file mode 100644 index 546be1c..0000000 --- a/tests/fixtures/cassettes/sms_numbers_api_response_structure.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-numbers - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":15,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1eadb00e298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:16 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_delete_not_found.yaml b/tests/fixtures/cassettes/sms_numbers_delete_not_found.yaml deleted file mode 100644 index a2b9a5e..0000000 --- a/tests/fixtures/cassettes/sms_numbers_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1ea1b4271a6-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:15 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '35' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_empty_result.yaml b/tests/fixtures/cassettes/sms_numbers_empty_result.yaml deleted file mode 100644 index 386d62c..0000000 --- a/tests/fixtures/cassettes/sms_numbers_empty_result.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-numbers - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":15,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1eb8d96f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:16 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '35' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_get_not_found.yaml b/tests/fixtures/cassettes/sms_numbers_get_not_found.yaml deleted file mode 100644 index 3a74f2e..0000000 --- a/tests/fixtures/cassettes/sms_numbers_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1e73dd8dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:15 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '40' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_list_active_only.yaml b/tests/fixtures/cassettes/sms_numbers_list_active_only.yaml deleted file mode 100644 index 4e39fbb..0000000 --- a/tests/fixtures/cassettes/sms_numbers_list_active_only.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-numbers?paused=false&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1e67f521b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:15 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_list_basic.yaml b/tests/fixtures/cassettes/sms_numbers_list_basic.yaml deleted file mode 100644 index a1cc6c1..0000000 --- a/tests/fixtures/cassettes/sms_numbers_list_basic.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-numbers - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":15,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1e44c6be291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:15 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_list_paused_only.yaml b/tests/fixtures/cassettes/sms_numbers_list_paused_only.yaml deleted file mode 100644 index 418e291..0000000 --- a/tests/fixtures/cassettes/sms_numbers_list_paused_only.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-numbers?paused=true&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1e5bf580380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:15 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_list_with_filters.yaml b/tests/fixtures/cassettes/sms_numbers_list_with_filters.yaml deleted file mode 100644 index 3d540f7..0000000 --- a/tests/fixtures/cassettes/sms_numbers_list_with_filters.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-numbers?paused=false&page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","last":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":null,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/sms-numbers?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/sms-numbers","per_page":10,"to":null,"total":0}}' - headers: - CF-RAY: - - a16ed1e50befc239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:15 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_update_not_found.yaml b/tests/fixtures/cassettes/sms_numbers_update_not_found.yaml deleted file mode 100644 index cfcac2c..0000000 --- a/tests/fixtures/cassettes/sms_numbers_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"paused": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '16' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1e7efa5bbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:15 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_update_pause.yaml b/tests/fixtures/cassettes/sms_numbers_update_pause.yaml deleted file mode 100644 index 9890d4e..0000000 --- a/tests/fixtures/cassettes/sms_numbers_update_pause.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"paused": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '16' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1e889f3e293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:15 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_numbers_update_unpause.yaml b/tests/fixtures/cassettes/sms_numbers_update_unpause.yaml deleted file mode 100644 index df37d89..0000000 --- a/tests/fixtures/cassettes/sms_numbers_update_unpause.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"paused": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '17' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/sms-numbers/test-sms-number-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1e9489ce290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:15 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '40' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml b/tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml deleted file mode 100644 index f720f47..0000000 --- a/tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' - headers: - CF-RAY: - - a16ed1f10e29cf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:17 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_builder_get_not_found.yaml b/tests/fixtures/cassettes/sms_recipients_builder_get_not_found.yaml deleted file mode 100644 index 6fe53e6..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients/test-sms-recipient-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1f48b9c1b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:17 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml b/tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml deleted file mode 100644 index f483eed..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' - headers: - CF-RAY: - - a16ed1f26ad2562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:17 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_builder_list_with_sms_number.yaml b/tests/fixtures/cassettes/sms_recipients_builder_list_with_sms_number.yaml deleted file mode 100644 index 6a62442..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_list_with_sms_number.yaml +++ /dev/null @@ -1,49 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?sms_number_id=test-sms-number-id&limit=10 - response: - body: - string: '{"message":"The selected sms number id is invalid.","errors":{"sms_number_id":["The - selected sms number id is invalid."]}}' - headers: - CF-RAY: - - a16ed1f3ed85c239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:17 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '35' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_builder_list_with_status.yaml b/tests/fixtures/cassettes/sms_recipients_builder_list_with_status.yaml deleted file mode 100644 index df7329c..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_list_with_status.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?status=active - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed1f32d429857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:17 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_builder_update_not_found.yaml b/tests/fixtures/cassettes/sms_recipients_builder_update_not_found.yaml deleted file mode 100644 index a1492b7..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"status": "opt_out"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '21' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/sms-recipients/test-sms-recipient-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1f538f6cf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:17 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '45' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml b/tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml deleted file mode 100644 index c575977..0000000 --- a/tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml +++ /dev/null @@ -1,194 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' - headers: - CF-RAY: - - a16ed1f5f9f90380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:17 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '40' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?status=active - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed1f6bdc1562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:17 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1f77bbce293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:18 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients/another-non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1f82adfe291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:18 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '63' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_empty_result.yaml b/tests/fixtures/cassettes/sms_recipients_empty_result.yaml deleted file mode 100644 index b958d95..0000000 --- a/tests/fixtures/cassettes/sms_recipients_empty_result.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' - headers: - CF-RAY: - - a16ed1f1bc6ce28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:17 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_get_not_found.yaml b/tests/fixtures/cassettes/sms_recipients_get_not_found.yaml deleted file mode 100644 index be2fbd7..0000000 --- a/tests/fixtures/cassettes/sms_recipients_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients/test-sms-recipient-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1ef8cd8e298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:16 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '52' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_list_basic.yaml b/tests/fixtures/cassettes/sms_recipients_list_basic.yaml deleted file mode 100644 index 35c582e..0000000 --- a/tests/fixtures/cassettes/sms_recipients_list_basic.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' - headers: - CF-RAY: - - a16ed1ec58791f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:16 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_list_with_pagination.yaml b/tests/fixtures/cassettes/sms_recipients_list_with_pagination.yaml deleted file mode 100644 index f4b1f81..0000000 --- a/tests/fixtures/cassettes/sms_recipients_list_with_pagination.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":25,"to":null}}' - headers: - CF-RAY: - - a16ed1ed1b98bbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:16 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '55' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_list_with_sms_number_filter.yaml b/tests/fixtures/cassettes/sms_recipients_list_with_sms_number_filter.yaml deleted file mode 100644 index b040589..0000000 --- a/tests/fixtures/cassettes/sms_recipients_list_with_sms_number_filter.yaml +++ /dev/null @@ -1,49 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?sms_number_id=test-sms-number-id&limit=10 - response: - body: - string: '{"message":"The selected sms number id is invalid.","errors":{"sms_number_id":["The - selected sms number id is invalid."]}}' - headers: - CF-RAY: - - a16ed1eed8a6c687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:16 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_list_with_status_filter.yaml b/tests/fixtures/cassettes/sms_recipients_list_with_status_filter.yaml deleted file mode 100644 index b3fd562..0000000 --- a/tests/fixtures/cassettes/sms_recipients_list_with_status_filter.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-recipients?status=active&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/sms-recipients?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/sms-recipients","per_page":"10","to":null}}' - headers: - CF-RAY: - - a16ed1edef831778-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:16 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '60' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/sms_recipients_update_not_found.yaml b/tests/fixtures/cassettes/sms_recipients_update_not_found.yaml deleted file mode 100644 index f23a76c..0000000 --- a/tests/fixtures/cassettes/sms_recipients_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"status": "opt_out"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '21' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/sms-recipients/test-sms-recipient-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1f04ca5fa43-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:16 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '48' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_send_basic.yaml b/tests/fixtures/cassettes/sms_send_basic.yaml deleted file mode 100644 index 8b9ff5b..0000000 --- a/tests/fixtures/cassettes/sms_send_basic.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '{"from": "+1234567890", "to": ["+1234567890"], "text": "Hello, this is - a test SMS message!"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '92' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/sms - response: - body: - string: '{"message":"The from field contains an invalid number. (and 2 more - errors)","errors":{"from":["The from field contains an invalid number."],"to":["Daily - quota for this number exceeded."],"to.0":["The to.0 field contains an invalid - number."]}}' - headers: - CF-RAY: - - a16ed1f908add814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:18 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '53' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_send_long_message.yaml b/tests/fixtures/cassettes/sms_send_long_message.yaml deleted file mode 100644 index b065964..0000000 --- a/tests/fixtures/cassettes/sms_send_long_message.yaml +++ /dev/null @@ -1,70 +0,0 @@ -interactions: -- request: - body: '{"from": "+1234567890", "to": ["+1234567890"], "text": "This is a long - SMS message. This is a long SMS message. This is a long SMS message. This is - a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. This is a long SMS message. - This is a long SMS message. This is a long SMS message. "}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1458' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/sms - response: - body: - string: '{"message":"The from field contains an invalid number. (and 2 more - errors)","errors":{"from":["The from field contains an invalid number."],"to":["Daily - quota for this number exceeded."],"to.0":["The to.0 field contains an invalid - number."]}}' - headers: - CF-RAY: - - a16ed1fad98cf339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:18 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_send_multiple_recipients.yaml b/tests/fixtures/cassettes/sms_send_multiple_recipients.yaml deleted file mode 100644 index 62d7740..0000000 --- a/tests/fixtures/cassettes/sms_send_multiple_recipients.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '{"from": "+1234567890", "to": ["+1234567890"], "text": "Message for multiple - recipients"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '89' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/sms - response: - body: - string: '{"message":"The from field contains an invalid number. (and 2 more - errors)","errors":{"from":["The from field contains an invalid number."],"to":["Daily - quota for this number exceeded."],"to.0":["The to.0 field contains an invalid - number."]}}' - headers: - CF-RAY: - - a16ed1fb9963076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:18 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '55' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_send_with_personalization.yaml b/tests/fixtures/cassettes/sms_send_with_personalization.yaml deleted file mode 100644 index 5d0cba7..0000000 --- a/tests/fixtures/cassettes/sms_send_with_personalization.yaml +++ /dev/null @@ -1,55 +0,0 @@ -interactions: -- request: - body: '{"from": "+1234567890", "to": ["+1234567890"], "text": "Hello {{name}}, - this is a personalized message!", "personalization": [{"phone_number": "+1234567890", - "data": {"name": "John"}}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '185' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/sms - response: - body: - string: '{"message":"The from field contains an invalid number. (and 2 more - errors)","errors":{"from":["The from field contains an invalid number."],"to":["Daily - quota for this number exceeded."],"to.0":["The to.0 field contains an invalid - number."]}}' - headers: - CF-RAY: - - a16ed1f9db1b0380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:18 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '73' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_webhooks_create_invalid_sms_number.yaml b/tests/fixtures/cassettes/sms_webhooks_create_invalid_sms_number.yaml deleted file mode 100644 index f19366a..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_create_invalid_sms_number.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '{"url": "https://example.com/webhook", "name": "Test SMS Webhook", "events": - ["sms.sent", "sms.delivered"], "sms_number_id": "test-sms-number-id", "enabled": - true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '163' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/sms-webhooks - response: - body: - string: '{"message":"The endpoint returned HTTP 405. (and 1 more error)","errors":{"url":["The - endpoint returned HTTP 405."],"sms_number_id":["The sms number id field is - required. #MS42209"]}}' - headers: - CF-RAY: - - a16ed1feaf34c687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:19 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '90' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_webhooks_create_with_all_events.yaml b/tests/fixtures/cassettes/sms_webhooks_create_with_all_events.yaml deleted file mode 100644 index a6624e6..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_create_with_all_events.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: '{"url": "https://example.com/all-events", "name": "All Events Webhook", - "events": ["sms.sent", "sms.delivered", "sms.failed"], "sms_number_id": "test-sms-number-id", - "enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '182' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/sms-webhooks - response: - body: - string: '{"message":"The endpoint returned HTTP 405. (and 1 more error)","errors":{"url":["The - endpoint returned HTTP 405."],"sms_number_id":["The sms number id field is - required. #MS42209"]}}' - headers: - CF-RAY: - - a16ed1ffbde9aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:19 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '108' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_webhooks_delete_not_found.yaml b/tests/fixtures/cassettes/sms_webhooks_delete_not_found.yaml deleted file mode 100644 index 97edcb7..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/sms-webhooks/test-sms-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed202587bfa43-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:19 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '47' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_webhooks_get_not_found.yaml b/tests/fixtures/cassettes/sms_webhooks_get_not_found.yaml deleted file mode 100644 index e208151..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-webhooks/test-sms-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed1fdec0e1f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:19 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_webhooks_list_basic.yaml b/tests/fixtures/cassettes/sms_webhooks_list_basic.yaml deleted file mode 100644 index 6231603..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_list_basic.yaml +++ /dev/null @@ -1,49 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-webhooks?sms_number_id=test-sms-number-id - response: - body: - string: '{"message":"The sms number id field is required. #MS42209","errors":{"sms_number_id":["The - sms number id field is required. #MS42209"]}}' - headers: - CF-RAY: - - a16ed1fc78bd1b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:18 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_webhooks_list_with_invalid_sms_number.yaml b/tests/fixtures/cassettes/sms_webhooks_list_with_invalid_sms_number.yaml deleted file mode 100644 index d1d14ff..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_list_with_invalid_sms_number.yaml +++ /dev/null @@ -1,49 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/sms-webhooks?sms_number_id=invalid-sms-number-id - response: - body: - string: '{"message":"The sms number id field is required. #MS42209","errors":{"sms_number_id":["The - sms number id field is required. #MS42209"]}}' - headers: - CF-RAY: - - a16ed1fd2ebff339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:18 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/sms_webhooks_update_disable.yaml b/tests/fixtures/cassettes/sms_webhooks_update_disable.yaml deleted file mode 100644 index 51b37db..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_update_disable.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"enabled": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '18' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/sms-webhooks/test-sms-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2018cb6126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:19 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '49' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml b/tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml deleted file mode 100644 index fe4c644..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Updated SMS Webhook", "enabled": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '49' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/sms-webhooks/test-sms-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed200d871e291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:19 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml b/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml deleted file mode 100644 index 1527a53..0000000 --- a/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 - response: - body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 - or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' - headers: - CF-RAY: - - a16ed2089eb3e297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:20 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_builder_create_invalid_domain.yaml b/tests/fixtures/cassettes/smtp_users_builder_create_invalid_domain.yaml deleted file mode 100644 index e16f062..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_create_invalid_domain.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Test User", "enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '38' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/domains/invalid-domain-id/smtp-users - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed20c6dd2e294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:21 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml b/tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml deleted file mode 100644 index a59b96c..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed20ddf4d562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:21 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_builder_get_not_found.yaml b/tests/fixtures/cassettes/smtp_users_builder_get_not_found.yaml deleted file mode 100644 index a04da24..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed20bbc8cc239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:21 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml b/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml deleted file mode 100644 index 2ca11ed..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 - response: - body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 - or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' - headers: - CF-RAY: - - a16ed20a4b81e291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:21 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml b/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml deleted file mode 100644 index 280abe3..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=50 - response: - body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 - or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":50,"to":1}}' - headers: - CF-RAY: - - a16ed20b0879e28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:21 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_builder_update_not_found.yaml b/tests/fixtures/cassettes/smtp_users_builder_update_not_found.yaml deleted file mode 100644 index 345c045..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Updated User", "enabled": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '42' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed20d2b12e297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:21 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml b/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml deleted file mode 100644 index 72ea215..0000000 --- a/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml +++ /dev/null @@ -1,246 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 - response: - body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 - or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' - headers: - CF-RAY: - - a16ed20eaa1955ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:21 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users - response: - body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 - or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":25,"to":1}}' - headers: - CF-RAY: - - a16ed20f5db7bbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:21 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '43' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2102a3f9857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:22 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 404 - message: Not Found -- request: - body: '{"name": "Test User"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '21' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/domains/invalid-domain/smtp-users - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed210dda3126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:22 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '52' - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/another-non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed211a93ce298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:22 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml b/tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml deleted file mode 100644 index 98131df..0000000 --- a/tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Test SMTP User", "enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '43' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/domains/invalid-domain-id/smtp-users - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2062af355ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:20 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '50' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_delete_not_found.yaml b/tests/fixtures/cassettes/smtp_users_delete_not_found.yaml deleted file mode 100644 index 4db51a5..0000000 --- a/tests/fixtures/cassettes/smtp_users_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed207c972e28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:20 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '45' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_empty_result.yaml b/tests/fixtures/cassettes/smtp_users_empty_result.yaml deleted file mode 100644 index bc74779..0000000 --- a/tests/fixtures/cassettes/smtp_users_empty_result.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 - response: - body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 - or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' - headers: - CF-RAY: - - a16ed2096a9b1b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:20 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_get_not_found.yaml b/tests/fixtures/cassettes/smtp_users_get_not_found.yaml deleted file mode 100644 index 6d1e0e0..0000000 --- a/tests/fixtures/cassettes/smtp_users_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2056abce293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:20 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_list_basic.yaml b/tests/fixtures/cassettes/smtp_users_list_basic.yaml deleted file mode 100644 index 1211086..0000000 --- a/tests/fixtures/cassettes/smtp_users_list_basic.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users?limit=10 - response: - body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 - or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":10,"to":1}}' - headers: - CF-RAY: - - a16ed203293f076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:19 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_list_invalid_domain.yaml b/tests/fixtures/cassettes/smtp_users_list_invalid_domain.yaml deleted file mode 100644 index f9a29c6..0000000 --- a/tests/fixtures/cassettes/smtp_users_list_invalid_domain.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/invalid-domain-id/smtp-users?limit=10 - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed204acdba8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:20 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml b/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml deleted file mode 100644 index 3828a74..0000000 --- a/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users - response: - body: - string: '{"data":[{"id":"3yxj6ljykk0ldo2r","name":"SMTP User Name","username":"MS_7Pzmoj@igor.fail","password":"***FILTERED***","enabled":true,"accessed_at":null,"server":"smtp.mailersend.net","port":"587 - or 2525","domain":"65qngkdovk8lwr12"}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/domains\/65qngkdovk8lwr12\/smtp-users","per_page":25,"to":1}}' - headers: - CF-RAY: - - a16ed203e8b8e290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:20 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/smtp_users_update_not_found.yaml b/tests/fixtures/cassettes/smtp_users_update_not_found.yaml deleted file mode 100644 index ab7aa89..0000000 --- a/tests/fixtures/cassettes/smtp_users_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Updated SMTP User", "enabled": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '47' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed206fd1355ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:20 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '47' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/templates_api_response_structure.yaml b/tests/fixtures/cassettes/templates_api_response_structure.yaml deleted file mode 100644 index f36c225..0000000 --- a/tests/fixtures/cassettes/templates_api_response_structure.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/templates?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":6}}' - headers: - CF-RAY: - - a16ed21a5958dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:23 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '213' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/templates_delete.yaml b/tests/fixtures/cassettes/templates_delete.yaml deleted file mode 100644 index f529630..0000000 --- a/tests/fixtures/cassettes/templates_delete.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/templates/test-template-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed219ac8bc687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:23 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/templates_empty_result.yaml b/tests/fixtures/cassettes/templates_empty_result.yaml deleted file mode 100644 index 52e223e..0000000 --- a/tests/fixtures/cassettes/templates_empty_result.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/templates?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":6}}' - headers: - CF-RAY: - - a16ed21c28cbe298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:24 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '246' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/templates_get_single.yaml b/tests/fixtures/cassettes/templates_get_single.yaml deleted file mode 100644 index 1b9811d..0000000 --- a/tests/fixtures/cassettes/templates_get_single.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/templates/test-template-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2190e50e293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:23 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/templates_list_basic.yaml b/tests/fixtures/cassettes/templates_list_basic.yaml deleted file mode 100644 index 25cb248..0000000 --- a/tests/fixtures/cassettes/templates_list_basic.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/templates?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":6}}' - headers: - CF-RAY: - - a16ed21278170380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:22 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '249' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/templates_list_no_params.yaml b/tests/fixtures/cassettes/templates_list_no_params.yaml deleted file mode 100644 index 604c540..0000000 --- a/tests/fixtures/cassettes/templates_list_no_params.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/templates?page=1&limit=25 - response: - body: - string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":25,"to":6}}' - headers: - CF-RAY: - - a16ed2148a19aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:22 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '230' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/templates_list_with_domain_filter.yaml b/tests/fixtures/cassettes/templates_list_with_domain_filter.yaml deleted file mode 100644 index bfaeca5..0000000 --- a/tests/fixtures/cassettes/templates_list_with_domain_filter.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/templates?domain_id=65qngkdovk8lwr12&page=1&limit=10 - response: - body: - string: '{"data":[],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":null,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":null}}' - headers: - CF-RAY: - - a16ed2184d019857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:23 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/templates_list_with_pagination.yaml b/tests/fixtures/cassettes/templates_list_with_pagination.yaml deleted file mode 100644 index 38a7b72..0000000 --- a/tests/fixtures/cassettes/templates_list_with_pagination.yaml +++ /dev/null @@ -1,51 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/templates?page=1&limit=10 - response: - body: - string: '{"data":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_jpzkmgq06pv4059v.png","variables":{"variables":[],"personalization":[]},"created_at":"2026-03-03T13:30:34.000000Z","updated_at":"2026-03-03T13:30:34.000000Z","category":null,"categories":[],"translations":[]},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_neqvygmmmkjg0p7w.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2024-10-29T05:19:09.000000Z","updated_at":"2025-03-27T11:49:08.000000Z","category":null,"categories":[],"translations":[]},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_k68zxl265yegj905.png","variables":{"variables":[],"personalization":{"products":[{"url":"","image":"","price":"","title":"","priceOld":"","description":""}]}},"created_at":"2026-04-22T09:24:16.000000Z","updated_at":"2026-07-01T07:06:07.000000Z","category":null,"categories":[],"translations":[]},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_0r83ql3mwxmgzw1j.png","variables":{"variables":[],"personalization":{"account_name":""}},"created_at":"2025-03-27T11:49:37.000000Z","updated_at":"2025-05-15T07:45:40.000000Z","category":null,"categories":[],"translations":[]},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"html","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_z3m5jgrk1wxldpyo.png","variables":{"variables":[],"personalization":[]},"created_at":"2024-11-04T13:05:39.000000Z","updated_at":"2024-11-04T13:06:04.000000Z","category":null,"categories":[],"translations":[]},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","image_path":"https:\/\/storage.googleapis.com\/mailersend-screenshots\/screenshots\/template_351ndgwkr8xgzqx8.png","variables":{"variables":[],"personalization":{"name":"","account_name":""}},"created_at":"2025-04-04T12:33:42.000000Z","updated_at":"2026-01-26T12:03:25.000000Z","category":null,"categories":[],"translations":[]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/templates?page=1","last":null,"prev":null,"next":null},"meta":{"current_page":1,"current_page_url":"https:\/\/api.mailersend.com\/v1\/templates?page=1","from":1,"path":"https:\/\/api.mailersend.com\/v1\/templates","per_page":10,"to":6}}' - headers: - CF-RAY: - - a16ed2167c0be28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:23 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '210' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_api_response_structure.yaml b/tests/fixtures/cassettes/tokens_api_response_structure.yaml deleted file mode 100644 index 8c78966..0000000 --- a/tests/fixtures/cassettes/tokens_api_response_structure.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token?limit=10 - response: - body: - string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender - Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full - access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity - test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next - »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":35}}' - headers: - CF-RAY: - - a16ed224da0adfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:25 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_builder_create_basic.yaml b/tests/fixtures/cassettes/tokens_builder_create_basic.yaml deleted file mode 100644 index 96cd803..0000000 --- a/tests/fixtures/cassettes/tokens_builder_create_basic.yaml +++ /dev/null @@ -1,55 +0,0 @@ -interactions: -- request: - body: '{"name": "Test Token", "domain_id": "65qngkdovk8lwr12", "scopes": ["email_full"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '81' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/token - response: - body: - string: '{"data":{"id":"4ce0bb437a8306fb4324eb1dd810a7426e3bf1ab8ed9939afed0caf7798c4e787c49776cd3abfc8c","accessToken":"***FILTERED***","name":"Test - Token","created_at":"2026-07-06T13:05:26.000000Z","scopes":["email_full"],"has_full":false,"has_only_sending":false,"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"mx":true,"tracking":false,"is_verified":true,"is_dns_active":true,"is_trial_domain":false,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":false,"show_dkim_info":false,"is_being_verified":true,"is_custom_links_available":false},"preview":"***FILTERED***","expires_at":null}}' - headers: - CF-RAY: - - a16ed228dd2de296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:26 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '400' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_builder_delete_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_delete_not_found.yaml deleted file mode 100644 index f066509..0000000 --- a/tests/fixtures/cassettes/tokens_builder_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/token/test-token-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed22d3ebdf339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:26 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/tokens_builder_get_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_get_not_found.yaml deleted file mode 100644 index 1644848..0000000 --- a/tests/fixtures/cassettes/tokens_builder_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token/test-token-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2281bb1e297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:25 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/tokens_builder_list_basic.yaml b/tests/fixtures/cassettes/tokens_builder_list_basic.yaml deleted file mode 100644 index 38a2482..0000000 --- a/tests/fixtures/cassettes/tokens_builder_list_basic.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token?limit=10 - response: - body: - string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender - Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full - access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity - test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next - »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":35}}' - headers: - CF-RAY: - - a16ed22668aac687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:25 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '48' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_builder_list_with_custom_limit.yaml b/tests/fixtures/cassettes/tokens_builder_list_with_custom_limit.yaml deleted file mode 100644 index d6d1dbc..0000000 --- a/tests/fixtures/cassettes/tokens_builder_list_with_custom_limit.yaml +++ /dev/null @@ -1,86 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token?limit=50 - response: - body: - string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender - Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full - access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity - test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"76527c5c823a91eb565857e0efe46f46dd4a2b00ab48c661ca7fd55c2bdbafbab877fda7f4441860","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:24.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"ad662d4e160d123d1b61d6d2c65831e16bbc78a32e0e8af120ecaff7c4d9102ae134e04df68dfc08","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:25.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7808f5082b2905269b53f0f78ce56cfd5c035096d00bc759e2cc0df0835c7f0c81acb77da8728d7a","name":"SDK - Test","status":"unpause","created_at":"2026-07-06T12:45:27.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full"],"domain":null},{"id":"b2482d15980ef4c836b7e0acd149149a982bec809507ca3443c26303395930088b208b319865a7d8","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:52:20.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ec7e8b5ca9c9d7f8c32bc7f7a70c8a9032a0db8ea9c885f7169c8fd72e7ffd8bdf25eb9c9475d3c","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:52:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"872b2dd2d39fb21ce56fd6b6b65f1d196f95e380d9313cfe0dffd9a68bc560a3ce8332583f639c65","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:53:31.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"a104908e2e6f18ad5cfdf009793d42b352760f15f353432c760ccee9fa48ee62f6d2c464b23aef7f","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:52:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0e27905c3400076ca3912f30f0fe9090e8ab165b1364a84b3783402887211830b08dd4bceaba160e","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:53:33.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"19cbf95976a478eed26c81dd559c7e6ffefeeefdc3b9873a11a6d978dbc29fa1b97a29928dc2da2e","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:53:34.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5ee4bc671311b2aeeced1e9b30588275d751c077da489b34db3e11687c2c342006da119ad6093c77","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:55:52.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d461638a63aad0a35b78eb404006b88478ce2fecca87a7951a153a94c6dd654922065c85c4bfecba","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:55:53.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5a549b40d7f605a4e76a16eaaabea65ddc4f69981929830b3c20c5afa18dff1824b45d897b69a3e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:55:54.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"1bba34fd1894bffa92f81f4057de2de43ee476d827d74c4e873ab87bb49330862579a4aa3b0016cb","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:57:45.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"8a19924345f967642ed1d9caf68cc4d2f2735ced0fb9b652bc7815d712dc367e2848de5618e81d11","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:57:47.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"8273df72a77678526e005d3008606eb17590728b641c9c0d265effaeb3bbb9c1149df43323bb4389","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:57:48.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"95696dc3b22f4a9f5b8d87bf3a8608b5601912fc1eeaf2fd80c996d777cdbd7126dde2be38afb4d7","name":"Test - Token","status":"unpause","created_at":"2026-07-06T13:02:47.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"07d5cf1663c6cd234d5526d05078e479f7ba9b0ee507a0c3c1d8ee01b2e0450d19a26520afaa9125","name":"Test - Token","status":"unpause","created_at":"2026-07-06T13:02:48.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2c44a98f9cbcf4dbc93b7b55f548603f79f95833fae335e891d155767a5e94b37fe5e6beee91ed77","name":"Test - Token","status":"unpause","created_at":"2026-07-06T13:02:49.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d232900e753b3e31af7a2b7e24c061b366aa570ef24a4ee7fd160a9c59a631f29e93b381c6a62e10","name":"Test - Token","status":"unpause","created_at":"2026-07-06T13:05:24.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"14cdaaf75fd5e5a7d9579d5af5712ec866701ac967c1a3331c88a7c96297c3427a4ac83bf0b18f75","name":"Bob","status":"unpause","created_at":"2026-01-30T13:41:01.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":50,"to":35,"total":35}}' - headers: - CF-RAY: - - a16ed227297d3267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:25 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '75' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_builder_update_name_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_update_name_not_found.yaml deleted file mode 100644 index fcad765..0000000 --- a/tests/fixtures/cassettes/tokens_builder_update_name_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Updated Name"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '24' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/token/test-token-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed22c8d53f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:26 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '35' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/tokens_builder_update_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_update_not_found.yaml deleted file mode 100644 index 40d3c09..0000000 --- a/tests/fixtures/cassettes/tokens_builder_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"status": "pause"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/token/test-token-id/settings - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed22bdfbcaeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:26 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '40' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml b/tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml deleted file mode 100644 index 7ceb262..0000000 --- a/tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml +++ /dev/null @@ -1,286 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token?limit=10 - response: - body: - string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender - Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full - access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity - test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next - »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":36}}' - headers: - CF-RAY: - - a16ed22de81ff339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:26 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token - response: - body: - string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender - Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full - access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity - test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"76527c5c823a91eb565857e0efe46f46dd4a2b00ab48c661ca7fd55c2bdbafbab877fda7f4441860","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:24.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"ad662d4e160d123d1b61d6d2c65831e16bbc78a32e0e8af120ecaff7c4d9102ae134e04df68dfc08","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:25.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7808f5082b2905269b53f0f78ce56cfd5c035096d00bc759e2cc0df0835c7f0c81acb77da8728d7a","name":"SDK - Test","status":"unpause","created_at":"2026-07-06T12:45:27.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full"],"domain":null},{"id":"b2482d15980ef4c836b7e0acd149149a982bec809507ca3443c26303395930088b208b319865a7d8","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:52:20.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ec7e8b5ca9c9d7f8c32bc7f7a70c8a9032a0db8ea9c885f7169c8fd72e7ffd8bdf25eb9c9475d3c","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:52:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"872b2dd2d39fb21ce56fd6b6b65f1d196f95e380d9313cfe0dffd9a68bc560a3ce8332583f639c65","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:53:31.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"a104908e2e6f18ad5cfdf009793d42b352760f15f353432c760ccee9fa48ee62f6d2c464b23aef7f","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:52:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0e27905c3400076ca3912f30f0fe9090e8ab165b1364a84b3783402887211830b08dd4bceaba160e","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:53:33.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"19cbf95976a478eed26c81dd559c7e6ffefeeefdc3b9873a11a6d978dbc29fa1b97a29928dc2da2e","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:53:34.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5ee4bc671311b2aeeced1e9b30588275d751c077da489b34db3e11687c2c342006da119ad6093c77","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:55:52.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?page=1","last":"https:\/\/api.mailersend.com\/v1\/token?page=2","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?page=2"},"meta":{"current_page":1,"from":1,"last_page":2,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?page=2","label":"Next - »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":25,"to":25,"total":36}}' - headers: - CF-RAY: - - a16ed22eacd2e297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:26 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '62' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed22f78bf0380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:27 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 404 - message: Not Found -- request: - body: '{"name": "Test Token", "domain_id": "65qngkdovk8lwr12", "scopes": ["email_full"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '81' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/token - response: - body: - string: '{"data":{"id":"26905bfe0a6dd08bc9fc926f19f4227147aa1091b6815ee7dde1517de608eac6578eedff70d387d7","accessToken":"***FILTERED***","name":"Test - Token","created_at":"2026-07-06T13:05:27.000000Z","scopes":["email_full"],"has_full":false,"has_only_sending":false,"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"mx":true,"tracking":false,"is_verified":true,"is_dns_active":true,"is_trial_domain":false,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":false,"show_dkim_info":false,"is_being_verified":true,"is_custom_links_available":false},"preview":"***FILTERED***","expires_at":null}}' - headers: - CF-RAY: - - a16ed2302c908e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:27 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '103' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token/another-non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2314c093267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:27 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/tokens_create_basic.yaml b/tests/fixtures/cassettes/tokens_create_basic.yaml deleted file mode 100644 index 155ea32..0000000 --- a/tests/fixtures/cassettes/tokens_create_basic.yaml +++ /dev/null @@ -1,56 +0,0 @@ -interactions: -- request: - body: '{"name": "Test Token", "domain_id": "65qngkdovk8lwr12", "scopes": ["email_full", - "domains_read"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '97' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/token - response: - body: - string: '{"data":{"id":"d232900e753b3e31af7a2b7e24c061b366aa570ef24a4ee7fd160a9c59a631f29e93b381c6a62e10","accessToken":"***FILTERED***","name":"Test - Token","created_at":"2026-07-06T13:05:24.000000Z","scopes":["email_full","domains_read"],"has_full":false,"has_only_sending":false,"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"mx":true,"tracking":false,"is_verified":true,"is_dns_active":true,"is_trial_domain":false,"domain_settings":{"send_paused":true,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"can":{"manage":true},"totals":[],"is_dkim_txt":false,"show_dkim_info":false,"is_being_verified":true,"is_custom_links_available":false},"preview":"***FILTERED***","expires_at":null}}' - headers: - CF-RAY: - - a16ed2218a6a9857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:24 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '96' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_delete_not_found.yaml b/tests/fixtures/cassettes/tokens_delete_not_found.yaml deleted file mode 100644 index c250902..0000000 --- a/tests/fixtures/cassettes/tokens_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/token/test-token-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2241ea2076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:25 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/tokens_empty_result.yaml b/tests/fixtures/cassettes/tokens_empty_result.yaml deleted file mode 100644 index fdf9567..0000000 --- a/tests/fixtures/cassettes/tokens_empty_result.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token?limit=10 - response: - body: - string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender - Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full - access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity - test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next - »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":35}}' - headers: - CF-RAY: - - a16ed225aac6126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:25 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '43' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_get_not_found.yaml b/tests/fixtures/cassettes/tokens_get_not_found.yaml deleted file mode 100644 index b0376ab..0000000 --- a/tests/fixtures/cassettes/tokens_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token/test-token-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed220ca92d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:24 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '35' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/tokens_list_basic.yaml b/tests/fixtures/cassettes/tokens_list_basic.yaml deleted file mode 100644 index d0ef8a3..0000000 --- a/tests/fixtures/cassettes/tokens_list_basic.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token?limit=10 - response: - body: - string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender - Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full - access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity - test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next - »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":34}}' - headers: - CF-RAY: - - a16ed21e382f96e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:24 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '44' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_list_different_limit.yaml b/tests/fixtures/cassettes/tokens_list_different_limit.yaml deleted file mode 100644 index c837e0c..0000000 --- a/tests/fixtures/cassettes/tokens_list_different_limit.yaml +++ /dev/null @@ -1,85 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token?limit=50 - response: - body: - string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender - Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full - access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity - test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7d08eef84314952f272fa5a4d3bcf08572f3baff809d5e2c288431433c2c40bd087f45107d351ca9","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2fc12954461160db570aa14c05d8308a9eb134863d2edba6a0e1b4dca5a37719e445e9f54e5feca8","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:28.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ca92ac0af3cf0b350762ba4ac8cb890eedfd43bb90973acf26f2015ee9dec95f7a291d5dd0cb9e6","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:30.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"13f03ba70c21276276b6c34d02e69e1450beef71e28d272dc4d69456f83fbe4fa26561dd9d7e62f0","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:41:31.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"3f475e85bdf6a57b185945dda0b4129d4a19d495077c0788f8c1c2e7e5249158b62ec4a0a9a1e3e7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:23.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"76527c5c823a91eb565857e0efe46f46dd4a2b00ab48c661ca7fd55c2bdbafbab877fda7f4441860","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:24.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"ad662d4e160d123d1b61d6d2c65831e16bbc78a32e0e8af120ecaff7c4d9102ae134e04df68dfc08","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:47:25.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"7808f5082b2905269b53f0f78ce56cfd5c035096d00bc759e2cc0df0835c7f0c81acb77da8728d7a","name":"SDK - Test","status":"unpause","created_at":"2026-07-06T12:45:27.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full"],"domain":null},{"id":"b2482d15980ef4c836b7e0acd149149a982bec809507ca3443c26303395930088b208b319865a7d8","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:52:20.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0ec7e8b5ca9c9d7f8c32bc7f7a70c8a9032a0db8ea9c885f7169c8fd72e7ffd8bdf25eb9c9475d3c","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:52:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"872b2dd2d39fb21ce56fd6b6b65f1d196f95e380d9313cfe0dffd9a68bc560a3ce8332583f639c65","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:53:31.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"a104908e2e6f18ad5cfdf009793d42b352760f15f353432c760ccee9fa48ee62f6d2c464b23aef7f","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:52:23.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"0e27905c3400076ca3912f30f0fe9090e8ab165b1364a84b3783402887211830b08dd4bceaba160e","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:53:33.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"19cbf95976a478eed26c81dd559c7e6ffefeeefdc3b9873a11a6d978dbc29fa1b97a29928dc2da2e","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:53:34.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5ee4bc671311b2aeeced1e9b30588275d751c077da489b34db3e11687c2c342006da119ad6093c77","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:55:52.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d461638a63aad0a35b78eb404006b88478ce2fecca87a7951a153a94c6dd654922065c85c4bfecba","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:55:53.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"5a549b40d7f605a4e76a16eaaabea65ddc4f69981929830b3c20c5afa18dff1824b45d897b69a3e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:55:54.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"1bba34fd1894bffa92f81f4057de2de43ee476d827d74c4e873ab87bb49330862579a4aa3b0016cb","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:57:45.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"8a19924345f967642ed1d9caf68cc4d2f2735ced0fb9b652bc7815d712dc367e2848de5618e81d11","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:57:47.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"8273df72a77678526e005d3008606eb17590728b641c9c0d265effaeb3bbb9c1149df43323bb4389","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:57:48.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"95696dc3b22f4a9f5b8d87bf3a8608b5601912fc1eeaf2fd80c996d777cdbd7126dde2be38afb4d7","name":"Test - Token","status":"unpause","created_at":"2026-07-06T13:02:47.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"07d5cf1663c6cd234d5526d05078e479f7ba9b0ee507a0c3c1d8ee01b2e0450d19a26520afaa9125","name":"Test - Token","status":"unpause","created_at":"2026-07-06T13:02:48.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"2c44a98f9cbcf4dbc93b7b55f548603f79f95833fae335e891d155767a5e94b37fe5e6beee91ed77","name":"Test - Token","status":"unpause","created_at":"2026-07-06T13:02:49.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"14cdaaf75fd5e5a7d9579d5af5712ec866701ac967c1a3331c88a7c96297c3427a4ac83bf0b18f75","name":"Bob","status":"unpause","created_at":"2026-01-30T13:41:01.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=50&page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":50,"to":34,"total":34}}' - headers: - CF-RAY: - - a16ed21fc9870a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:24 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '72' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_list_with_pagination.yaml b/tests/fixtures/cassettes/tokens_list_with_pagination.yaml deleted file mode 100644 index 998a871..0000000 --- a/tests/fixtures/cassettes/tokens_list_with_pagination.yaml +++ /dev/null @@ -1,62 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/token?limit=10 - response: - body: - string: '{"data":[{"id":"825056c70c29119c9addc129af51b34999c3259bbc0b33b29f05f2498f99274852444d2053dd1b2d","name":"Sender - Identity Testing","status":"unpause","created_at":"2026-02-25T12:49:41.000000Z","scopes":["sender_identity_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"4d5e8256f0da8467462128f1f640e636da571ca656611113ecd84be416c513e948e2a13c2a3aa2de","name":"Full - access","status":"unpause","created_at":"2026-02-25T12:53:46.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":null},{"id":"38b220526fb2c0e91ccbc30b0d4e094bf873dd058ceef18dfcb8058ce6a3c596b1cb741a956849bb","name":"Identity - test 2","status":"unpause","created_at":"2026-02-25T13:04:36.000000Z","scopes":["sender_identity_read"],"domain":{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}},{"id":"d4cd83261ff508f98869020e50a620563942e38e1ce7dcc268789ea79588d4f30938aefed9abd20c","name":"Monitoring - BlackBox Exporter","status":"unpause","created_at":"2022-02-14T16:13:07.000000Z","scopes":["email_full","domains_full","activity_full","analytics_full","tokens_full","webhooks_full","templates_full","suppressions_full","sms_full","email_verification_full","recipients_full"],"domain":null},{"id":"b8d6dba0fe12b9bfdf402a7437dd5c80e3e9530534931edcf82a2d0d2423f931f544fc2845f84653","name":"SDK - API Token","status":"unpause","created_at":"2025-06-27T08:18:52.000000Z","scopes":["email_full","tokens_full","webhooks_full","templates_full","inbounds_full","domains_full","activity_full","analytics_full","suppressions_full","sms_full","email_verification_full","recipients_full","sender_identity_full","smtp_users_full","users_full","dmarc_monitoring_full","blocklist_monitoring_full","whatsapp_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"73653e87dcb10a4da3b1b71421493eaa0ac32595b1c84bf52cd3a103e4e3c9a3d97a139e82aaca48","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:05.000000Z","scopes":["email_full","domains_read"],"domain":null},{"id":"7b30402e388f3bf3207e02c30fd28f6731ed41c2884d6d4aba49cedfae41206ee0d80a8b50199b33","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:07.000000Z","scopes":["email_full"],"domain":null},{"id":"a041b259ee175e0bec13d140d5057713bc2e2c1bef06c35d41018e29cc4b5fd10239464b1073c6e5","name":"Test - Token","status":"unpause","created_at":"2026-07-06T12:47:08.000000Z","scopes":["email_full"],"domain":null},{"id":"977ac54690b9c84121d9871a3240b0c4aaa783dd8d61e2eb3a1c446e5d8c85d6b321520eb0c9cdd7","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:21.000000Z","scopes":["email_full","domains_read"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}},{"id":"d2935faa05d1c78e71b49e2cddcc37da1d3c4acfa9e8eac8f7fbb92a3c40ba1f02fb36e096a5e674","name":"Test - Token","status":"unpause","created_at":"2025-08-01T10:23:22.000000Z","scopes":["email_full"],"domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","last":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","prev":null,"next":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2"},"meta":{"current_page":1,"from":1,"last_page":4,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=1","label":"1","page":1,"active":true},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"2","page":2,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=3","label":"3","page":3,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=4","label":"4","page":4,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/token?limit=10&page=2","label":"Next - »","page":2,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/token","per_page":10,"to":10,"total":34}}' - headers: - CF-RAY: - - a16ed21f0fc51f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:24 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '43' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/tokens_update_name_not_found.yaml b/tests/fixtures/cassettes/tokens_update_name_not_found.yaml deleted file mode 100644 index fa3ce65..0000000 --- a/tests/fixtures/cassettes/tokens_update_name_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Updated Token Name"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '30' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/token/test-token-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed223590ba8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:25 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '42' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/tokens_update_not_found.yaml b/tests/fixtures/cassettes/tokens_update_not_found.yaml deleted file mode 100644 index 7ba0525..0000000 --- a/tests/fixtures/cassettes/tokens_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"status": "pause"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '19' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/token/test-token-id/settings - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed2229e60f969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:24 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/users_api_response_structure.yaml b/tests/fixtures/cassettes/users_api_response_structure.yaml deleted file mode 100644 index 5b4b9e4..0000000 --- a/tests/fixtures/cassettes/users_api_response_structure.yaml +++ /dev/null @@ -1,61 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/users?limit=10 - response: - body: - string: '{"data":[{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2026-06-26T12:35:13.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2026-05-30T13:12:20.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2026-06-12T09:08:17.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":true,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2026-07-06T12:44:34.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2026-06-25T11:40:21.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dleyw374kj50","avatar":"https:\/\/www.gravatar.com\/avatar\/c44d3a63d59a4e4aaf084e2355bfa13f?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"yusuf@mailerlite.com","last_name":"Celebi","name":"Yusuf - Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2026-04-12T07:35:41.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2026-06-25T08:21:44.000000Z","role":"Admin","permissions":[],"domains":[{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"},{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/users?page=1","last":"https:\/\/api.mailersend.com\/v1\/users?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/users?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/users","per_page":10,"to":8,"total":8}}' - headers: - CF-RAY: - - a16ed23a8e67a8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:28 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '124' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/users_delete.yaml b/tests/fixtures/cassettes/users_delete.yaml deleted file mode 100644 index e81cf3d..0000000 --- a/tests/fixtures/cassettes/users_delete.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/users/test-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed236ea76e297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:28 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '33' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/users_empty_result.yaml b/tests/fixtures/cassettes/users_empty_result.yaml deleted file mode 100644 index 4eb1feb..0000000 --- a/tests/fixtures/cassettes/users_empty_result.yaml +++ /dev/null @@ -1,61 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/users?limit=10 - response: - body: - string: '{"data":[{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2026-06-26T12:35:13.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2026-05-30T13:12:20.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2026-06-12T09:08:17.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":true,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2026-07-06T12:44:34.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2026-06-25T11:40:21.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dleyw374kj50","avatar":"https:\/\/www.gravatar.com\/avatar\/c44d3a63d59a4e4aaf084e2355bfa13f?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"yusuf@mailerlite.com","last_name":"Celebi","name":"Yusuf - Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2026-04-12T07:35:41.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2026-06-25T08:21:44.000000Z","role":"Admin","permissions":[],"domains":[{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"},{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/users?page=1","last":"https:\/\/api.mailersend.com\/v1\/users?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/users?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/users","per_page":10,"to":8,"total":8}}' - headers: - CF-RAY: - - a16ed23bccb9e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:29 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '108' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/users_get_single.yaml b/tests/fixtures/cassettes/users_get_single.yaml deleted file mode 100644 index 2d40084..0000000 --- a/tests/fixtures/cassettes/users_get_single.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/users/test-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ed234783fa8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:27 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '38' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/users_invite.yaml b/tests/fixtures/cassettes/users_invite.yaml deleted file mode 100644 index 4ce1716..0000000 --- a/tests/fixtures/cassettes/users_invite.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: '{"email": "test-user@example.com", "role": "member", "permissions": ["email_send"], - "templates": [], "domains": [], "requires_periodic_password_change": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '159' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/users - response: - body: - string: '{"message":"The selected role is invalid. (and 2 more errors)","errors":{"role":["The - selected role is invalid."],"templates":["Templates require a read own templates - permission. #MS42224"],"permissions.0":["The selected permissions.0 is invalid."]}}' - headers: - CF-RAY: - - a16ed2353df23267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:27 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '50' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/users_list_basic.yaml b/tests/fixtures/cassettes/users_list_basic.yaml deleted file mode 100644 index 177c88d..0000000 --- a/tests/fixtures/cassettes/users_list_basic.yaml +++ /dev/null @@ -1,61 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/users?limit=10 - response: - body: - string: '{"data":[{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2026-06-26T12:35:13.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2026-05-30T13:12:20.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2026-06-12T09:08:17.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":true,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2026-07-06T12:44:34.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2026-06-25T11:40:21.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dleyw374kj50","avatar":"https:\/\/www.gravatar.com\/avatar\/c44d3a63d59a4e4aaf084e2355bfa13f?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"yusuf@mailerlite.com","last_name":"Celebi","name":"Yusuf - Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2026-04-12T07:35:41.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2026-06-25T08:21:44.000000Z","role":"Admin","permissions":[],"domains":[{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"},{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/users?page=1","last":"https:\/\/api.mailersend.com\/v1\/users?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/users?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/users","per_page":10,"to":8,"total":8}}' - headers: - CF-RAY: - - a16ed2320c9daeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:27 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '112' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/users_list_with_pagination.yaml b/tests/fixtures/cassettes/users_list_with_pagination.yaml deleted file mode 100644 index 895b15f..0000000 --- a/tests/fixtures/cassettes/users_list_with_pagination.yaml +++ /dev/null @@ -1,61 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/users?limit=10 - response: - body: - string: '{"data":[{"id":"oynrw7gymjg2k8e3","avatar":"https:\/\/storage.googleapis.com\/sso-avatars-prod\/avatars\/caFrrQXipgbxkdd6zZF8vijiVwQ4Pphq0Irchjql.jpg","email":"robert@mailerlite.com","last_name":"Gordon","name":"Robert","2fa":true,"created_at":"2020-09-30T12:04:49.000000Z","updated_at":"2026-06-26T12:35:13.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"6vywj2lpnmg7oqzd","avatar":"https:\/\/www.gravatar.com\/avatar\/c73820b36111c4206a6d6e171863578e?d=","email":"nikola@mailerlite.com","last_name":"Milojevi\u0107","name":"Nikola","2fa":true,"created_at":"2020-10-01T15:33:09.000000Z","updated_at":"2026-05-30T13:12:20.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"z86org8rek4ew137","avatar":"https:\/\/www.gravatar.com\/avatar\/d1a4d0a3e07ec27d64aed5c2534045e9?d=https:\/\/dashboard.mailerlite.com\/images\/user-default.png","email":"dino@mailerlite.com","last_name":"User","name":"Dino","2fa":false,"created_at":"2021-04-13T08:22:51.000000Z","updated_at":"2026-06-12T09:08:17.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dlem7514kj50","avatar":null,"email":"sre@remotecompany.com","last_name":"SRE","name":"Monitoring","2fa":false,"created_at":"2022-02-04T13:11:35.000000Z","updated_at":"2023-10-03T07:23:01.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"pxkjn41z5n9lz781","avatar":"https:\/\/storage.googleapis.com\/mailerlite-avatars-prod\/avatar\/avatars\/7Da4L5Z8xnZtQOYupNYN7J0nqbzR5llX66te7W5O.jpg","email":"igor@mailerlite.com","last_name":"Hrcek","name":"Igor","2fa":true,"created_at":"2022-06-15T11:29:45.000000Z","updated_at":"2026-07-06T12:44:34.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"x2p0347mv7k4zdrn","avatar":"http:\/\/www.gravatar.com\/avatar\/525f9bc42472046db81568740061e61a?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"marta.parra@mailerlite.com","last_name":"MailerLite","name":"Marta","2fa":false,"created_at":"2023-12-19T11:09:07.000000Z","updated_at":"2026-06-25T11:40:21.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"3vz9dleyw374kj50","avatar":"https:\/\/www.gravatar.com\/avatar\/c44d3a63d59a4e4aaf084e2355bfa13f?d=https%3A%2F%2Fassets.mlcdn.com%2Fms%2Fimages%2Favatar.png","email":"yusuf@mailerlite.com","last_name":"Celebi","name":"Yusuf - Cemal Celebi","2fa":false,"created_at":"2024-08-09T12:38:07.000000Z","updated_at":"2026-04-12T07:35:41.000000Z","role":"Admin","permissions":[],"domains":[{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"},{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]},{"id":"jpzkmgqmxmvl059v","avatar":null,"email":"roc@mailerlite.com","last_name":"Ribera","name":"Roc","2fa":false,"created_at":"2024-08-19T09:59:53.000000Z","updated_at":"2026-06-25T08:21:44.000000Z","role":"Admin","permissions":[],"domains":[{"id":"65qngkdovk8lwr12","name":"igor.fail","created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:05:00.000000Z"},{"id":"xkjn41mjxp94z781","name":"bob.fail","created_at":"2025-04-01T12:54:11.000000Z","updated_at":"2026-05-01T12:22:30.000000Z"},{"id":"dnvo4dmmq0x45r86","name":"cypress.litehub.io","created_at":"2026-06-05T08:44:00.000000Z","updated_at":"2026-07-06T08:21:10.000000Z"}],"templates":[{"id":"jpzkmgq06pv4059v","name":"Template","description":null,"type":"dd","created_at":"2026-03-03T13:30:34.000000Z"},{"id":"neqvygmmmkjg0p7w","name":"Template","description":null,"type":"dd","created_at":"2024-10-29T05:19:09.000000Z"},{"id":"k68zxl265yegj905","name":"Template","description":null,"type":"dd","created_at":"2026-04-22T09:24:16.000000Z"},{"id":"0r83ql3mwxmgzw1j","name":"Template","description":null,"type":"rt","created_at":"2025-03-27T11:49:37.000000Z"},{"id":"z3m5jgrk1wxldpyo","name":"Template","description":null,"type":"gh","created_at":"2024-11-04T13:05:39.000000Z"},{"id":"351ndgwkr8xgzqx8","name":"SDK - Test Template","description":"DO NOT REMOVE!","type":"rt","created_at":"2025-04-04T12:33:42.000000Z"}]}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/users?page=1","last":"https:\/\/api.mailersend.com\/v1\/users?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/users?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/users","per_page":10,"to":8,"total":8}}' - headers: - CF-RAY: - - a16ed2332c431f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:27 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '126' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/users_update.yaml b/tests/fixtures/cassettes/users_update.yaml deleted file mode 100644 index 9716cfa..0000000 --- a/tests/fixtures/cassettes/users_update.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: '{"role": "member", "permissions": ["email_send"], "templates": [], "domains": - []}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '81' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/users/test-user-id - response: - body: - string: '{"message":"The selected role is invalid. (and 2 more errors)","errors":{"role":["The - selected role is invalid."],"templates":["Templates require a read own templates - permission. #MS42224"],"permissions.0":["The selected permissions.0 is invalid."]}}' - headers: - CF-RAY: - - a16ed2360e4ee28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:05:28 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '54' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_api_response_structure.yaml b/tests/fixtures/cassettes/webhooks_api_response_structure.yaml deleted file mode 100644 index dde8687..0000000 --- a/tests/fixtures/cassettes/webhooks_api_response_structure.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' - headers: - CF-RAY: - - a16ee4758801f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:55 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '40' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_builder_create_basic.yaml b/tests/fixtures/cassettes/webhooks_builder_create_basic.yaml deleted file mode 100644 index 944e593..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_create_basic.yaml +++ /dev/null @@ -1,104 +0,0 @@ -interactions: -- request: - body: '{"url": "https://example.com/webhook-builder", "name": "Test Webhook Builder", - "events": ["activity.sent", "activity.delivered"], "domain_id": "65qngkdovk8lwr12", - "enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '179' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/webhooks - response: - body: - string: "{\n \"message\": \"You cannot create a resource at the moment. Please - wait a while before retrying.\"\n}" - headers: - CF-RAY: - - a16ee4789e6acf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:56 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 429 - message: Too Many Requests -- request: - body: '{"url": "https://example.com/webhook-builder", "name": "Test Webhook Builder", - "events": ["activity.sent", "activity.delivered"], "domain_id": "65qngkdovk8lwr12", - "enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '179' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/webhooks - response: - body: - string: '{"message":"The endpoint returned HTTP 405.","errors":{"url":["The - endpoint returned HTTP 405."]}}' - headers: - CF-RAY: - - a16ee4793bb0a8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:56 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '96' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_builder_delete_not_found.yaml b/tests/fixtures/cassettes/webhooks_builder_delete_not_found.yaml deleted file mode 100644 index 14feeec..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/webhooks/test-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ee47b1cea076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:56 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_builder_get_not_found.yaml b/tests/fixtures/cassettes/webhooks_builder_get_not_found.yaml deleted file mode 100644 index 7d5f6b6..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks/test-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ee477daf41778-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:55 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml b/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml deleted file mode 100644 index 2bb9d41..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' - headers: - CF-RAY: - - a16ee4770c4df339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:55 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '46' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_builder_update_not_found.yaml b/tests/fixtures/cassettes/webhooks_builder_update_not_found.yaml deleted file mode 100644 index 4d00c59..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Updated Name", "enabled": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '42' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/webhooks/test-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ee47a5f43e296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:56 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml b/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml deleted file mode 100644 index 370e814..0000000 --- a/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml +++ /dev/null @@ -1,352 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' - headers: - CF-RAY: - - a16ee47bdae4a8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:56 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' - headers: - CF-RAY: - - a16ee47c8fafe294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:56 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '41' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ee47d4d46e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:56 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 404 - message: Not Found -- request: - body: '{"url": "https://example.com/webhook", "name": "Test Webhook", "events": - ["activity.sent"], "domain_id": "65qngkdovk8lwr12"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '124' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/webhooks - response: - body: - string: "{\n \"message\": \"You cannot create a resource at the moment. Please - wait a while before retrying.\"\n}" - headers: - CF-RAY: - - a16ee47dfcc796e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:56 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 429 - message: Too Many Requests -- request: - body: '{"url": "https://example.com/webhook", "name": "Test Webhook", "events": - ["activity.sent"], "domain_id": "65qngkdovk8lwr12"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '124' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/webhooks - response: - body: - string: "{\n \"message\": \"You cannot create a resource at the moment. Please - wait a while before retrying.\"\n}" - headers: - CF-RAY: - - a16ee47eadba1f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:56 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 429 - message: Too Many Requests -- request: - body: '{"url": "https://example.com/webhook", "name": "Test Webhook", "events": - ["activity.sent"], "domain_id": "65qngkdovk8lwr12"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '124' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/webhooks - response: - body: - string: '{"message":"The endpoint returned HTTP 405.","errors":{"url":["The - endpoint returned HTTP 405."]}}' - headers: - CF-RAY: - - a16ee48329f696e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:57 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '101' - status: - code: 422 - message: Unprocessable Entity -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks/another-non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ee48448920db0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:57 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_create_basic.yaml b/tests/fixtures/cassettes/webhooks_create_basic.yaml deleted file mode 100644 index 733973e..0000000 --- a/tests/fixtures/cassettes/webhooks_create_basic.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: '{"url": "https://i-like-distributed-systems-undermined-by.single-points-of-failure.com/", - "name": "Test Webhook", "events": ["activity.sent", "activity.delivered"], "domain_id": - "65qngkdovk8lwr12", "enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '214' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/webhooks - response: - body: - string: '{"message":"The endpoint returned HTTP 405.","errors":{"url":["The - endpoint returned HTTP 405."]}}' - headers: - CF-RAY: - - a16ee46b9f731b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:54 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '178' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_create_invalid_domain.yaml b/tests/fixtures/cassettes/webhooks_create_invalid_domain.yaml deleted file mode 100644 index 7011d9f..0000000 --- a/tests/fixtures/cassettes/webhooks_create_invalid_domain.yaml +++ /dev/null @@ -1,156 +0,0 @@ -interactions: -- request: - body: '{"url": "https://i-like-distributed-systems-undermined-by.single-points-of-failure.com/", - "name": "Test Webhook", "events": ["activity.sent", "activity.delivered"], "domain_id": - "invalid-domain-id", "enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '215' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/webhooks - response: - body: - string: "{\n \"message\": \"You cannot create a resource at the moment. Please - wait a while before retrying.\"\n}" - headers: - CF-RAY: - - a16ee46d6cef5165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:54 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '32' - status: - code: 429 - message: Too Many Requests -- request: - body: '{"url": "https://i-like-distributed-systems-undermined-by.single-points-of-failure.com/", - "name": "Test Webhook", "events": ["activity.sent", "activity.delivered"], "domain_id": - "invalid-domain-id", "enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '215' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/webhooks - response: - body: - string: "{\n \"message\": \"You cannot create a resource at the moment. Please - wait a while before retrying.\"\n}" - headers: - CF-RAY: - - a16ee46e0967e296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:54 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 429 - message: Too Many Requests -- request: - body: '{"url": "https://i-like-distributed-systems-undermined-by.single-points-of-failure.com/", - "name": "Test Webhook", "events": ["activity.sent", "activity.delivered"], "domain_id": - "invalid-domain-id", "enabled": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '215' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: POST - uri: https://api.mailersend.com/v1/webhooks - response: - body: - string: '{"message":"The endpoint returned HTTP 405. (and 1 more error)","errors":{"url":["The - endpoint returned HTTP 405."],"domain_id":["The domain id field is required. - #MS42209"]}}' - headers: - CF-RAY: - - a16ee4728a60b01d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:55 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '164' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_delete_not_found.yaml b/tests/fixtures/cassettes/webhooks_delete_not_found.yaml deleted file mode 100644 index 4d899df..0000000 --- a/tests/fixtures/cassettes/webhooks_delete_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/webhooks/test-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ee474d9a08e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:55 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_empty_result.yaml b/tests/fixtures/cassettes/webhooks_empty_result.yaml deleted file mode 100644 index 31767cd..0000000 --- a/tests/fixtures/cassettes/webhooks_empty_result.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' - headers: - CF-RAY: - - a16ee4763bb9126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:55 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '39' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_get_not_found.yaml b/tests/fixtures/cassettes/webhooks_get_not_found.yaml deleted file mode 100644 index 3a18e20..0000000 --- a/tests/fixtures/cassettes/webhooks_get_not_found.yaml +++ /dev/null @@ -1,50 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks/test-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ee46aebeebbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:53 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '34' - status: - code: 404 - message: Not Found -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_list_basic.yaml b/tests/fixtures/cassettes/webhooks_list_basic.yaml deleted file mode 100644 index f0b1e09..0000000 --- a/tests/fixtures/cassettes/webhooks_list_basic.yaml +++ /dev/null @@ -1,54 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks?domain_id=65qngkdovk8lwr12 - response: - body: - string: '{"data":[{"id":"k68zxl2w5klj9057","url":"https:\/\/tinyurl.com\/ssrfthatshouldwork","events":["email_list.created"],"name":"Something","version":2,"enabled":true,"editable":true,"secret":"***FILTERED***","created_at":"2026-02-25T12:34:06.000000Z","updated_at":"2026-07-06T13:15:55.000000Z","domain":{"id":"65qngkdovk8lwr12","name":"igor.fail","dkim":true,"spf":true,"tracking":false,"is_verified":true,"is_cname_verified":true,"is_dns_active":true,"is_cname_active":false,"is_tracking_allowed":false,"has_not_queued_messages":false,"not_queued_messages_count":0,"domain_settings":{"send_paused":false,"track_clicks":false,"track_opens":false,"track_opens_pixel_on_top":false,"track_unsubscribe":false,"track_unsubscribe_html":"

Custom - unsubscribe {{unsubscribe}}<\/p>","track_unsubscribe_html_enabled":false,"track_unsubscribe_plain":"Custom - unsubscribe {{unsubscribe}}","track_unsubscribe_plain_enabled":false,"track_content":false,"custom_tracking_enabled":true,"custom_tracking_subdomain":"track","return_path_subdomain":"mta","inbound_routing_enabled":false,"inbound_routing_subdomain":"inbound","precedence_bulk":false,"ignore_duplicated_recipients":false,"show_dmarc":false},"created_at":"2025-04-01T12:33:41.000000Z","updated_at":"2026-07-06T13:14:14.000000Z","totals":[]}}],"links":{"first":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","last":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","prev":null,"next":null},"meta":{"current_page":1,"from":1,"last_page":1,"links":[{"url":null,"label":"« - Previous","page":null,"active":false},{"url":"https:\/\/api.mailersend.com\/v1\/webhooks?page=1","label":"1","page":1,"active":true},{"url":null,"label":"Next - »","page":null,"active":false}],"path":"https:\/\/api.mailersend.com\/v1\/webhooks","per_page":25,"to":1,"total":1}}' - headers: - CF-RAY: - - a16ee4698cb0b30f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:53 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '40' - status: - code: 200 - message: OK -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_list_invalid_domain.yaml b/tests/fixtures/cassettes/webhooks_list_invalid_domain.yaml deleted file mode 100644 index 65978b6..0000000 --- a/tests/fixtures/cassettes/webhooks_list_invalid_domain.yaml +++ /dev/null @@ -1,49 +0,0 @@ -interactions: -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/webhooks?domain_id=invalid-domain-id - response: - body: - string: '{"message":"The domain id field is required. #MS42209","errors":{"domain_id":["The - domain id field is required. #MS42209"]}}' - headers: - CF-RAY: - - a16ee46a3ef6b01e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:53 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '36' - status: - code: 422 - message: Unprocessable Entity -version: 1 diff --git a/tests/fixtures/cassettes/webhooks_update_not_found.yaml b/tests/fixtures/cassettes/webhooks_update_not_found.yaml deleted file mode 100644 index 3a0faf5..0000000 --- a/tests/fixtures/cassettes/webhooks_update_not_found.yaml +++ /dev/null @@ -1,52 +0,0 @@ -interactions: -- request: - body: '{"name": "Updated Webhook Name", "enabled": false}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '50' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.3 (Python/3.12.12; OS/Darwin 25.5.0; Impl/CPython) - method: PUT - uri: https://api.mailersend.com/v1/webhooks/test-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - a16ee4742f848e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Mon, 06 Jul 2026 13:17:55 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2026-07-07T00:00:00Z' - x-envoy-upstream-service-time: - - '37' - status: - code: 404 - message: Not Found -version: 1 From 8dd74b6ba79713f4ad1222ee33432c9e176896a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Hr=C4=8Dek?= Date: Mon, 6 Jul 2026 15:55:25 +0200 Subject: [PATCH 09/10] feat: Updated gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c81b514..8479907 100644 --- a/.gitignore +++ b/.gitignore @@ -96,4 +96,4 @@ ENV/ toolset.py doctester.py .direnv/ -tests/fixutres/ \ No newline at end of file +tests/fixutres/* \ No newline at end of file From c27a5e1f415b08075c17ea1e0abc5f900c8a3da1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Hr=C4=8Dek?= Date: Mon, 6 Jul 2026 15:55:40 +0200 Subject: [PATCH 10/10] feat: Updated gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8479907..4ca87da 100644 --- a/.gitignore +++ b/.gitignore @@ -96,4 +96,4 @@ ENV/ toolset.py doctester.py .direnv/ -tests/fixutres/* \ No newline at end of file +tests/fixtures/* \ No newline at end of file