public function serialize($serializer = ApiDataSerializer::class): array
	{
		if (! is_a($serializer, SerializerAbstract::class, true)) {
			throw new \InvalidArgumentException(
				sprintf('The serializer must either be an instance,
				or string representation of %s. The passed value %s is neither.',
					SerializerAbstract::class,
					$serializer
				)
			);
		}

		$this->serializer = is_string($serializer) ? new $serializer : $serializer;

		$this->manager->setSerializer($this->serializer);

		return $this->manager->createData($this->resource)->toArray();
	}