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 [](./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("
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}} 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 Second Email First Email Second Email This is a test email This is a test email This is a test email This is a test email This is a test
- email This is a test email This is a test email This is a test email This is a test email This is a test email 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_activity.py b/tests/integration/test_activity.py
index 4381fac..4ce79b2 100644
--- a/tests/integration/test_activity.py
+++ b/tests/integration/test_activity.py
@@ -1,8 +1,7 @@
import pytest
import os
-import time
-from datetime import datetime, timedelta
-from tests.test_helpers import vcr, email_client
+from datetime import datetime
+from tests.test_helpers import vcr
from mailersend.models.activity import ActivityRequest, ActivityQueryParams
from mailersend.models.base import APIResponse
diff --git a/tests/integration/test_analytics.py b/tests/integration/test_analytics.py
index cb207f5..893a203 100644
--- a/tests/integration/test_analytics.py
+++ b/tests/integration/test_analytics.py
@@ -1,9 +1,7 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
from datetime import datetime, timezone, timedelta
-from mailersend import MailerSendClient, AnalyticsBuilder
from mailersend.models.analytics import AnalyticsRequest
-from mailersend.exceptions import ValidationError
@pytest.fixture
@@ -12,7 +10,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 +266,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 +293,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_domains.py b/tests/integration/test_domains.py
index 78e9ee7..6dc1356 100644
--- a/tests/integration/test_domains.py
+++ b/tests/integration/test_domains.py
@@ -1,8 +1,6 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
-import time
-from datetime import datetime, timezone
from mailersend.builders.domains import DomainsBuilder
from mailersend.models.domains import (
diff --git a/tests/integration/test_email_send.py b/tests/integration/test_email_send.py
index f2c44c3..26ca9db 100644
--- a/tests/integration/test_email_send.py
+++ b/tests/integration/test_email_send.py
@@ -1,8 +1,7 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
import base64
-from datetime import datetime
from mailersend.models.email import (
EmailContact,
diff --git a/tests/integration/test_identities.py b/tests/integration/test_identities.py
index 54df4f7..3686ad4 100644
--- a/tests/integration/test_identities.py
+++ b/tests/integration/test_identities.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.identities import (
@@ -13,7 +13,6 @@
IdentityDeleteByEmailRequest,
IdentityListQueryParams,
)
-from mailersend.models.base import APIResponse
@pytest.fixture
diff --git a/tests/integration/test_inbound.py b/tests/integration/test_inbound.py
index 988fdc1..1fc32e9 100644
--- a/tests/integration/test_inbound.py
+++ b/tests/integration/test_inbound.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.inbound import (
@@ -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_messages.py b/tests/integration/test_messages.py
index c87d5c3..ff10147 100644
--- a/tests/integration/test_messages.py
+++ b/tests/integration/test_messages.py
@@ -1,6 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
-import os
+from tests.test_helpers import vcr
from mailersend.models.messages import (
MessagesListRequest,
diff --git a/tests/integration/test_recipients.py b/tests/integration/test_recipients.py
index 72ed25f..8d4877b 100644
--- a/tests/integration/test_recipients.py
+++ b/tests/integration/test_recipients.py
@@ -1,6 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
-import os
+from tests.test_helpers import vcr
from mailersend.models.recipients import (
RecipientsListRequest,
@@ -144,7 +143,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,14 +209,12 @@ 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")
def test_add_to_blocklist_invalid_domain(self, email_client):
"""Test adding to blocklist with invalid domain ID returns 422."""
from mailersend.exceptions import BadRequestError
- from mailersend.models.recipients import SuppressionAddRequest
request = SuppressionAddRequest(
domain_id="test-domain-id", # Invalid domain ID
@@ -237,7 +233,6 @@ def test_add_to_blocklist_invalid_domain(self, email_client):
def test_add_hard_bounces_invalid_domain(self, email_client):
"""Test adding hard bounces with invalid domain ID returns 422."""
from mailersend.exceptions import BadRequestError
- from mailersend.models.recipients import SuppressionAddRequest
request = SuppressionAddRequest(
domain_id="test-domain-id", # Invalid domain ID
@@ -256,7 +251,6 @@ def test_add_hard_bounces_invalid_domain(self, email_client):
def test_add_spam_complaints_invalid_domain(self, email_client):
"""Test adding spam complaints with invalid domain ID returns 422."""
from mailersend.exceptions import BadRequestError
- from mailersend.models.recipients import SuppressionAddRequest
request = SuppressionAddRequest(
domain_id="test-domain-id", # Invalid domain ID
@@ -275,7 +269,6 @@ def test_add_spam_complaints_invalid_domain(self, email_client):
def test_add_unsubscribes_invalid_domain(self, email_client):
"""Test adding unsubscribes with invalid domain ID returns 422."""
from mailersend.exceptions import BadRequestError
- from mailersend.models.recipients import SuppressionAddRequest
request = SuppressionAddRequest(
domain_id="test-domain-id", # Invalid domain ID
@@ -294,7 +287,6 @@ def test_add_unsubscribes_invalid_domain(self, email_client):
def test_delete_from_blocklist_invalid_domain(self, email_client):
"""Test deleting from blocklist with invalid domain ID returns 422."""
from mailersend.exceptions import BadRequestError
- from mailersend.models.recipients import SuppressionDeleteRequest
request = SuppressionDeleteRequest(
domain_id="test-domain-id", # Invalid domain ID
@@ -313,7 +305,6 @@ def test_delete_from_blocklist_invalid_domain(self, email_client):
def test_comprehensive_recipients_workflow_invalid_domain(self, email_client):
"""Test comprehensive workflow with invalid domain ID returns errors."""
from mailersend.exceptions import BadRequestError
- from mailersend.models.recipients import SuppressionAddRequest
# Step 1: Try to add recipient to blocklist (should fail with invalid domain)
add_request = SuppressionAddRequest(
diff --git a/tests/integration/test_schedules.py b/tests/integration/test_schedules.py
index f382938..b8c9e3b 100644
--- a/tests/integration/test_schedules.py
+++ b/tests/integration/test_schedules.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.schedules import (
diff --git a/tests/integration/test_sms_activity.py b/tests/integration/test_sms_activity.py
index 8a79916..d68c6ce 100644
--- a/tests/integration/test_sms_activity.py
+++ b/tests/integration/test_sms_activity.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
import time
diff --git a/tests/integration/test_sms_messages.py b/tests/integration/test_sms_messages.py
index 2a4d4aa..ac9f845 100644
--- a/tests/integration/test_sms_messages.py
+++ b/tests/integration/test_sms_messages.py
@@ -1,6 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
-import os
+from tests.test_helpers import vcr
from mailersend.models.sms_messages import (
SmsMessagesListRequest,
diff --git a/tests/integration/test_sms_numbers.py b/tests/integration/test_sms_numbers.py
index 71f83f7..827b1f2 100644
--- a/tests/integration/test_sms_numbers.py
+++ b/tests/integration/test_sms_numbers.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.sms_numbers import (
diff --git a/tests/integration/test_sms_recipients.py b/tests/integration/test_sms_recipients.py
index 538a2bc..77ac8d6 100644
--- a/tests/integration/test_sms_recipients.py
+++ b/tests/integration/test_sms_recipients.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.sms_recipients import (
diff --git a/tests/integration/test_sms_sending.py b/tests/integration/test_sms_sending.py
index 9943a1d..3ace4a9 100644
--- a/tests/integration/test_sms_sending.py
+++ b/tests/integration/test_sms_sending.py
@@ -1,12 +1,11 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.sms_sending import (
SmsSendRequest,
SmsPersonalization,
)
-from mailersend.models.base import APIResponse
@pytest.fixture
diff --git a/tests/integration/test_sms_webhooks.py b/tests/integration/test_sms_webhooks.py
index e9ae08a..b1cbcdb 100644
--- a/tests/integration/test_sms_webhooks.py
+++ b/tests/integration/test_sms_webhooks.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.sms_webhooks import (
@@ -11,7 +11,6 @@
SmsWebhooksListQueryParams,
SmsWebhookEvent,
)
-from mailersend.models.base import APIResponse
@pytest.fixture
diff --git a/tests/integration/test_smtp_users.py b/tests/integration/test_smtp_users.py
index 933cc5b..5e3d91e 100644
--- a/tests/integration/test_smtp_users.py
+++ b/tests/integration/test_smtp_users.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.smtp_users import (
@@ -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_templates.py b/tests/integration/test_templates.py
index c5c7bb9..e8c097b 100644
--- a/tests/integration/test_templates.py
+++ b/tests/integration/test_templates.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.templates import (
diff --git a/tests/integration/test_tokens.py b/tests/integration/test_tokens.py
index 28ffd6a..c781339 100644
--- a/tests/integration/test_tokens.py
+++ b/tests/integration/test_tokens.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.tokens import (
diff --git a/tests/integration/test_users.py b/tests/integration/test_users.py
index 57109b0..38775da 100644
--- a/tests/integration/test_users.py
+++ b/tests/integration/test_users.py
@@ -1,6 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
-import os
+from tests.test_helpers import vcr
from mailersend.models.users import (
UsersListRequest,
diff --git a/tests/integration/test_webhooks.py b/tests/integration/test_webhooks.py
index 6f0bdd0..d6850b4 100644
--- a/tests/integration/test_webhooks.py
+++ b/tests/integration/test_webhooks.py
@@ -1,5 +1,5 @@
import pytest
-from tests.test_helpers import vcr, email_client
+from tests.test_helpers import vcr
import os
from mailersend.models.webhooks import (
@@ -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": "