public function createRequestOptionsWithReportDefinition(
        ReportDefinition $reportDefinition,
        ReportSettings $reportSettingsOverride = null
    ) {
        $params = [];
        $context = ['xml_root_node_name' => 'reportDefinition'];
        $params['__rdxml'] = $this->reportDefinitionSerializer->serialize(
            $reportDefinition,
            'xml',
            $context
        );

        return array_merge(
            $this->options,
            [
                RequestOptions::HEADERS =>
                    $this->createHeaders($reportSettingsOverride),
                RequestOptions::FORM_PARAMS => $params,
            ]
        );
    }