Пример #1
0
 def update_by_key(
         self, key: str, version: int,
         actions: typing.List[types.TypeUpdateAction]) -> types.Type:
     update_action = types.TypeUpdate(version=version, actions=actions)
     return self._client._post(
         f"types/key={key}",
         {},
         update_action,
         schemas.TypeUpdateSchema,
         schemas.TypeSchema,
     )
Пример #2
0
 def update_by_key(
     self,
     key: str,
     version: int,
     actions: typing.List[types.TypeUpdateAction],
     *,
     force_update: bool = False,
 ) -> types.Type:
     update_action = types.TypeUpdate(version=version, actions=actions)
     return self._client._post(
         endpoint=f"types/key={key}",
         params={},
         data_object=update_action,
         request_schema_cls=schemas.TypeUpdateSchema,
         response_schema_cls=schemas.TypeSchema,
         force_update=force_update,
     )
Пример #3
0
 def update_by_key(
     self,
     key: str,
     version: int,
     actions: typing.List[types.TypeUpdateAction],
     expand: OptionalListStr = None,
     *,
     force_update: bool = False,
 ) -> types.Type:
     query_params = {}
     if expand:
         query_params["expand"] = expand
     update_action = types.TypeUpdate(version=version, actions=actions)
     return self._client._post(
         endpoint=f"types/key={key}",
         params=query_params,
         data_object=update_action,
         request_schema_cls=schemas.TypeUpdateSchema,
         response_schema_cls=schemas.TypeSchema,
         force_update=force_update,
     )
 def post_load(self, data, **kwargs):
     return types.TypeUpdate(**data)
Пример #5
0
 def post_load(self, data):
     return types.TypeUpdate(**data)