def update_by_id(
         self, id: str, version: int,
         actions: List[types.SubscriptionUpdateAction]
 ) -> types.Subscription:
     update_action = types.SubscriptionUpdate(version=version,
                                              actions=actions)
     return self._client._post(
         f"subscriptions/{id}",
         {},
         update_action,
         schemas.SubscriptionUpdateSchema,
         schemas.SubscriptionSchema,
     )
 def update_by_id(
     self,
     id: str,
     version: int,
     actions: List[types.SubscriptionUpdateAction],
     *,
     force_update: bool = False,
 ) -> types.Subscription:
     update_action = types.SubscriptionUpdate(version=version, actions=actions)
     return self._client._post(
         endpoint=f"subscriptions/{id}",
         params={},
         data_object=update_action,
         request_schema_cls=schemas.SubscriptionUpdateSchema,
         response_schema_cls=schemas.SubscriptionSchema,
         force_update=force_update,
     )
Example #3
0
 def post_load(self, data, **kwargs):
     return types.SubscriptionUpdate(**data)