public function transformResponse($api, $endpoint, Response $responseIn, Response $responseOut)
    {
        $transformations = $this->getResponseTransformations($api, $endpoint);
        foreach ($transformations as $transformation) {
            $transformedRequest = $transformation->transformResponse($responseIn, $responseOut);
            $responseOut = $transformedRequest instanceof Response ? $transformedRequest : $responseOut;
        }
        return $responseOut;
    }