Example #1
0
 def update_by_id(
         self, id: str, version: int,
         actions: List[types.ChannelUpdateAction]) -> types.Channel:
     update_action = types.ChannelUpdate(version=version, actions=actions)
     return self._client._post(
         f"channels/{id}",
         {},
         update_action,
         schemas.ChannelUpdateSchema,
         schemas.ChannelSchema,
     )
 def update_by_id(
     self,
     id: str,
     version: int,
     actions: List[types.ChannelUpdateAction],
     expand: OptionalListStr = None,
     *,
     force_update: bool = False,
 ) -> types.Channel:
     query_params = {}
     if expand:
         query_params["expand"] = expand
     update_action = types.ChannelUpdate(version=version, actions=actions)
     return self._client._post(
         endpoint=f"channels/{id}",
         params=query_params,
         data_object=update_action,
         request_schema_cls=schemas.ChannelUpdateSchema,
         response_schema_cls=schemas.ChannelSchema,
         force_update=force_update,
     )
 def post_load(self, data, **kwargs):
     return types.ChannelUpdate(**data)