|
22 | 22 | CreateEmailRequestAttachment,
|
23 | 23 | CreateEmailResponse,
|
24 | 24 | Domain,
|
| 25 | + DomainLastStatus, |
25 | 26 | Email,
|
26 | 27 | ListDomainsResponse,
|
27 | 28 | ListEmailsResponse,
|
|
39 | 40 | unmarshal_Domain,
|
40 | 41 | unmarshal_Email,
|
41 | 42 | unmarshal_CreateEmailResponse,
|
| 43 | + unmarshal_DomainLastStatus, |
42 | 44 | unmarshal_ListDomainsResponse,
|
43 | 45 | unmarshal_ListEmailsResponse,
|
44 | 46 | unmarshal_Statistics,
|
@@ -219,7 +221,7 @@ async def list_emails(
|
219 | 221 | :param since: (Optional) List emails created after this date.
|
220 | 222 | :param until: (Optional) List emails created before this date.
|
221 | 223 | :param mail_from: (Optional) List emails sent with this sender's email address.
|
222 |
| - :param mail_to: (Deprecated) List emails sent to this recipient's email address. |
| 224 | + :param mail_to: List emails sent to this recipient's email address. |
223 | 225 | :param mail_rcpt: (Optional) List emails sent to this recipient's email address.
|
224 | 226 | :param statuses: (Optional) List emails with any of these statuses.
|
225 | 227 | :param subject: (Optional) List emails with this subject.
|
@@ -292,7 +294,7 @@ async def list_emails_all(
|
292 | 294 | :param since: (Optional) List emails created after this date.
|
293 | 295 | :param until: (Optional) List emails created before this date.
|
294 | 296 | :param mail_from: (Optional) List emails sent with this sender's email address.
|
295 |
| - :param mail_to: (Deprecated) List emails sent to this recipient's email address. |
| 297 | + :param mail_to: List emails sent to this recipient's email address. |
296 | 298 | :param mail_rcpt: (Optional) List emails sent to this recipient's email address.
|
297 | 299 | :param statuses: (Optional) List emails with any of these statuses.
|
298 | 300 | :param subject: (Optional) List emails with this subject.
|
@@ -678,3 +680,35 @@ async def check_domain(
|
678 | 680 |
|
679 | 681 | self._throw_on_error(res)
|
680 | 682 | return unmarshal_Domain(res.json())
|
| 683 | + |
| 684 | + async def check_domain_last_status( |
| 685 | + self, |
| 686 | + *, |
| 687 | + domain_id: str, |
| 688 | + region: Optional[Region] = None, |
| 689 | + ) -> DomainLastStatus: |
| 690 | + """ |
| 691 | + Display SPF and DKIM records status and potential errors. |
| 692 | + Display SPF and DKIM records status and potential errors, including the found records to make debugging easier. |
| 693 | + :param region: Region to target. If none is passed will use default region from the config. |
| 694 | + :param domain_id: ID of the domain to delete. |
| 695 | + :return: :class:`DomainLastStatus <DomainLastStatus>` |
| 696 | +
|
| 697 | + Usage: |
| 698 | + :: |
| 699 | +
|
| 700 | + result = await api.check_domain_last_status(domain_id="example") |
| 701 | + """ |
| 702 | + |
| 703 | + param_region = validate_path_param( |
| 704 | + "region", region or self.client.default_region |
| 705 | + ) |
| 706 | + param_domain_id = validate_path_param("domain_id", domain_id) |
| 707 | + |
| 708 | + res = self._request( |
| 709 | + "POST", |
| 710 | + f"/transactional-email/v1alpha1/regions/{param_region}/domains/{param_domain_id}/verification", |
| 711 | + ) |
| 712 | + |
| 713 | + self._throw_on_error(res) |
| 714 | + return unmarshal_DomainLastStatus(res.json()) |
0 commit comments