|
| 1 | +from typing import Optional |
| 2 | + |
| 3 | +from hostingde.paginator import HostingDePaginator |
| 4 | +from hostingde.hostingde import HostingDeCore |
| 5 | +from hostingde.model.filter import FilterElement |
| 6 | +from hostingde.model.sort import SortConfiguration |
| 7 | +from hostingde.model.ssl import Certificate |
| 8 | + |
| 9 | + |
| 10 | +class SslClient(HostingDeCore): |
| 11 | + def __init__(self, parent: HostingDeCore): |
| 12 | + """ |
| 13 | + Construct a new Account client |
| 14 | +
|
| 15 | + :param parent: The parent to retrieve the session from |
| 16 | + """ |
| 17 | + super().__init__(parent) |
| 18 | + |
| 19 | + def build_uri(self, method: str) -> str: |
| 20 | + """ |
| 21 | + Utility method to easily construct URLs for this service. |
| 22 | +
|
| 23 | + :param method: The method within this service |
| 24 | + :return: The URL string |
| 25 | + """ |
| 26 | + return self._build_uri('ssl', method) |
| 27 | + |
| 28 | + def certificates_find( |
| 29 | + self, |
| 30 | + limit: Optional[int] = None, |
| 31 | + filter: Optional[FilterElement] = None, |
| 32 | + sort: Optional[SortConfiguration] = None, |
| 33 | + page: Optional[int] = None, |
| 34 | + *args: list, |
| 35 | + **kwargs: dict |
| 36 | + ) -> HostingDePaginator[Certificate]: |
| 37 | + """ |
| 38 | + List SSL certificates |
| 39 | +
|
| 40 | + :param limit: The limit of objects to retrieve per call. If not set, defaults to 25. |
| 41 | + :param filter: A filter that is applied to the query |
| 42 | + :param sort: Configuration how results are sorted. |
| 43 | + :param page: The page to retrieve. If limit is unset, 25 items will be retrieved. |
| 44 | + :return: An iterator that yields Zone objects. |
| 45 | + """ |
| 46 | + |
| 47 | + uri = self._build_uri('ssl', 'certificatesFind') |
| 48 | + |
| 49 | + return self._iter(uri, Certificate, filter, limit, sort, page) |
0 commit comments