def update_by_key( self, key: str, version: int, actions: List[types.CustomerUpdateAction], expand: OptionalListStr = None, *, force_update: bool = False, ) -> types.Customer: query_params = {} if expand: query_params["expand"] = expand update_action = types.CustomerUpdate(version=version, actions=actions) return self._client._post( f"customers/key={key}", query_params, data_object=update_action, request_schema_cls=schemas.CustomerUpdateSchema, response_schema_cls=schemas.CustomerSchema, force_update=force_update, )
def post_load(self, data): return types.CustomerUpdate(**data)