diff --git a/.gitignore b/.gitignore index d9d8ebd..4ca87da 100644 --- a/.gitignore +++ b/.gitignore @@ -95,4 +95,5 @@ ENV/ .vscode toolset.py doctester.py -.direnv/ \ No newline at end of file +.direnv/ +tests/fixtures/* \ No newline at end of file diff --git a/README.md b/README.md index 9571676..5b05ec1 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) @@ -17,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) @@ -119,20 +121,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) @@ -194,6 +182,11 @@ MailerSend Python SDK - [Remove IP from favorites](#remove-ip-from-favorites) - [Other Endpoints](#other-endpoints) - [Get API Quota](#get-api-quota) + - [Async Usage](#async-usage) + - [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 +205,7 @@ pip install mailersend ## Requirements -- Python 3.7+ +- Python 3.10+ - An API Key from [mailersend.com](https://www.mailersend.com) ## Authentication @@ -278,7 +271,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 +302,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 @@ -328,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 @@ -337,6 +356,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 +382,7 @@ if "error" in response: ``` ### Attribute Access + Access data using dot notation for cleaner code: ```python @@ -376,6 +397,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 +412,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 +436,7 @@ value_list = response.data_values ## Data Format Conversion ### Convert to Dictionary + Get the complete response as a dictionary: ```python @@ -437,6 +461,7 @@ headers_only = response_dict["headers"] ``` ### Convert to JSON + Get JSON string representation with various formatting options: ```python @@ -455,6 +480,7 @@ json_string = json.dumps(response) ``` ### Extract Raw Data + Access just the API response data without metadata: ```python @@ -474,6 +500,7 @@ else: ## Headers and Metadata ### Access Response Headers + Headers can be accessed in multiple ways with automatic case handling: ```python @@ -494,6 +521,7 @@ retry_after = response.headers.get("retry-after", "0") ``` ### Response Metadata + Access useful metadata about the API response: ```python @@ -518,6 +546,7 @@ if "meta" in response.data: ## Error Handling with Responses ### Check Response Status + Always check if the response was successful: ```python @@ -528,33 +557,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 +605,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'] @@ -1558,7 +1588,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"]) @@ -1838,204 +1868,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 @@ -2065,7 +1897,7 @@ request = (SmsSendingBuilder() "data": {"name": "John", "order_id": "12345"} }, { - "phone_number": "+1234567891", + "phone_number": "+1234567891", "data": {"name": "Jane", "order_id": "12346"} } ]) @@ -2855,6 +2687,164 @@ ms = MailerSendClient() response = ms.api_quota.get_quota() ``` + + +## Async Usage + +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 + +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_templates_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 @@ -2875,14 +2865,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}") ``` @@ -2890,10 +2880,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 @@ -2934,36 +2926,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/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/mailersend/__init__.py b/mailersend/__init__.py index f8fe436..9a79ac3 100644 --- a/mailersend/__init__.py +++ b/mailersend/__init__.py @@ -6,6 +6,11 @@ from .client import MailerSendClient +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 from .builders.activity import ActivityBuilder, SingleActivityBuilder @@ -65,8 +70,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..60d305a --- /dev/null +++ b/mailersend/async_client.py @@ -0,0 +1,179 @@ +import asyncio +import logging +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, + BadRequestError, + MailerSendError, + RateLimitExceeded, + ResourceNotFoundError, + ServerError, +) + + +class AsyncMailerSendClient(_BaseMailerSendClient): + """ + 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 (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) + """ + + 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 + """ + super().__init__(api_key, base_url, timeout, max_retries, debug, 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.logger.info(f"{self.__class__.__name__} initialized successfully") + + 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) + + 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 + + if ( + response.status_code in RETRY_STATUSES + and attempt < self.max_retries + ): + if response.status_code == 429: + retry_after = response.headers.get("retry-after") + 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 + + self._raise_for_status( + response, self._get_error_message(response), request_id + ) + + except ( + AuthenticationError, + ResourceNotFoundError, + RateLimitExceeded, + BadRequestError, + ServerError, + MailerSendError, + ): + raise + except httpx.RequestError as 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 + + 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, + 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/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..594aa84 100644 --- a/mailersend/resources/__init__.py +++ b/mailersend/resources/__init__.py @@ -26,6 +26,7 @@ from .sms_inbounds import SmsInbounds from .other import Other from .dmarc_monitoring import DmarcMonitoring +from .smtp_users import SmtpUsers __all__ = [ "BaseResource", @@ -50,6 +51,7 @@ "SmsRecipients", "SmsWebhooks", "SmsInbounds", + "SmtpUsers", "Other", "DmarcMonitoring", ] diff --git a/mailersend/resources/activity.py b/mailersend/resources/activity.py index 45037bd..1f51512 100644 --- a/mailersend/resources/activity.py +++ b/mailersend/resources/activity.py @@ -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,8 +45,4 @@ 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}") diff --git a/mailersend/resources/analytics.py b/mailersend/resources/analytics.py index 9745fa2..741145c 100644 --- a/mailersend/resources/analytics.py +++ b/mailersend/resources/analytics.py @@ -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 diff --git a/mailersend/resources/base.py b/mailersend/resources/base.py index 8ddd0fa..eae1f59 100644 --- a/mailersend/resources/base.py +++ b/mailersend/resources/base.py @@ -1,8 +1,8 @@ +import inspect import logging -from typing import Dict, Any, 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 -import requests T = TypeVar("T", bound=BaseModel) @@ -23,9 +23,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 +51,29 @@ def _create_response( ), ) - def _parse_int_header( - self, response: requests.Response, header: str - ) -> Optional[int]: + 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. @@ -110,3 +128,5 @@ def _process_response( return [cls(**item) for item in response_data] return response_data + + pass diff --git a/mailersend/resources/dmarc_monitoring.py b/mailersend/resources/dmarc_monitoring.py index aa63f3a..84436b6 100644 --- a/mailersend/resources/dmarc_monitoring.py +++ b/mailersend/resources/dmarc_monitoring.py @@ -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,8 +199,7 @@ 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) diff --git a/mailersend/resources/domains.py b/mailersend/resources/domains.py index db30010..edae241 100644 --- a/mailersend/resources/domains.py +++ b/mailersend/resources/domains.py @@ -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,8 +181,4 @@ def get_domain_verification_status( "Retrieving verification status for domain: %s", request.domain_id ) - response = self.client.request( - method="GET", path=f"domains/{request.domain_id}/verify" - ) - - return self._create_response(response) + 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 b3a1531..5096225 100644 --- a/mailersend/resources/email.py +++ b/mailersend/resources/email.py @@ -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,6 +72,4 @@ 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) + 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 d31734c..841ee99 100644 --- a/mailersend/resources/email_verification.py +++ b/mailersend/resources/email_verification.py @@ -12,7 +12,6 @@ EmailVerificationVerifyRequest, EmailVerificationResultsRequest, ) -from ..exceptions import ValidationError class EmailVerification(BaseResource): @@ -35,12 +34,7 @@ def verify_email(self, request: EmailVerifyRequest) -> APIResponse: self.logger.debug("Verifying email address: %s", body) # Make API call - response = self.client.request( - method="POST", path="email-verification/verify", body=body - ) - - # Create standardized response - return self._create_response(response) + 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). @@ -60,13 +54,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 +78,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,12 +100,7 @@ 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( - method="GET", path="email-verification", params=params - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path="email-verification", params=params) def get_verification(self, request: EmailVerificationGetRequest) -> APIResponse: """Get a single email verification list. @@ -136,13 +119,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,12 +146,7 @@ def create_verification( ) # Make API call - response = self.client.request( - method="POST", path="email-verification", body=body - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="POST", path="email-verification", body=body) def verify_list(self, request: EmailVerificationVerifyRequest) -> APIResponse: """Start verification of an email verification list. @@ -188,14 +163,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,11 +189,8 @@ 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) diff --git a/mailersend/resources/identities.py b/mailersend/resources/identities.py index 78424ae..1f03ffd 100644 --- a/mailersend/resources/identities.py +++ b/mailersend/resources/identities.py @@ -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,11 +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 - response = self.client.request( - method="GET", path=f"identities/{request.identity_id}" - ) - - return self._create_response(response) + return self._request(method="GET", path=f"identities/{request.identity_id}") def get_identity_by_email(self, request: IdentityGetByEmailRequest) -> APIResponse: """ @@ -100,11 +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 - response = self.client.request( - method="GET", path=f"identities/email/{request.email}" - ) - - return self._create_response(response) + return self._request(method="GET", path=f"identities/email/{request.email}") def update_identity(self, request: IdentityUpdateRequest) -> APIResponse: """ @@ -131,14 +119,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 +148,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,11 +169,7 @@ def delete_identity(self, request: IdentityDeleteRequest) -> APIResponse: ) # Make API request - response = self.client.request( - method="DELETE", path=f"identities/{request.identity_id}" - ) - - return self._create_response(response) + return self._request(method="DELETE", path=f"identities/{request.identity_id}") def delete_identity_by_email( self, request: IdentityDeleteByEmailRequest @@ -206,8 +186,4 @@ def delete_identity_by_email( self.logger.debug("Preparing to delete identity by email: %s", request.email) # Make API request - response = self.client.request( - method="DELETE", path=f"identities/email/{request.email}" - ) - - return self._create_response(response) + return self._request(method="DELETE", path=f"identities/email/{request.email}") diff --git a/mailersend/resources/inbound.py b/mailersend/resources/inbound.py index 0c1a5f1..8a997fd 100644 --- a/mailersend/resources/inbound.py +++ b/mailersend/resources/inbound.py @@ -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,8 +120,4 @@ 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) + return self._request(method="DELETE", path=f"inbound/{request.inbound_id}") diff --git a/mailersend/resources/messages.py b/mailersend/resources/messages.py index 220c1a8..0b8bf1e 100644 --- a/mailersend/resources/messages.py +++ b/mailersend/resources/messages.py @@ -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,8 +50,4 @@ 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) + return self._request(method="GET", path=f"messages/{request.message_id}") diff --git a/mailersend/resources/other.py b/mailersend/resources/other.py index 27fa586..5672e68 100644 --- a/mailersend/resources/other.py +++ b/mailersend/resources/other.py @@ -20,6 +20,4 @@ def get_quota(self) -> APIResponse: """ self.logger.debug("Retrieving API quota information") - response = self.client.request(method="GET", path="api-quota") - - return self._create_response(response) + return self._request(method="GET", path="api-quota") diff --git a/mailersend/resources/recipients.py b/mailersend/resources/recipients.py index f881d4a..8476df2 100644 --- a/mailersend/resources/recipients.py +++ b/mailersend/resources/recipients.py @@ -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,11 +54,7 @@ def get_recipient(self, request: RecipientGetRequest) -> APIResponse: self.logger.debug("Getting recipient: %s", request.recipient_id) # Make API call - response = self.client.request( - method="GET", path=f"recipients/{request.recipient_id}" - ) - - return self._create_response(response) + return self._request(method="GET", path=f"recipients/{request.recipient_id}") def delete_recipient(self, request: RecipientDeleteRequest) -> APIResponse: """ @@ -76,11 +69,7 @@ def delete_recipient(self, request: RecipientDeleteRequest) -> APIResponse: self.logger.debug("Deleting recipient: %s", request.recipient_id) # Make API call - response = self.client.request( - method="DELETE", path=f"recipients/{request.recipient_id}" - ) - - return self._create_response(response) + return self._request(method="DELETE", path=f"recipients/{request.recipient_id}") def list_blocklist( self, request: Optional[SuppressionListRequest] = None @@ -105,11 +94,7 @@ def list_blocklist( self.logger.debug("Listing blocklist with params: %s", params) # Make API call - response = self.client.request( - method="GET", path="suppressions/blocklist", params=params - ) - - return self._create_response(response) + return self._request(method="GET", path="suppressions/blocklist", params=params) def list_hard_bounces( self, request: Optional[SuppressionListRequest] = None @@ -134,12 +119,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 +146,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 +173,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 +200,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 +219,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,11 +237,7 @@ 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( - method="POST", path="suppressions/hard-bounces", body=body - ) - - return self._create_response(response) + return self._request(method="POST", path="suppressions/hard-bounces", body=body) def add_spam_complaints(self, request: SuppressionAddRequest) -> APIResponse: """ @@ -287,12 +256,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,11 +276,7 @@ def add_unsubscribes(self, request: SuppressionAddRequest) -> APIResponse: self.logger.debug("Adding unsubscribes with body: %s", body) # Make API call - response = self.client.request( - method="POST", path="suppressions/unsubscribes", body=body - ) - - return self._create_response(response) + return self._request(method="POST", path="suppressions/unsubscribes", body=body) def delete_from_blocklist(self, request: SuppressionDeleteRequest) -> APIResponse: """ @@ -331,11 +294,7 @@ 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( - method="DELETE", path="suppressions/blocklist", body=body - ) - - return self._create_response(response) + return self._request(method="DELETE", path="suppressions/blocklist", body=body) def delete_hard_bounces(self, request: SuppressionDeleteRequest) -> APIResponse: """ @@ -353,12 +312,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 +333,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 +353,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,8 +373,6 @@ 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) diff --git a/mailersend/resources/schedules.py b/mailersend/resources/schedules.py index d3dd405..9cba8c4 100644 --- a/mailersend/resources/schedules.py +++ b/mailersend/resources/schedules.py @@ -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,8 +76,6 @@ 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) diff --git a/mailersend/resources/sms_activity.py b/mailersend/resources/sms_activity.py index a078fc5..cfcb4eb 100644 --- a/mailersend/resources/sms_activity.py +++ b/mailersend/resources/sms_activity.py @@ -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,8 +46,6 @@ 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) diff --git a/mailersend/resources/sms_inbounds.py b/mailersend/resources/sms_inbounds.py index 9d22afb..bd586f1 100644 --- a/mailersend/resources/sms_inbounds.py +++ b/mailersend/resources/sms_inbounds.py @@ -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,8 +91,6 @@ 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) diff --git a/mailersend/resources/sms_messages.py b/mailersend/resources/sms_messages.py index 71fdac1..1ffa222 100644 --- a/mailersend/resources/sms_messages.py +++ b/mailersend/resources/sms_messages.py @@ -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,8 +40,6 @@ 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) diff --git a/mailersend/resources/sms_numbers.py b/mailersend/resources/sms_numbers.py index 3bf0410..57e1ecb 100644 --- a/mailersend/resources/sms_numbers.py +++ b/mailersend/resources/sms_numbers.py @@ -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,11 +46,7 @@ def get(self, request: SmsNumberGetRequest) -> APIResponse: """ self.logger.debug("Getting SMS phone number: %s", request.sms_number_id) - response = self.client.request( - method="GET", path=f"sms-numbers/{request.sms_number_id}" - ) - - return self._create_response(response) + return self._request(method="GET", path=f"sms-numbers/{request.sms_number_id}") def update(self, request: SmsNumberUpdateRequest) -> APIResponse: """ @@ -71,12 +65,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,8 +81,6 @@ 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) diff --git a/mailersend/resources/sms_recipients.py b/mailersend/resources/sms_recipients.py index a155675..b9f9185 100644 --- a/mailersend/resources/sms_recipients.py +++ b/mailersend/resources/sms_recipients.py @@ -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,10 +62,8 @@ 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) diff --git a/mailersend/resources/sms_sending.py b/mailersend/resources/sms_sending.py index 9a1998c..fae9123 100644 --- a/mailersend/resources/sms_sending.py +++ b/mailersend/resources/sms_sending.py @@ -27,6 +27,4 @@ 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._create_response(response) + return self._request(method="POST", path="sms", body=payload) diff --git a/mailersend/resources/sms_webhooks.py b/mailersend/resources/sms_webhooks.py index 63dceb0..4fbb898 100644 --- a/mailersend/resources/sms_webhooks.py +++ b/mailersend/resources/sms_webhooks.py @@ -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,8 +98,6 @@ 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) diff --git a/mailersend/resources/smtp_users.py b/mailersend/resources/smtp_users.py index 46727b8..38a3a32 100644 --- a/mailersend/resources/smtp_users.py +++ b/mailersend/resources/smtp_users.py @@ -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,10 +118,7 @@ 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) diff --git a/mailersend/resources/templates.py b/mailersend/resources/templates.py index f26123d..242611b 100644 --- a/mailersend/resources/templates.py +++ b/mailersend/resources/templates.py @@ -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,12 +60,7 @@ def get_template(self, request: TemplateGetRequest) -> APIResponse: self.logger.debug("Template get request: %s", request) # Make API call - response = self.client.request( - method="GET", path=f"templates/{request.template_id}" - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path=f"templates/{request.template_id}") def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: """ @@ -84,9 +76,4 @@ def delete_template(self, request: TemplateDeleteRequest) -> APIResponse: self.logger.debug("Deleting template: %s", request.template_id) # Make API call - response = self.client.request( - method="DELETE", path=f"templates/{request.template_id}" - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="DELETE", path=f"templates/{request.template_id}") diff --git a/mailersend/resources/tokens.py b/mailersend/resources/tokens.py index 08d07ff..5d1c8b0 100644 --- a/mailersend/resources/tokens.py +++ b/mailersend/resources/tokens.py @@ -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,9 +112,4 @@ 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) + return self._request(method="DELETE", path=f"token/{request.token_id}") diff --git a/mailersend/resources/users.py b/mailersend/resources/users.py index c58fc31..d567484 100644 --- a/mailersend/resources/users.py +++ b/mailersend/resources/users.py @@ -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,9 @@ 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 +122,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 +136,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 +150,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,9 +164,6 @@ 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}" + return self._request( + method="DELETE", path=f"invites/{request.invite_id}", data=lambda r: None ) - - # Create standardized response - return self._create_response(response, None) diff --git a/mailersend/resources/webhooks.py b/mailersend/resources/webhooks.py index 031c1ff..fc5645a 100644 --- a/mailersend/resources/webhooks.py +++ b/mailersend/resources/webhooks.py @@ -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,12 +47,7 @@ def get_webhook(self, request: WebhookGetRequest) -> APIResponse: self.logger.debug("Webhook get request: %s", request) # Make API call - response = self.client.request( - method="GET", path=f"webhooks/{request.webhook_id}" - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="GET", path=f"webhooks/{request.webhook_id}") def create_webhook(self, request: WebhookCreateRequest) -> APIResponse: """Create a new webhook. @@ -74,10 +66,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 +86,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,9 +103,4 @@ def delete_webhook(self, request: WebhookDeleteRequest) -> APIResponse: self.logger.debug("Webhook delete request: %s", request) # Make API call - response = self.client.request( - method="DELETE", path=f"webhooks/{request.webhook_id}" - ) - - # Create standardized response - return self._create_response(response) + return self._request(method="DELETE", path=f"webhooks/{request.webhook_id}") diff --git a/pyproject.toml b/pyproject.toml index c9cf3c2..046ce18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,20 +7,26 @@ requires-python = ">=3.10" dependencies = [ "requests>=2.28.1", "pydantic[email]>=2.11.0", + "httpx>=0.28.1", ] [dependency-groups] dev = [ + "black>=26.0.0", "coverage>=7.0.0", - "pre-commit>=2.12.1", "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", - "ruff>=0.9.0", "vcrpy>=8.0.0", + "pre-commit>=2.12.1", ] +[tool.pytest.ini_options] +asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "function" + [build-system] requires = ["hatchling"] build-backend = "hatchling.build" 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/activity_builder_basic.yaml b/tests/fixtures/cassettes/activity_builder_basic.yaml deleted file mode 100644 index cad98ac..0000000 --- a/tests/fixtures/cassettes/activity_builder_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76f8df02562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:45 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 -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 8835d2d..0000000 --- a/tests/fixtures/cassettes/activity_builder_datetime_conversion.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76fb2ef696e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:45 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 -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 07740c4..0000000 --- a/tests/fixtures/cassettes/activity_builder_with_events.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76f9fa0ae291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:45 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 -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 7e180ee..0000000 --- a/tests/fixtures/cassettes/activity_get_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 9684abf1ba41076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:32:27 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: 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 bc702d0..0000000 --- a/tests/fixtures/cassettes/activity_get_delivery_events.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76f04d11562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:43 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 -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 6ebd456..0000000 --- a/tests/fixtures/cassettes/activity_get_empty_result.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76f7bbeae291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:44 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 -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 9a4c2f9..0000000 --- a/tests/fixtures/cassettes/activity_get_engagement_events.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76f1ec70e298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:44 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 -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 b8af689..0000000 --- a/tests/fixtures/cassettes/activity_get_max_limit.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76f538b13267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:44 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 -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 9c74524..0000000 --- a/tests/fixtures/cassettes/activity_get_min_limit.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76f6baa70a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:44 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 -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 a00e6ae..0000000 --- a/tests/fixtures/cassettes/activity_get_single_event.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76eeef2be1a5-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:43 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 -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 fc38e1d..0000000 --- a/tests/fixtures/cassettes/activity_get_single_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/activities/5ee0b166b251345e407c9207 - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d76fc3b3ed814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:45 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/activity_get_with_datetime.yaml b/tests/fixtures/cassettes/activity_get_with_datetime.yaml deleted file mode 100644 index c60a612..0000000 --- a/tests/fixtures/cassettes/activity_get_with_datetime.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76f39c8dcf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:44 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 -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 ce20136..0000000 --- a/tests/fixtures/cassettes/activity_get_with_events.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76ed5da025c0-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:43 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 -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 16bc383..0000000 --- a/tests/fixtures/cassettes/activity_get_with_pagination.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d76eb8be15e99-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:56:43 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 -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 bfb627b..0000000 --- a/tests/fixtures/cassettes/analytics_comprehensive_test.yaml +++ /dev/null @@ -1,186 +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/analytics/date?date_from=1746144000&date_to=1748736000&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}]}}' - headers: - CF-RAY: - - 966c83efa81db01e-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 - 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/analytics/country?date_from=1746144000&date_to=1748736000&tags%5B%5D=integration-test - response: - body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[]}}' - headers: - CF-RAY: - - 966c83f0c8dd0db0-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 - 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/analytics/ua-name?date_from=1746144000&date_to=1748736000&tags%5B%5D=integration-test - response: - body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[]}}' - headers: - CF-RAY: - - 966c83f1df95e290-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 - 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/analytics/ua-type?date_from=1746144000&date_to=1748736000&tags%5B%5D=integration-test - response: - body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[]}}' - headers: - CF-RAY: - - 966c83f30d98d814-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 - 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 -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 4db06f6..0000000 --- a/tests/fixtures/cassettes/analytics_country_basic.yaml +++ /dev/null @@ -1,48 +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/analytics/country?date_from=1746144000&date_to=1748736000 - response: - body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"RS","count":1},{"name":"US","count":1}]}}' - headers: - CF-RAY: - - 966c83e4bade870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:48 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 -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 404341a..0000000 --- a/tests/fixtures/cassettes/analytics_country_with_tags.yaml +++ /dev/null @@ -1,48 +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/analytics/country?date_from=1746144000&date_to=1748736000&tags%5B%5D=newsletter - response: - body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[]}}' - headers: - CF-RAY: - - 966c83e5bd2871a6-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:48 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 -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 674dcdf..0000000 --- a/tests/fixtures/cassettes/analytics_date_all_events.yaml +++ /dev/null @@ -1,48 +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/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 - 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}]}}' - headers: - CF-RAY: - - 966c83e39c510a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:48 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 -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 0e5f7bd..0000000 --- a/tests/fixtures/cassettes/analytics_date_basic.yaml +++ /dev/null @@ -1,48 +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/analytics/date?date_from=1746144000&date_to=1748736000&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}]}}' - headers: - CF-RAY: - - 966c83aed9ca8e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:40 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 -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 725aabf..0000000 --- a/tests/fixtures/cassettes/analytics_date_builder_helpers.yaml +++ /dev/null @@ -1,94 +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/analytics/date?date_from=1748131200&date_to=1748736000&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}]}}' - headers: - CF-RAY: - - 966c83ec5fdfe295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:49 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/analytics/date?date_from=1747526400&date_to=1748736000&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}]}}' - headers: - CF-RAY: - - 966c83ed6f6fe297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:49 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 -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 b6aac4c..0000000 --- a/tests/fixtures/cassettes/analytics_date_with_domain.yaml +++ /dev/null @@ -1,48 +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/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 - 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}]}}' - headers: - CF-RAY: - - 966c83e14e86e294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:48 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 -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 6c1f12b..0000000 --- a/tests/fixtures/cassettes/analytics_date_with_tags.yaml +++ /dev/null @@ -1,48 +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/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 - 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}]}}' - headers: - CF-RAY: - - 966c83df2f9e126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:47 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 -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 a2b96e2..0000000 --- a/tests/fixtures/cassettes/analytics_error_no_events.yaml +++ /dev/null @@ -1,47 +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/analytics/date?date_from=1746144000&date_to=1748736000&group_by=days - response: - body: - string: '{"message":"The event must be an array.","errors":{"event":["The event - must be an array."]}}' - headers: - CF-RAY: - - 966c83ee79895165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:50 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: 422 - message: Unprocessable Entity -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 a1d9877..0000000 --- a/tests/fixtures/cassettes/analytics_reading_env_basic.yaml +++ /dev/null @@ -1,48 +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/analytics/ua-type?date_from=1746144000&date_to=1748736000 - response: - body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"desktop","count":1},{"name":"webmail","count":1}]}}' - headers: - CF-RAY: - - 966c83e9f8dedfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:49 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 -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 07cffb5..0000000 --- a/tests/fixtures/cassettes/analytics_reading_env_with_recipients.yaml +++ /dev/null @@ -1,48 +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/analytics/ua-type?recipient_id%5B%5D=recipient-1&recipient_id%5B%5D=recipient-2&date_from=1746144000&date_to=1748736000 - response: - body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"desktop","count":1},{"name":"webmail","count":1}]}}' - headers: - CF-RAY: - - 966c83eb293ee296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:49 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 -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 5156a1f..0000000 --- a/tests/fixtures/cassettes/analytics_user_agent_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.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/analytics/ua-name?date_from=1746144000&date_to=1748736000 - response: - body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"UNK","count":1},{"name":"Microsoft - Edge","count":1}]}}' - headers: - CF-RAY: - - 966c83e77d87e290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:49 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 -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 d442229..0000000 --- a/tests/fixtures/cassettes/analytics_user_agent_with_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.0 (Python/3.13.5; OS/Darwin 24.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 - response: - body: - string: '{"data":{"date_from":1746144000,"date_to":1748822399,"stats":[{"name":"UNK","count":1},{"name":"Microsoft - Edge","count":1}]}}' - headers: - CF-RAY: - - 966c83e88fd0c687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:10:49 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 -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 f43ae08..0000000 --- a/tests/fixtures/cassettes/domains_create_minimal.yaml +++ /dev/null @@ -1,92 +0,0 @@ -interactions: -- request: - body: '{"name": "hrcek.info"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '22' - 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/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 - 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}}' - headers: - CF-RAY: - - 966c87d49a4b562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:50 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: 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.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/domains/y7zpl98d72545vx6 - response: - body: - string: '' - headers: - CF-RAY: - - 966c8855eac871a6-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Date: - - Tue, 29 Jul 2025 12:13:50 GMT - Server: - - cloudflare - 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: 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 2e71c9a..0000000 --- a/tests/fixtures/cassettes/domains_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966c886b6dd0c687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:53 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/domains_delete_success.yaml b/tests/fixtures/cassettes/domains_delete_success.yaml deleted file mode 100644 index 81912ea..0000000 --- a/tests/fixtures/cassettes/domains_delete_success.yaml +++ /dev/null @@ -1,92 +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.0 (Python/3.13.5; OS/Darwin 24.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 - 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}}' - headers: - CF-RAY: - - 966c8866b8fb870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:53 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: 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.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: DELETE - uri: https://api.mailersend.com/v1/domains/vz9dlem9wn14kj50 - response: - body: - string: '' - headers: - CF-RAY: - - 966c8869fbe6cf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Date: - - Tue, 29 Jul 2025 12:13:53 GMT - Server: - - cloudflare - 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: 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 1c577ea..0000000 --- a/tests/fixtures/cassettes/domains_dns_records_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/domains/non-existent-domain-id/dns-records - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966c885c3be6f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:51 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/domains_dns_records_success.yaml b/tests/fixtures/cassettes/domains_dns_records_success.yaml deleted file mode 100644 index b25b162..0000000 --- a/tests/fixtures/cassettes/domains_dns_records_success.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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966c885aa96be297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:51 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 -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 dbe60ec..0000000 --- a/tests/fixtures/cassettes/domains_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/domains/non-existent-domain-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966c87d39ef0b01b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:29 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/domains_get_success.yaml b/tests/fixtures/cassettes/domains_get_success.yaml deleted file mode 100644 index 00b5387..0000000 --- a/tests/fixtures/cassettes/domains_get_success.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.0 (Python/3.13.5; OS/Darwin 24.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 - 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}}}' - headers: - CF-RAY: - - 966c878a5e434f59-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:17 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 -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 64d5d07..0000000 --- a/tests/fixtures/cassettes/domains_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.0 (Python/3.13.5; OS/Darwin 24.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 - 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 - 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}}' - headers: - CF-RAY: - - 966c87ce4fede28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:28 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 -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 6563d00..0000000 --- a/tests/fixtures/cassettes/domains_list_builder.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.0 (Python/3.13.5; OS/Darwin 24.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 - 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 - 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}}' - headers: - CF-RAY: - - 966c87d2acddc687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:29 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 -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 86a9410..0000000 --- a/tests/fixtures/cassettes/domains_list_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966c87cfa9eeb30f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:29 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 -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 b682f6f..0000000 --- a/tests/fixtures/cassettes/domains_list_verified.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.0 (Python/3.13.5; OS/Darwin 24.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 - 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 - 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}}' - headers: - CF-RAY: - - 966c87d14e06aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:29 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 -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 0cafcb7..0000000 --- a/tests/fixtures/cassettes/domains_recipients_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966c8863de5ae293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:52 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 -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 2e6f557..0000000 --- a/tests/fixtures/cassettes/domains_recipients_builder.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966c8865cc57e28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:53 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 -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 d44c2f5..0000000 --- a/tests/fixtures/cassettes/domains_recipients_pagination.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966c8864dad496e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:52 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 -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 95e7859..0000000 --- a/tests/fixtures/cassettes/domains_settings_workflow.yaml +++ /dev/null @@ -1,200 +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.0 (Python/3.13.5; OS/Darwin 24.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 - 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":[]}}' - headers: - CF-RAY: - - 966c886c28ec562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13: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/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 - 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}}}' - headers: - CF-RAY: - - 966c886d5f429857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13: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: '{"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.0 (Python/3.13.5; OS/Darwin 24.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 - 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":[]}}' - headers: - CF-RAY: - - 966c886e597a96e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13: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/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 - 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}}}' - headers: - CF-RAY: - - 966c886f3875e296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13: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 -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 ea49673..0000000 --- a/tests/fixtures/cassettes/domains_update_settings_builder.yaml +++ /dev/null @@ -1,53 +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.0 (Python/3.13.5; OS/Darwin 24.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 - 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":[]}}' - headers: - CF-RAY: - - 966c88597b74f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:51 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 -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 11dadcc..0000000 --- a/tests/fixtures/cassettes/domains_update_settings_pause.yaml +++ /dev/null @@ -1,52 +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.0 (Python/3.13.5; OS/Darwin 24.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 - 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":[]}}' - headers: - CF-RAY: - - 966c88588816e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:50 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 -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 10df4b8..0000000 --- a/tests/fixtures/cassettes/domains_update_settings_tracking.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, "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.0 (Python/3.13.5; OS/Darwin 24.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 - 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":[]}}' - headers: - CF-RAY: - - 966c88576be5f969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:50 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 -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 4cc2b23..0000000 --- a/tests/fixtures/cassettes/domains_verification_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/domains/non-existent-domain-id/verify - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966c8862e9dcc239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:52 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/domains_verification_status.yaml b/tests/fixtures/cassettes/domains_verification_status.yaml deleted file mode 100644 index ed38bbe..0000000 --- a/tests/fixtures/cassettes/domains_verification_status.yaml +++ /dev/null @@ -1,48 +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/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: - - 966c885d1a2ee291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:13:52 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 -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 30789b1..0000000 --- a/tests/fixtures/cassettes/email_send_bulk.yaml +++ /dev/null @@ -1,52 +0,0 @@ -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

"}]' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '355' - 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/bulk-email - response: - body: - string: '{"message":"The bulk email is being processed.","bulk_email_id":"6888dfbc0beb2661ce76f512"}' - headers: - CF-RAY: - - 966d6dfb6ca1126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:50:36 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: 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 753fb65..0000000 --- a/tests/fixtures/cassettes/email_send_bulk_workflow.yaml +++ /dev/null @@ -1,98 +0,0 @@ -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

"}]' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '355' - 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/bulk-email - response: - body: - string: '{"message":"The bulk email is being processed.","bulk_email_id":"6888dfbd45fcac796bfecfb6"}' - headers: - CF-RAY: - - 966d6dfcc8e8aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:50:37 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: 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.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/bulk-email/6888dfbd45fcac796bfecfb6 - 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"}}' - headers: - CF-RAY: - - 966d6dfddaabe294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:50:37 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 -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 88c8c5a..0000000 --- a/tests/fixtures/cassettes/email_send_text_only.yaml +++ /dev/null @@ -1,54 +0,0 @@ -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"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '177' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6deabfd9dcf8-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:34 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' - x-message-id: - - 6888dfbaf3cba3da787e6017 - 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 c1bad49..0000000 --- a/tests/fixtures/cassettes/email_send_with_attachments.yaml +++ /dev/null @@ -1,55 +0,0 @@ -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==", - "disposition": "attachment", "filename": "test_attachment.txt"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '326' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6defe93fbbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:35 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' - x-message-id: - - 6888dfbbfdf2d4b386c9ef6e - 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 41ef1a3..0000000 --- a/tests/fixtures/cassettes/email_send_with_base_params.yaml +++ /dev/null @@ -1,54 +0,0 @@ -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: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '184' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6de8cca4b654-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:33 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' - x-message-id: - - 6888dfb97e2b7a6ce588f6de - 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 c77e3bd..0000000 --- a/tests/fixtures/cassettes/email_send_with_cc_bcc.yaml +++ /dev/null @@ -1,55 +0,0 @@ -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

"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '312' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6dec8b5aa2c1-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:34 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' - x-message-id: - - 6888dfbac89a067d6f805520 - 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 3db6aa9..0000000 --- a/tests/fixtures/cassettes/email_send_with_headers.yaml +++ /dev/null @@ -1,55 +0,0 @@ -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"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '251' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6df75d1871a6-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:36 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' - x-message-id: - - 6888dfbc49f14409301e4d5c - 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 46bb11a..0000000 --- a/tests/fixtures/cassettes/email_send_with_reply_to.yaml +++ /dev/null @@ -1,55 +0,0 @@ -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", - "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: - - '260' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6df8e8a60a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:36 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' - x-message-id: - - 6888dfbc1b82c3def7569208 - 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 39f7dd9..0000000 --- a/tests/fixtures/cassettes/email_send_with_tags.yaml +++ /dev/null @@ -1,54 +0,0 @@ -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"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '228' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6df208bfe290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:35 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' - x-message-id: - - 6888dfbb37648449d59f51ac - 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 8170bba..0000000 --- a/tests/fixtures/cassettes/email_send_with_template.yaml +++ /dev/null @@ -1,55 +0,0 @@ -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"}}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '310' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6df59c8acf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:36 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' - x-message-id: - - 6888dfbb94808450972a2cb5 - 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 7a819b2..0000000 --- a/tests/fixtures/cassettes/email_send_with_text_priority.yaml +++ /dev/null @@ -1,55 +0,0 @@ -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

", - "precedence_bulk": true}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '260' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6dee582ff832-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:34 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' - x-message-id: - - 6888dfba8942efdecfd82b5c - 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 2bdde8c..0000000 --- a/tests/fixtures/cassettes/email_send_with_threading.yaml +++ /dev/null @@ -1,55 +0,0 @@ -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"]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '253' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6dfa3afcdfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:36 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' - x-message-id: - - 6888dfbccbaaa97910fa1420 - 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 dfb6e4b..0000000 --- a/tests/fixtures/cassettes/email_send_with_tracking.yaml +++ /dev/null @@ -1,55 +0,0 @@ -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}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '265' - 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/email - response: - body: - string: '' - headers: - CF-RAY: - - 966d6df3ef4955ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - text/html; charset=UTF-8 - Date: - - Tue, 29 Jul 2025 14:50:35 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' - x-message-id: - - 6888dfbb555eb58cce8aeabe - 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 3820f06..0000000 --- a/tests/fixtures/cassettes/email_verification_api_response_structure.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966c9547ef9fbbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:22:40 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 -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 eafa82a..0000000 --- a/tests/fixtures/cassettes/email_verification_comprehensive_workflow.yaml +++ /dev/null @@ -1,186 +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.0 (Python/3.13.5; OS/Darwin 24.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}}}' - headers: - CF-RAY: - - 966c98f8bdfb9d41-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:25:12 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: 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.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification/neqvygmw1840p7w2 - 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}}}' - headers: - CF-RAY: - - 966c98fb4801d87b-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:25:12 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/email-verification/neqvygmw1840p7w2/verify - response: - body: - string: '{"message":"The email addresses are still being uploaded, wait for - the upload to finish to continue."}' - headers: - CF-RAY: - - 966c98fcba1a1479-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:25:12 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: 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.0 (Python/3.13.5; OS/Darwin 24.5.0; Impl/CPython) - method: GET - uri: https://api.mailersend.com/v1/email-verification/neqvygmw1840p7w2/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}}' - headers: - CF-RAY: - - 966c98fe3f273a0d-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:25:12 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 -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 ae1f093..0000000 --- a/tests/fixtures/cassettes/email_verification_create_list.yaml +++ /dev/null @@ -1,49 +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.0 (Python/3.13.5; OS/Darwin 24.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}}}' - headers: - CF-RAY: - - 966c953c19250db0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:22:39 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: 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 290d495..0000000 --- a/tests/fixtures/cassettes/email_verification_empty_list.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966c9548cd8c9857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:22:40 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 -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 94b98ca..0000000 --- a/tests/fixtures/cassettes/email_verification_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/email-verification/non-existent-list-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966c95400fade28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:22:39 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/email_verification_get_results.yaml b/tests/fixtures/cassettes/email_verification_get_results.yaml deleted file mode 100644 index 8f1e7db..0000000 --- a/tests/fixtures/cassettes/email_verification_get_results.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/email-verification/test-verification-list-id/results?page=1&limit=10 - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966c97f00914babc-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:24:29 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/email_verification_get_single.yaml b/tests/fixtures/cassettes/email_verification_get_single.yaml deleted file mode 100644 index d9b33fb..0000000 --- a/tests/fixtures/cassettes/email_verification_get_single.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/email-verification/test-verification-list-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966c953eebfde290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:22:39 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/email_verification_list_basic.yaml b/tests/fixtures/cassettes/email_verification_list_basic.yaml deleted file mode 100644 index b458276..0000000 --- a/tests/fixtures/cassettes/email_verification_list_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966c94ec299fc1f9-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:22:26 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 -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 9d69b6e..0000000 --- a/tests/fixtures/cassettes/email_verification_list_with_pagination.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966c97ee7eff8f2b-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:24:29 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 -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 4523d68..0000000 --- a/tests/fixtures/cassettes/email_verification_verify_list.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/email-verification/test-verification-list-id/verify - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966c9540c9d5e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:22:39 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/identities_create_not_available.yaml b/tests/fixtures/cassettes/identities_create_not_available.yaml deleted file mode 100644 index 7a2beb5..0000000 --- a/tests/fixtures/cassettes/identities_create_not_available.yaml +++ /dev/null @@ -1,51 +0,0 @@ -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": - true, "personal_note": "Test identity for integration testing"}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '232' - 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/identities - response: - body: - string: '{"message":"The email has already been taken.","errors":{"email":["The - email has already been taken."]}}' - headers: - CF-RAY: - - 9684c6c4badff339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:50:46 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: 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 c91eece..0000000 --- a/tests/fixtures/cassettes/identities_delete_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-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c6ccfcd5bbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:50:47 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: 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 fd9d0e2..0000000 --- a/tests/fixtures/cassettes/identities_delete_by_id.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c6cc0ca3076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:50:47 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/identities_get_by_email.yaml b/tests/fixtures/cassettes/identities_get_by_email.yaml deleted file mode 100644 index aca4701..0000000 --- a/tests/fixtures/cassettes/identities_get_by_email.yaml +++ /dev/null @@ -1,48 +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/identities/email/test@example.com - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 9684c6c85d461f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:50:46 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: 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 b536d1f..0000000 --- a/tests/fixtures/cassettes/identities_get_single.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/identities/test-identity-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 9684c6c70b1ce296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:50:46 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/identities_update_by_email.yaml b/tests/fixtures/cassettes/identities_update_by_email.yaml deleted file mode 100644 index 1caae89..0000000 --- a/tests/fixtures/cassettes/identities_update_by_email.yaml +++ /dev/null @@ -1,50 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c6cb0b621b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:50:47 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: 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 2a92dad..0000000 --- a/tests/fixtures/cassettes/identities_update_by_id.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c6c9b884f969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:50:46 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_api_response_structure.yaml b/tests/fixtures/cassettes/inbound_api_response_structure.yaml deleted file mode 100644 index 65cf752..0000000 --- a/tests/fixtures/cassettes/inbound_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.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 - 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: - - 966cbd2d1e0371a6-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49: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 -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 d2ed22a..0000000 --- a/tests/fixtures/cassettes/inbound_builder_create_invalid_domain.yaml +++ /dev/null @@ -1,149 +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.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) - 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: - - 9684ca572aad9857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:53:12 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: 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 f748364..0000000 --- a/tests/fixtures/cassettes/inbound_builder_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/inbound/test-inbound-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966cbd319c948e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49:55 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_builder_list_basic.yaml b/tests/fixtures/cassettes/inbound_builder_list_basic.yaml deleted file mode 100644 index 5c7924f..0000000 --- a/tests/fixtures/cassettes/inbound_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.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 - 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: - - 966cbd2f9c02c687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49:55 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 -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 526eb6b..0000000 --- a/tests/fixtures/cassettes/inbound_builder_list_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.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: - - 966cbd308f235165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49:55 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 -version: 1 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 deleted file mode 100644 index 7ff1503..0000000 --- a/tests/fixtures/cassettes/inbound_create_invalid_domain.yaml +++ /dev/null @@ -1,52 +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": - "ms-sdk@igor.fail"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '271' - 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: '{"message":"The domain id field is required. #MS42209","errors":{"domain_id":["The - domain id field is required. #MS42209"]}}' - headers: - CF-RAY: - - 9684ca4d2ae2b018-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:53:10 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: 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 ceddac2..0000000 --- a/tests/fixtures/cassettes/inbound_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966cbd2c5abf55ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49: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_empty_result.yaml b/tests/fixtures/cassettes/inbound_empty_result.yaml deleted file mode 100644 index d695b91..0000000 --- a/tests/fixtures/cassettes/inbound_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.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 - 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: - - 966cbd2e98cfc687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49:55 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 -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 c570d02..0000000 --- a/tests/fixtures/cassettes/inbound_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/inbound/test-inbound-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966cbd2879dce295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49: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_list_basic.yaml b/tests/fixtures/cassettes/inbound_list_basic.yaml deleted file mode 100644 index d89c02b..0000000 --- a/tests/fixtures/cassettes/inbound_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.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 - 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: - - 966cbd242e1ef969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49:53 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 -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 fe22ff4..0000000 --- a/tests/fixtures/cassettes/inbound_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.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: - - 966cbd277a6a0380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49:53 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 -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 13bcfb0..0000000 --- a/tests/fixtures/cassettes/inbound_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.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 - 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: - - 966cbd25fe38b01e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:49:53 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 -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 908309e..0000000 --- a/tests/fixtures/cassettes/inbound_update_not_found.yaml +++ /dev/null @@ -1,48 +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": "ms-sdk@igor.fail"}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '237' - Content-Type: - - application/json - User-Agent: - - mailersend-python/2.0.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684ca4eea11f969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - 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 - 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 7881e2f..0000000 --- a/tests/fixtures/cassettes/invites_cancel.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d3dcfff125165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:43 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/invites_get_single.yaml b/tests/fixtures/cassettes/invites_get_single.yaml deleted file mode 100644 index 5c9bccc..0000000 --- a/tests/fixtures/cassettes/invites_get_single.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/invites/test-invite-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d3dcd8e9b8e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:43 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/invites_list_basic.yaml b/tests/fixtures/cassettes/invites_list_basic.yaml deleted file mode 100644 index 8f6712b..0000000 --- a/tests/fixtures/cassettes/invites_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d3dcc8f53e297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:43 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 -version: 1 diff --git a/tests/fixtures/cassettes/invites_resend.yaml b/tests/fixtures/cassettes/invites_resend.yaml deleted file mode 100644 index d0f7a5f..0000000 --- a/tests/fixtures/cassettes/invites_resend.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d3dced892f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:43 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/messages_api_response_structure.yaml b/tests/fixtures/cassettes/messages_api_response_structure.yaml deleted file mode 100644 index f88a5ad..0000000 --- a/tests/fixtures/cassettes/messages_api_response_structure.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d2816ee94dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02: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 -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 e02a75f..0000000 --- a/tests/fixtures/cassettes/messages_builder_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/messages/test-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d281c5e83126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02: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/messages_builder_list_basic.yaml b/tests/fixtures/cassettes/messages_builder_list_basic.yaml deleted file mode 100644 index 89c2b3b..0000000 --- a/tests/fixtures/cassettes/messages_builder_list_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d281a0b580db0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02: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 -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 b5a4658..0000000 --- a/tests/fixtures/cassettes/messages_builder_list_with_custom_limit.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d281b2ec90380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02: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 -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 4e3aa74..0000000 --- a/tests/fixtures/cassettes/messages_comprehensive_workflow.yaml +++ /dev/null @@ -1,178 +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/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}}' - headers: - CF-RAY: - - 966d281d4e841b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02:55 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/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}}' - headers: - CF-RAY: - - 966d281ebed8d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02:55 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/messages/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d281fde9d8e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02:55 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - 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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2820d8d6e28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02:55 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/messages_empty_result.yaml b/tests/fixtures/cassettes/messages_empty_result.yaml deleted file mode 100644 index 269d7ca..0000000 --- a/tests/fixtures/cassettes/messages_empty_result.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d2818ab22076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02: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 -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 ba26203..0000000 --- a/tests/fixtures/cassettes/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/messages/test-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d28159a8adfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02:53 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/messages_list_basic.yaml b/tests/fixtures/cassettes/messages_list_basic.yaml deleted file mode 100644 index 48f8f80..0000000 --- a/tests/fixtures/cassettes/messages_list_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d28106b321f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02:53 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 -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 127b643..0000000 --- a/tests/fixtures/cassettes/messages_list_different_limit.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d2813d9160380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02:53 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 -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 734d87b..0000000 --- a/tests/fixtures/cassettes/messages_list_with_pagination.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d28124ca3e298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:02:53 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 -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 ff7f045..0000000 --- a/tests/fixtures/cassettes/recipients_add_hard_bounces.yaml +++ /dev/null @@ -1,49 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966ca7f02ace4341-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:35:24 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: 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 49179ba..0000000 --- a/tests/fixtures/cassettes/recipients_add_spam_complaints.yaml +++ /dev/null @@ -1,49 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966ca7f1986b1ef8-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:35:25 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: 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 4099dd3..0000000 --- a/tests/fixtures/cassettes/recipients_add_to_blocklist.yaml +++ /dev/null @@ -1,49 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966ca7eedfdc23b5-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:35:24 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: 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 f6f85c5..0000000 --- a/tests/fixtures/cassettes/recipients_add_unsubscribes.yaml +++ /dev/null @@ -1,49 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966ca7f2fd05cb7b-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:35:25 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: 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 94ecf90..0000000 --- a/tests/fixtures/cassettes/recipients_api_response_structure.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966ca5d4deb8b01e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:58 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 -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 b910de7..0000000 --- a/tests/fixtures/cassettes/recipients_blocklist_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966ca5c7bc02126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:56 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 -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 d5c908a..0000000 --- a/tests/fixtures/cassettes/recipients_comprehensive_workflow.yaml +++ /dev/null @@ -1,49 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966ca7f5db07562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:35:25 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: 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 5980e78..0000000 --- a/tests/fixtures/cassettes/recipients_delete_from_blocklist.yaml +++ /dev/null @@ -1,49 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966ca7f45aeac0d0-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:35:25 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: 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 f0e5690..0000000 --- a/tests/fixtures/cassettes/recipients_delete_success.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966ca5c6db5de290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:56 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/recipients_empty_list.yaml b/tests/fixtures/cassettes/recipients_empty_list.yaml deleted file mode 100644 index 2ddaa70..0000000 --- a/tests/fixtures/cassettes/recipients_empty_list.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966ca5d5bfccb30f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:58 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 -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 233bffd..0000000 --- a/tests/fixtures/cassettes/recipients_get_single.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/recipients/test-recipient-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966ca5c578ed3267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:56 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/recipients_hard_bounces_basic.yaml b/tests/fixtures/cassettes/recipients_hard_bounces_basic.yaml deleted file mode 100644 index 8e256cb..0000000 --- a/tests/fixtures/cassettes/recipients_hard_bounces_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.0 (Python/3.13.5; OS/Darwin 24.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 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}}' - headers: - CF-RAY: - - 966ca5c8ada5fa43-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:56 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 -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 e1e20d8..0000000 --- a/tests/fixtures/cassettes/recipients_list_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966ca5a73abc8e61-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:51 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 -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 d2185b5..0000000 --- a/tests/fixtures/cassettes/recipients_list_with_pagination.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966ca5c3f89a96e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:56 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 -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 9213503..0000000 --- a/tests/fixtures/cassettes/recipients_spam_complaints_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966ca5ca3c6ae295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:57 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 -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 33cade8..0000000 --- a/tests/fixtures/cassettes/recipients_unsubscribes_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966ca5cbae405165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:33:57 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 -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 2e76bfa..0000000 --- a/tests/fixtures/cassettes/schedules_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d2ecd8f40e297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:29 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 -version: 1 diff --git a/tests/fixtures/cassettes/schedules_delete.yaml b/tests/fixtures/cassettes/schedules_delete.yaml deleted file mode 100644 index 2ac7341..0000000 --- a/tests/fixtures/cassettes/schedules_delete.yaml +++ /dev/null @@ -1,51 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2ecbffe3e296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:28 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: 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 bcb68f8..0000000 --- a/tests/fixtures/cassettes/schedules_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d2ece7865d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:29 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 -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 4bb9c51..0000000 --- a/tests/fixtures/cassettes/schedules_get_single.yaml +++ /dev/null @@ -1,48 +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/message-schedules/test-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d2ecb1c39aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:28 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: 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 1c06432..0000000 --- a/tests/fixtures/cassettes/schedules_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d2d97deaee296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:06:39 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 -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 a29622a..0000000 --- a/tests/fixtures/cassettes/schedules_list_with_domain_filter.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d2ec87a65c239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:28 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 -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 a650403..0000000 --- a/tests/fixtures/cassettes/schedules_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d2ec709ed1b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:28 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 -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 a5707ef..0000000 --- a/tests/fixtures/cassettes/schedules_list_with_status_filter.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d2eca1b761b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:28 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 -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 5f6d1a0..0000000 --- a/tests/fixtures/cassettes/sms_activity_api_response_structure.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d5dfa9bf3e296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:41 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 -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 34a8dd3..0000000 --- a/tests/fixtures/cassettes/sms_activity_builder_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/test-sms-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d5e000bddbbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:42 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_activity_builder_list_basic.yaml b/tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml deleted file mode 100644 index 28638c8..0000000 --- a/tests/fixtures/cassettes/sms_activity_builder_list_basic.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d5dfcac06c687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:41 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 -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 8269e54..0000000 --- a/tests/fixtures/cassettes/sms_activity_builder_list_with_filters.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d60908826b01b-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 - 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 -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 827c0c1..0000000 --- a/tests/fixtures/cassettes/sms_activity_builder_list_with_sms_number.yaml +++ /dev/null @@ -1,47 +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-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: - - 966d5dff2a3f55ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:42 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: 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 7443cb5..0000000 --- a/tests/fixtures/cassettes/sms_activity_comprehensive_workflow.yaml +++ /dev/null @@ -1,178 +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-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}}' - headers: - CF-RAY: - - 966d6091cd1e8e88-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 - 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/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}}' - headers: - CF-RAY: - - 966d60937a5a870d-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 - 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/sms-messages/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d6094bdf6870d-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 - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - 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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d609608e2562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:41:28 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_activity_empty_result.yaml b/tests/fixtures/cassettes/sms_activity_empty_result.yaml deleted file mode 100644 index ee36d8e..0000000 --- a/tests/fixtures/cassettes/sms_activity_empty_result.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d5dfb8912b30c-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:41 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 -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 9cb4920..0000000 --- a/tests/fixtures/cassettes/sms_activity_get_message_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/test-sms-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d5df98e27b311-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:41 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_activity_list_basic.yaml b/tests/fixtures/cassettes/sms_activity_list_basic.yaml deleted file mode 100644 index 59ee2a0..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_basic.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d5df24b8faeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:40 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 -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 8a10b3c..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_with_date_range.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d608eb816c239-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 - 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 -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 52018d3..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_with_pagination.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d5df42e5f1f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:40 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 -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 00c5e67..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_with_sms_number_filter.yaml +++ /dev/null @@ -1,47 +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-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: - - 966d5df59edee295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:40 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: 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 8b8ff37..0000000 --- a/tests/fixtures/cassettes/sms_activity_list_with_status_filter.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d5df808defa43-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:39:41 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 -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 0ba8225..0000000 --- a/tests/fixtures/cassettes/sms_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966caa4b8e7daeaa-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 - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2025-07-30T00:00:00Z' - 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 2b1eba8..0000000 --- a/tests/fixtures/cassettes/sms_messages_comprehensive_workflow.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966caa4c9e36cf86-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 - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2025-07-30T00:00:00Z' - status: - code: 200 - message: OK -version: 1 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 deleted file mode 100644 index 0390ba5..0000000 --- a/tests/fixtures/cassettes/sms_messages_get_single.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/test-sms-message-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966caa47ddaee28f-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:37:00 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_list_basic.yaml b/tests/fixtures/cassettes/sms_messages_list_basic.yaml deleted file mode 100644 index 8e55ce5..0000000 --- a/tests/fixtures/cassettes/sms_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966ca9f5db1adfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:36:47 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 -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 2b1a4cb..0000000 --- a/tests/fixtures/cassettes/sms_messages_list_empty.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966caa458c881b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:37:00 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 -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 1e23b1b..0000000 --- a/tests/fixtures/cassettes/sms_messages_list_with_filters.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966caa4a5d1b126d-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 - x-apiquota-remaining: - - '-1' - x-apiquota-reset: - - '2025-07-30T00:00:00Z' - 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 061a6d1..0000000 --- a/tests/fixtures/cassettes/sms_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966caa43dfca076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 12:37:00 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 -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 87e0ebc..0000000 --- a/tests/fixtures/cassettes/sms_numbers_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d57d00f301f09-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:28 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 -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 3eff10d..0000000 --- a/tests/fixtures/cassettes/sms_numbers_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d57cf2e01f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:28 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_numbers_empty_result.yaml b/tests/fixtures/cassettes/sms_numbers_empty_result.yaml deleted file mode 100644 index 3d88607..0000000 --- a/tests/fixtures/cassettes/sms_numbers_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d57d0fca61b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:28 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 -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 17b79a6..0000000 --- a/tests/fixtures/cassettes/sms_numbers_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-numbers/test-sms-number-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d57cb3beafa43-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:27 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_numbers_list_active_only.yaml b/tests/fixtures/cassettes/sms_numbers_list_active_only.yaml deleted file mode 100644 index 902680b..0000000 --- a/tests/fixtures/cassettes/sms_numbers_list_active_only.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d57c9ef058e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:27 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 -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 7bf3ef9..0000000 --- a/tests/fixtures/cassettes/sms_numbers_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d5780d8b0e292-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:16 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 -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 257ac2d..0000000 --- a/tests/fixtures/cassettes/sms_numbers_list_paused_only.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d57c80972076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:27 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 -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 402b566..0000000 --- a/tests/fixtures/cassettes/sms_numbers_list_with_filters.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d57c71b8ce292-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:27 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 -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 62803b9..0000000 --- a/tests/fixtures/cassettes/sms_numbers_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d57cbfe4896e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:28 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_numbers_update_pause.yaml b/tests/fixtures/cassettes/sms_numbers_update_pause.yaml deleted file mode 100644 index c92c497..0000000 --- a/tests/fixtures/cassettes/sms_numbers_update_pause.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d57cd78d78e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:28 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_numbers_update_unpause.yaml b/tests/fixtures/cassettes/sms_numbers_update_unpause.yaml deleted file mode 100644 index efcae5e..0000000 --- a/tests/fixtures/cassettes/sms_numbers_update_unpause.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d57ce49ace291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:35:28 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_recipients_api_response_structure.yaml b/tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml deleted file mode 100644 index d292388..0000000 --- a/tests/fixtures/cassettes/sms_recipients_api_response_structure.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d52917c9c076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31: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 -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 165d581..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_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-recipients/test-sms-recipient-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d52981e38870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31:55 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_recipients_builder_list_basic.yaml b/tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml deleted file mode 100644 index 0e14efe..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_list_basic.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d52940e9fbbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31: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 -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 7b423e6..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_list_with_sms_number.yaml +++ /dev/null @@ -1,47 +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-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: - - 966d54ecac96b018-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:33:30 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: 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 ccc798b..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_list_with_status.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d52950c425165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31: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 -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 f650ca9..0000000 --- a/tests/fixtures/cassettes/sms_recipients_builder_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d529919e2b01d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31:55 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_recipients_comprehensive_workflow.yaml b/tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml deleted file mode 100644 index 1f189d2..0000000 --- a/tests/fixtures/cassettes/sms_recipients_comprehensive_workflow.yaml +++ /dev/null @@ -1,178 +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-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}}' - headers: - CF-RAY: - - 966d54ee3c053267-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:33:30 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/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}}' - headers: - CF-RAY: - - 966d54efba6bf969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:33:30 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/sms-recipients/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d54f0bd42f969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:33:31 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - 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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d54f16ca4dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:33:31 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_recipients_empty_result.yaml b/tests/fixtures/cassettes/sms_recipients_empty_result.yaml deleted file mode 100644 index 071a578..0000000 --- a/tests/fixtures/cassettes/sms_recipients_empty_result.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d5292ea9be297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31: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 -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 0d81ef3..0000000 --- a/tests/fixtures/cassettes/sms_recipients_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-recipients/test-sms-recipient-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d528f28afc747-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31:53 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_recipients_list_basic.yaml b/tests/fixtures/cassettes/sms_recipients_list_basic.yaml deleted file mode 100644 index 8389af4..0000000 --- a/tests/fixtures/cassettes/sms_recipients_list_basic.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d52896efd8eb1-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31:52 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 -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 01d725e..0000000 --- a/tests/fixtures/cassettes/sms_recipients_list_with_pagination.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d528ac84011d5-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31:52 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 -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 41b7776..0000000 --- a/tests/fixtures/cassettes/sms_recipients_list_with_sms_number_filter.yaml +++ /dev/null @@ -1,47 +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-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: - - 966d54eb3a0a8e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:33:30 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: 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 f486c7c..0000000 --- a/tests/fixtures/cassettes/sms_recipients_list_with_status_filter.yaml +++ /dev/null @@ -1,48 +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-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}}' - headers: - CF-RAY: - - 966d528c7ec30b0f-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31:53 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 -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 0134a7c..0000000 --- a/tests/fixtures/cassettes/sms_recipients_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d528ffb32d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:31:53 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_send_basic.yaml b/tests/fixtures/cassettes/sms_send_basic.yaml deleted file mode 100644 index 927143c..0000000 --- a/tests/fixtures/cassettes/sms_send_basic.yaml +++ /dev/null @@ -1,52 +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: - - '96' - 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/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: - - 966d52c86efaaeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:32:02 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: 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 733e538..0000000 --- a/tests/fixtures/cassettes/sms_send_long_message.yaml +++ /dev/null @@ -1,68 +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: - - '1462' - 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/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: - - 966d533d3969e294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:32:21 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: 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 54c585b..0000000 --- a/tests/fixtures/cassettes/sms_send_multiple_recipients.yaml +++ /dev/null @@ -1,52 +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: - - '93' - 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/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: - - 966d533e5c36e294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:32:21 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: 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 97b85ab..0000000 --- a/tests/fixtures/cassettes/sms_send_with_personalization.yaml +++ /dev/null @@ -1,53 +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: - - '191' - 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/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: - - 966d533c3e1cc687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:32:21 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: 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 45c39dd..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_create_invalid_sms_number.yaml +++ /dev/null @@ -1,51 +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.0 (Python/3.13.5; OS/Darwin 24.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"]}}' - headers: - CF-RAY: - - 966d689b9b428e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:46:56 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: 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 91f4ffc..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_create_with_all_events.yaml +++ /dev/null @@ -1,51 +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.0 (Python/3.13.5; OS/Darwin 24.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"]}}' - headers: - CF-RAY: - - 966d689d1ffa96e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:46:57 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: 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 df7308d..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d68a09990e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:46:57 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_webhooks_get_not_found.yaml b/tests/fixtures/cassettes/sms_webhooks_get_not_found.yaml deleted file mode 100644 index aca5d4e..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_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-webhooks/test-sms-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d689a2a27d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:46:56 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_webhooks_list_basic.yaml b/tests/fixtures/cassettes/sms_webhooks_list_basic.yaml deleted file mode 100644 index 63a7746..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_list_basic.yaml +++ /dev/null @@ -1,47 +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-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: - - 966d65a14e711b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:44: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: 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 533b533..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_list_with_invalid_sms_number.yaml +++ /dev/null @@ -1,47 +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-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: - - 966d6898da8a076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:46:56 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: 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 946785d..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_update_disable.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d689f5b4de291-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:46:57 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_webhooks_update_not_found.yaml b/tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml deleted file mode 100644 index 0f6141f..0000000 --- a/tests/fixtures/cassettes/sms_webhooks_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d689e6c28b01b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:46:57 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/smtp_users_api_response_structure.yaml b/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml deleted file mode 100644 index f54876d..0000000 --- a/tests/fixtures/cassettes/smtp_users_api_response_structure.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d2f8bee235165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:59 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 -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 db686cc..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_create_invalid_domain.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2f915ae8c239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08:00 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/smtp_users_builder_delete_not_found.yaml b/tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml deleted file mode 100644 index 7bf3bf7..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2f92e81ac239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08:00 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/smtp_users_builder_get_not_found.yaml b/tests/fixtures/cassettes/smtp_users_builder_get_not_found.yaml deleted file mode 100644 index 35ab9b8..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_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/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d2f908cd99857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08:00 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/smtp_users_builder_list_basic.yaml b/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml deleted file mode 100644 index 58465c8..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_list_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d2f8e382d076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:59 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 -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 bfef72b..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_list_with_custom_limit.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d2f8f6a5d71a3-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08:00 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 -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 769e42c..0000000 --- a/tests/fixtures/cassettes/smtp_users_builder_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2f922de60380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08:00 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/smtp_users_comprehensive_workflow.yaml b/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml deleted file mode 100644 index a608e5e..0000000 --- a/tests/fixtures/cassettes/smtp_users_comprehensive_workflow.yaml +++ /dev/null @@ -1,222 +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/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}}' - headers: - CF-RAY: - - 966d2f93adb7076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08:00 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/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}}' - headers: - CF-RAY: - - 966d2f948d30e292-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08:00 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/domains/65qngkdovk8lwr12/smtp-users/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d2f955b36e297-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08:00 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - 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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2f96198ce292-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08:01 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - 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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2f971a850a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:08: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/smtp_users_create_invalid_domain.yaml b/tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml deleted file mode 100644 index ec5ce11..0000000 --- a/tests/fixtures/cassettes/smtp_users_create_invalid_domain.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2f88ce72af0a-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:58 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/smtp_users_delete_not_found.yaml b/tests/fixtures/cassettes/smtp_users_delete_not_found.yaml deleted file mode 100644 index 6ed30d1..0000000 --- a/tests/fixtures/cassettes/smtp_users_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2f8b1806e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:59 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/smtp_users_empty_result.yaml b/tests/fixtures/cassettes/smtp_users_empty_result.yaml deleted file mode 100644 index ab2e45a..0000000 --- a/tests/fixtures/cassettes/smtp_users_empty_result.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d2f8cba1d8e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:59 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 -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 a4cf791..0000000 --- a/tests/fixtures/cassettes/smtp_users_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/domains/65qngkdovk8lwr12/smtp-users/test-smtp-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d2f879f255db9-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:58 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/smtp_users_list_basic.yaml b/tests/fixtures/cassettes/smtp_users_list_basic.yaml deleted file mode 100644 index 858d5cd..0000000 --- a/tests/fixtures/cassettes/smtp_users_list_basic.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d2f83cf2e3ec1-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:58 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 -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 e755f28..0000000 --- a/tests/fixtures/cassettes/smtp_users_list_invalid_domain.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/domains/invalid-domain-id/smtp-users?limit=10 - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d2f867de68eb1-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:58 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/smtp_users_list_with_limit.yaml b/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml deleted file mode 100644 index 87632ea..0000000 --- a/tests/fixtures/cassettes/smtp_users_list_with_limit.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d2f850e51b654-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:58 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 -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 1e470e0..0000000 --- a/tests/fixtures/cassettes/smtp_users_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d2f8a0d08afe9-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:07:59 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/templates_api_response_structure.yaml b/tests/fixtures/cassettes/templates_api_response_structure.yaml deleted file mode 100644 index a8e9893..0000000 --- a/tests/fixtures/cassettes/templates_api_response_structure.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d35841d48d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:12:04 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 -version: 1 diff --git a/tests/fixtures/cassettes/templates_delete.yaml b/tests/fixtures/cassettes/templates_delete.yaml deleted file mode 100644 index d7a34d9..0000000 --- a/tests/fixtures/cassettes/templates_delete.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d3582eb4b126d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:12:03 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/templates_empty_result.yaml b/tests/fixtures/cassettes/templates_empty_result.yaml deleted file mode 100644 index 0f8e2f7..0000000 --- a/tests/fixtures/cassettes/templates_empty_result.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d35866a92cf86-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:12:04 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 -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 7a8fa11..0000000 --- a/tests/fixtures/cassettes/templates_get_single.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/templates/test-template-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d3581e8d4e294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:12:03 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/templates_list_basic.yaml b/tests/fixtures/cassettes/templates_list_basic.yaml deleted file mode 100644 index cfe6ff2..0000000 --- a/tests/fixtures/cassettes/templates_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d34802a46babc-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:11:22 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 -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 427bc30..0000000 --- a/tests/fixtures/cassettes/templates_list_no_params.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d357bfba996e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:12:02 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 -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 b8ce219..0000000 --- a/tests/fixtures/cassettes/templates_list_with_domain_filter.yaml +++ /dev/null @@ -1,48 +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/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}}' - headers: - CF-RAY: - - 966d35810b7396e0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:12:03 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 -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 4a22594..0000000 --- a/tests/fixtures/cassettes/templates_list_with_pagination.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d357e8add5165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:12:03 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 -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 26e9126..0000000 --- a/tests/fixtures/cassettes/tokens_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 9684c1d4ead555ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:23 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: 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 7fd5075..0000000 --- a/tests/fixtures/cassettes/tokens_builder_create_basic.yaml +++ /dev/null @@ -1,53 +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.0 (Python/3.13.5; OS/Darwin 24.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 - 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}}' - headers: - CF-RAY: - - 9684c1da4d44f969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:24 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: 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 2896ffc..0000000 --- a/tests/fixtures/cassettes/tokens_builder_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c1dd69b70380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:25 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/tokens_builder_get_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_get_not_found.yaml deleted file mode 100644 index 800117c..0000000 --- a/tests/fixtures/cassettes/tokens_builder_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/token/test-token-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 9684c1d958be8e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:24 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/tokens_builder_list_basic.yaml b/tests/fixtures/cassettes/tokens_builder_list_basic.yaml deleted file mode 100644 index 62511ff..0000000 --- a/tests/fixtures/cassettes/tokens_builder_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 9684c1d7480ea8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:24 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: 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 4af2ed7..0000000 --- a/tests/fixtures/cassettes/tokens_builder_list_with_custom_limit.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 9684c1d84fabc239-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:24 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: 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 46ab5b1..0000000 --- a/tests/fixtures/cassettes/tokens_builder_update_name_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c1dcad4b076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:25 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/tokens_builder_update_not_found.yaml b/tests/fixtures/cassettes/tokens_builder_update_not_found.yaml deleted file mode 100644 index d34abc8..0000000 --- a/tests/fixtures/cassettes/tokens_builder_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c1dbcfc4c687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:24 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/tokens_comprehensive_workflow.yaml b/tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml deleted file mode 100644 index 60fa9d5..0000000 --- a/tests/fixtures/cassettes/tokens_comprehensive_workflow.yaml +++ /dev/null @@ -1,253 +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/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}}' - headers: - CF-RAY: - - 9684c1de58e7e293-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:25 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: 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/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}}' - headers: - CF-RAY: - - 9684c1df6f06aeaa-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:25 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: 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/token/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 9684c1e12930a8bc-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:25 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - 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.0 (Python/3.13.5; OS/Darwin 24.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 - 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}}' - headers: - CF-RAY: - - 9684c1e219619857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:26 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: 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/token/another-non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 9684c1e41988870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:26 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/tokens_create_basic.yaml b/tests/fixtures/cassettes/tokens_create_basic.yaml deleted file mode 100644 index 89b3a0b..0000000 --- a/tests/fixtures/cassettes/tokens_create_basic.yaml +++ /dev/null @@ -1,54 +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.0 (Python/3.13.5; OS/Darwin 24.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 - 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}}' - headers: - CF-RAY: - - 9684c1cfdd8bb018-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:23 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: 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 d8ba273..0000000 --- a/tests/fixtures/cassettes/tokens_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c1d3fea65165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:23 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/tokens_empty_result.yaml b/tests/fixtures/cassettes/tokens_empty_result.yaml deleted file mode 100644 index c4b34f0..0000000 --- a/tests/fixtures/cassettes/tokens_empty_result.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 9684c1d6095fc687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:24 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: 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 e77630f..0000000 --- a/tests/fixtures/cassettes/tokens_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/token/test-token-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 9684c1cf1c92076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:22 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/tokens_list_basic.yaml b/tests/fixtures/cassettes/tokens_list_basic.yaml deleted file mode 100644 index c41142d..0000000 --- a/tests/fixtures/cassettes/tokens_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 9684c1cb1951e290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:22 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: 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 6895cad..0000000 --- a/tests/fixtures/cassettes/tokens_list_different_limit.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 9684c1ce19a2562e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:22 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: 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 8ddd8d9..0000000 --- a/tests/fixtures/cassettes/tokens_list_with_pagination.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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 9684c1ccb94c5165-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:22 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: 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 a3534ef..0000000 --- a/tests/fixtures/cassettes/tokens_update_name_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c1d329668e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:23 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/tokens_update_not_found.yaml b/tests/fixtures/cassettes/tokens_update_not_found.yaml deleted file mode 100644 index a547a7f..0000000 --- a/tests/fixtures/cassettes/tokens_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 9684c1d1cffde296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Fri, 01 Aug 2025 10:47:23 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/users_api_response_structure.yaml b/tests/fixtures/cassettes/users_api_response_structure.yaml deleted file mode 100644 index 9a4004b..0000000 --- a/tests/fixtures/cassettes/users_api_response_structure.yaml +++ /dev/null @@ -1,57 +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/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 - 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"}]}]}' - headers: - CF-RAY: - - 966d3dd0da9055ad-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:44 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 -version: 1 diff --git a/tests/fixtures/cassettes/users_delete.yaml b/tests/fixtures/cassettes/users_delete.yaml deleted file mode 100644 index 0cba603..0000000 --- a/tests/fixtures/cassettes/users_delete.yaml +++ /dev/null @@ -1,50 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d3dcb99ade298-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:43 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: 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 706ce90..0000000 --- a/tests/fixtures/cassettes/users_empty_result.yaml +++ /dev/null @@ -1,57 +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/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 - 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"}]}]}' - headers: - CF-RAY: - - 966d3dd268cbf969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:44 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 -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 f1865ef..0000000 --- a/tests/fixtures/cassettes/users_get_single.yaml +++ /dev/null @@ -1,48 +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/users/test-user-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d3dc78d3e71a6-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:42 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: 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 a7b8a41..0000000 --- a/tests/fixtures/cassettes/users_invite.yaml +++ /dev/null @@ -1,51 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d3dc919930a8e-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:42 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: 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 78ada38..0000000 --- a/tests/fixtures/cassettes/users_list_basic.yaml +++ /dev/null @@ -1,57 +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/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 - 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"}]}]}' - headers: - CF-RAY: - - 966d3ce4bb69dfc0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:06 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 -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 bf26f94..0000000 --- a/tests/fixtures/cassettes/users_list_with_pagination.yaml +++ /dev/null @@ -1,57 +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/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 - 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"}]}]}' - headers: - CF-RAY: - - 966d3dc5ff30e294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:42 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 -version: 1 diff --git a/tests/fixtures/cassettes/users_update.yaml b/tests/fixtures/cassettes/users_update.yaml deleted file mode 100644 index e5f12f7..0000000 --- a/tests/fixtures/cassettes/users_update.yaml +++ /dev/null @@ -1,51 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d3dca8c73bbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:17:42 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: 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 c779c03..0000000 --- a/tests/fixtures/cassettes/webhooks_api_response_structure.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.0 (Python/3.13.5; OS/Darwin 24.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 - 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}}' - headers: - CF-RAY: - - 966d41f71c6cf969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:33 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 -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 4ea15a7..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_create_basic.yaml +++ /dev/null @@ -1,53 +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.0 (Python/3.13.5; OS/Darwin 24.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":[]}}}' - headers: - CF-RAY: - - 966d4b3f4c543cc0-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:26: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: 201 - message: Created -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 7cdbde2..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d41fd1c07f339-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:34 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/webhooks_builder_get_not_found.yaml b/tests/fixtures/cassettes/webhooks_builder_get_not_found.yaml deleted file mode 100644 index b0777ac..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_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/webhooks/test-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d41fa8b17e295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:34 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/webhooks_builder_list_basic.yaml b/tests/fixtures/cassettes/webhooks_builder_list_basic.yaml deleted file mode 100644 index a509949..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_list_basic.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.0 (Python/3.13.5; OS/Darwin 24.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 - 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}}' - headers: - CF-RAY: - - 966d41f9888ee296-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:34 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 -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 442e11e..0000000 --- a/tests/fixtures/cassettes/webhooks_builder_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d41fc3acf0db0-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:34 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/webhooks_comprehensive_workflow.yaml b/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml deleted file mode 100644 index 58c4c70..0000000 --- a/tests/fixtures/cassettes/webhooks_comprehensive_workflow.yaml +++ /dev/null @@ -1,284 +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/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 - 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}}' - headers: - CF-RAY: - - 966d41fddf87bbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:35 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/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 - 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}}' - headers: - CF-RAY: - - 966d41feeb211b8b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:35 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/webhooks/non-existent-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d41ffddc6b01b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:35 GMT - Server: - - cloudflare - Transfer-Encoding: - - chunked - cf-cache-status: - - DYNAMIC - strict-transport-security: - - max-age=31536000; includeSubDomains - 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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d4200cacc076b-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:35 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: 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.0 (Python/3.13.5; OS/Darwin 24.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."]}}' - headers: - CF-RAY: - - 966d4201aa47bbed-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:35 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: 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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d42029ad4d814-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:35 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/webhooks_create_basic.yaml b/tests/fixtures/cassettes/webhooks_create_basic.yaml deleted file mode 100644 index 862085d..0000000 --- a/tests/fixtures/cassettes/webhooks_create_basic.yaml +++ /dev/null @@ -1,53 +0,0 @@ -interactions: -- request: - body: '{"url": "https://example.com/webhook", "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: - - '163' - 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/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":[]}}}' - headers: - CF-RAY: - - 966d41ed596be290-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:32 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: 201 - message: Created -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 14b0def..0000000 --- a/tests/fixtures/cassettes/webhooks_create_invalid_domain.yaml +++ /dev/null @@ -1,150 +0,0 @@ -interactions: -- request: - body: '{"url": "https://example.com/webhook", "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: - - '164' - 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/webhooks - response: - body: - string: "{\n \"message\": \"You cannot create a resource at the moment. Please - wait a while before retrying.\"\n}" - headers: - CF-RAY: - - 966d41ee89240380-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:32 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: 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}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '164' - 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/webhooks - response: - body: - string: "{\n \"message\": \"You cannot create a resource at the moment. Please - wait a while before retrying.\"\n}" - headers: - CF-RAY: - - 966d41ef8eadf969-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:32 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: 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}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '164' - 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/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. - #MS42209"]}}' - headers: - CF-RAY: - - 966d41f4396ee294-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:33 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: 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 9a0f7f4..0000000 --- a/tests/fixtures/cassettes/webhooks_delete_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d41f64f86c687-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:33 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/webhooks_empty_result.yaml b/tests/fixtures/cassettes/webhooks_empty_result.yaml deleted file mode 100644 index d7d79ad..0000000 --- a/tests/fixtures/cassettes/webhooks_empty_result.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.0 (Python/3.13.5; OS/Darwin 24.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 - 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}}' - headers: - CF-RAY: - - 966d41f89e2d870d-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:34 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 -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 c945fac..0000000 --- a/tests/fixtures/cassettes/webhooks_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/webhooks/test-webhook-id - response: - body: - string: "{\n \"message\": \"Resource not found.\"\n}" - headers: - CF-RAY: - - 966d41ec0cb38e88-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:32 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/webhooks_list_basic.yaml b/tests/fixtures/cassettes/webhooks_list_basic.yaml deleted file mode 100644 index e469b4d..0000000 --- a/tests/fixtures/cassettes/webhooks_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.0 (Python/3.13.5; OS/Darwin 24.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}}' - headers: - CF-RAY: - - 966d41e8fd6fe295-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:31 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 -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 19e629f..0000000 --- a/tests/fixtures/cassettes/webhooks_list_invalid_domain.yaml +++ /dev/null @@ -1,47 +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/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: - - 966d4b3e0b65a638-VIE - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:26:53 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: 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 2a5efc7..0000000 --- a/tests/fixtures/cassettes/webhooks_update_not_found.yaml +++ /dev/null @@ -1,46 +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.0 (Python/3.13.5; OS/Darwin 24.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: - - 966d41f52b339857-BEG - Cache-Control: - - no-cache, private - Connection: - - keep-alive - Content-Encoding: - - gzip - Content-Type: - - application/json - Date: - - Tue, 29 Jul 2025 14:20:33 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/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 c1c2260..c682cc6 100644 --- a/tests/unit/test_activity_resource.py +++ b/tests/unit/test_activity_resource.py @@ -1,6 +1,9 @@ +"""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 +12,75 @@ 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": "