-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaccounts.py
More file actions
34 lines (23 loc) · 936 Bytes
/
accounts.py
File metadata and controls
34 lines (23 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from mpt_api_client.exceptions import MPTError
from mpt_api_client.http import AsyncService, Service
from mpt_api_client.http.mixins import AsyncCollectionMixin, CollectionMixin
from mpt_api_client.models import Model
class MethodNotAllowedError(MPTError):
"""Method not allowed error."""
class NotificationContact(Model):
"""Notification Contact resource."""
class AccountsServiceConfig:
"""Accounts service config."""
_endpoint = "/public/v1/notifications/accounts/{account_id}/categories/{category_id}/contacts"
_model_class = NotificationContact
_collection_key = "data"
class AccountsService(
CollectionMixin[NotificationContact], Service[NotificationContact], AccountsServiceConfig
):
"""Accounts service."""
class AsyncAccountsService(
AsyncCollectionMixin[NotificationContact],
AsyncService[NotificationContact],
AccountsServiceConfig,
):
"""Async Accounts service."""