44)
55from mpt_api_client .http .mixins import (
66 AsyncCollectionMixin ,
7- AsyncCreateMixin ,
8- AsyncDeleteMixin ,
7+ AsyncManagedResourceMixin ,
98 CollectionMixin ,
10- CreateMixin ,
11- DeleteMixin ,
9+ ManagedResourceMixin ,
1210)
1311from mpt_api_client .models import Model , ResourceData
1412from mpt_api_client .resources .catalog .pricing_policy_attachments import (
@@ -30,8 +28,7 @@ class PricingPoliciesServiceConfig:
3028
3129
3230class PricingPoliciesService ( # noqa: WPS215
33- CreateMixin [PricingPolicy ],
34- DeleteMixin ,
31+ ManagedResourceMixin [PricingPolicy ],
3532 CollectionMixin [PricingPolicy ],
3633 Service [PricingPolicy ],
3734 PricingPoliciesServiceConfig ,
@@ -45,7 +42,9 @@ def attachments(self, pricing_policy_id: str) -> PricingPolicyAttachmentsService
4542 endpoint_params = {"pricing_policy_id" : pricing_policy_id },
4643 )
4744
48- def activate (self , resource_id : str , resource_data : ResourceData ) -> PricingPolicy :
45+ def activate (
46+ self , resource_id : str , resource_data : ResourceData | None = None
47+ ) -> PricingPolicy :
4948 """Activate pricing policy.
5049
5150 Args:
@@ -57,7 +56,7 @@ def activate(self, resource_id: str, resource_data: ResourceData) -> PricingPoli
5756 """
5857 return self ._resource_action (resource_id , "POST" , "activate" , json = resource_data )
5958
60- def disable (self , resource_id : str , resource_data : ResourceData ) -> PricingPolicy :
59+ def disable (self , resource_id : str , resource_data : ResourceData | None = None ) -> PricingPolicy :
6160 """Disable pricing policy.
6261
6362 Args:
@@ -71,8 +70,7 @@ def disable(self, resource_id: str, resource_data: ResourceData) -> PricingPolic
7170
7271
7372class AsyncPricingPoliciesService (
74- AsyncCreateMixin [PricingPolicy ],
75- AsyncDeleteMixin ,
73+ AsyncManagedResourceMixin [PricingPolicy ],
7674 AsyncCollectionMixin [PricingPolicy ],
7775 AsyncService [PricingPolicy ],
7876 PricingPoliciesServiceConfig ,
@@ -86,7 +84,9 @@ def attachments(self, pricing_policy_id: str) -> AsyncPricingPolicyAttachmentsSe
8684 endpoint_params = {"pricing_policy_id" : pricing_policy_id },
8785 )
8886
89- async def activate (self , resource_id : str , resource_data : ResourceData ) -> PricingPolicy :
87+ async def activate (
88+ self , resource_id : str , resource_data : ResourceData | None = None
89+ ) -> PricingPolicy :
9090 """Activate pricing policy.
9191
9292 Args:
@@ -98,7 +98,9 @@ async def activate(self, resource_id: str, resource_data: ResourceData) -> Prici
9898 """
9999 return await self ._resource_action (resource_id , "POST" , "activate" , json = resource_data )
100100
101- async def disable (self , resource_id : str , resource_data : ResourceData ) -> PricingPolicy :
101+ async def disable (
102+ self , resource_id : str , resource_data : ResourceData | None = None
103+ ) -> PricingPolicy :
102104 """Disable pricing policy.
103105
104106 Args:
0 commit comments