11from mpt_api_client .http import AsyncHTTPClient , HTTPClient
2+ from mpt_api_client .resources .notifications .accounts import AccountsService , AsyncAccountsService
23from mpt_api_client .resources .notifications .batches import AsyncBatchesService , BatchesService
34from mpt_api_client .resources .notifications .categories import (
45 AsyncCategoriesService ,
56 CategoriesService ,
67)
78from mpt_api_client .resources .notifications .contacts import AsyncContactsService , ContactsService
89from mpt_api_client .resources .notifications .messages import AsyncMessagesService , MessagesService
10+ from mpt_api_client .resources .notifications .subscribers import (
11+ AsyncSubscribersService ,
12+ SubscribersService ,
13+ )
914
1015
1116class Notifications :
@@ -14,6 +19,28 @@ class Notifications:
1419 def __init__ (self , http_client : HTTPClient ):
1520 self .http_client = http_client
1621
22+ def accounts (self , account_id : str , category_id : str ) -> AccountsService :
23+ """Accounts service.
24+
25+ Returns contacts, which are configured to receive notifications.
26+
27+ Parms:
28+ account_id: Account ID
29+ category_id: Category ID
30+
31+ Returns:
32+ AccountsService
33+ """
34+ return AccountsService (
35+ http_client = self .http_client ,
36+ endpoint_params = {"account_id" : account_id , "category_id" : category_id },
37+ )
38+
39+ @property
40+ def batches (self ) -> BatchesService :
41+ """Batches service."""
42+ return BatchesService (http_client = self .http_client )
43+
1744 @property
1845 def categories (self ) -> CategoriesService :
1946 """Categories service."""
@@ -30,9 +57,9 @@ def messages(self) -> MessagesService:
3057 return MessagesService (http_client = self .http_client )
3158
3259 @property
33- def batches (self ) -> BatchesService :
34- """Batches service."""
35- return BatchesService (http_client = self .http_client )
60+ def subscribers (self ) -> SubscribersService :
61+ """Subscriptions service."""
62+ return SubscribersService (http_client = self .http_client )
3663
3764
3865class AsyncNotifications :
@@ -41,6 +68,28 @@ class AsyncNotifications:
4168 def __init__ (self , http_client : AsyncHTTPClient ):
4269 self .http_client = http_client
4370
71+ def accounts (self , account_id : str , category_id : str ) -> AsyncAccountsService :
72+ """Async Accounts service.
73+
74+ Returns contacts, which are configured to receive notifications.
75+
76+ Parms:
77+ account_id: Account ID
78+ category_id: Category ID
79+
80+ Returns:
81+ AccountsService
82+ """
83+ return AsyncAccountsService (
84+ http_client = self .http_client ,
85+ endpoint_params = {"account_id" : account_id , "category_id" : category_id },
86+ )
87+
88+ @property
89+ def batches (self ) -> AsyncBatchesService :
90+ """Batches service."""
91+ return AsyncBatchesService (http_client = self .http_client )
92+
4493 @property
4594 def categories (self ) -> AsyncCategoriesService :
4695 """Categories service."""
@@ -57,6 +106,6 @@ def messages(self) -> AsyncMessagesService:
57106 return AsyncMessagesService (http_client = self .http_client )
58107
59108 @property
60- def batches (self ) -> AsyncBatchesService :
61- """Async Batches service."""
62- return AsyncBatchesService (http_client = self .http_client )
109+ def subscribers (self ) -> AsyncSubscribersService :
110+ """Subscriptions service."""
111+ return AsyncSubscribersService (http_client = self .http_client )
0 commit comments