/**
  * Parse and build a rich response object from an HTTP response.
  *
  * @param ResponseInterface $response
  *
  * @return BaseResponse
  * @throws WhoamiResponse
  */
 public function makeFromResponse(ResponseInterface $response)
 {
     $body = $this->parse($response);
     $whoamiResponse = new WhoamiResponse();
     $user = new User();
     $user->fill(Arr::dotGet($body, 'user'));
     $whoamiResponse->setUser($user);
     $organization = new Organization();
     $organization->fill(Arr::dotGet($body, 'organization'));
     $whoamiResponse->setOrganization($organization);
     return $whoamiResponse;
 }
 /**
  * @return string
  */
 public function getAccountName()
 {
     return $this->organization->getName();
 }