public function getPlan(string $planCode): array
    {
        $cacheKey = sprintf('plan_%s', $planCode);
        $hit = $this->getFromCache($cacheKey);

        if (false === $hit) {
            $response = $this->sendRequest('GET', sprintf('plans/%s', $planCode));

            $data = $this->processResponse($response);
            $plan = $data['plan'];

            $this->saveToCache($cacheKey, $plan);

            return $plan;
        }

        return $hit;
    }
public function getPlan(string $planCode): array
    {
        $cacheKey = sprintf('plan_%s', $planCode);
        $hit = $this->getFromCache($cacheKey);

        if (false === $hit) {
            $response = $this->sendRequest('GET', sprintf('plans/%s', $planCode));

            $data = $this->processResponse($response);
            $plan = $data['plan'];

            $this->saveToCache($cacheKey, $plan);

            return $plan;
        }

        return $hit;
    }
Returns a Plan by its identifier.

@param string $planCode

@throws \Exception

@return array