function __construct(ResponseInterface $response) { $this->response = $response; $this->data = $this->getDataFromResponse($response); }