productId = $productId; $this->variation = $variation; } public static function fromBody(array $body): Product { return new Product( $body['productId'] ?? null, $body['variation'] ?? [] ); } }