protected function calculateOptionsForParams(string $requestMethod, array $params, string $accessToken): array
    {
        $options = $this->prepareBaseOptions($accessToken);
        if (0 === \count($params)) {
            return $options;
        }

        switch ($requestMethod) {
            case RequestMethodEnum::GET:
            case RequestMethodEnum::DELETE:
                $options['query'] = $params;
                break;
            case RequestMethodEnum::PUT:
            case RequestMethodEnum::POST:
                $options['form_params'] = $params;
                break;
            case RequestMethodEnum::UPLOAD:
                if (array_key_exists('resource', $params) && array_key_exists('name', $params)) {
                    $options['headers']['X-File-Name'] = $params['name'];
                    $options['multipart'] = [
                        [
                            'contents' => $params['resource'],
                            'name' => $params['name'],
                        ],
                    ];
                }
                break;
            default:
                throw new \InvalidArgumentException(sprintf('Request method "%s" not allowed!', $requestMethod));
        }

        return $options;
    }