/// <summary>
        /// Request an offer export file containing all offers.
        /// </summary>
        /// <param name="exportConfiguration">The file format in which to return the export. Defaults to "CSV"</param>
        /// <returns></returns>
        public async Task <StatusResponse> RequestOfferExportFile(OfferExportConfiguration exportConfiguration = null)
        {
            if (exportConfiguration == null)
            {
                exportConfiguration = new OfferExportConfiguration();
            }
            using (var content = BolApiHelper.BuildContentFromObject(exportConfiguration))
            {
                var response = await Post("/offers/export", content).ConfigureAwait(false);

                return(await BolApiHelper.GetContentFromResponse <StatusResponse>(response).ConfigureAwait(false));
            }
        }
        /// <summary>
        /// Requests and Retrieves offer export file containing all offers.
        /// *Warning*
        /// Can take up to multiple minutes to complete, depending on how fast bol creates its csv
        /// If called once subsequent calls will fail until BOL has released its delay for repeating this process (somewhere between 30 minutes - 1 hour)
        /// </summary>
        /// <param name="exportConfiguration">The file format in which to return the export. Defaults to "CSV"</param>
        /// <param name="maxMsDuration">The maximum amount of milliseconds this task is allowed to take. (overwritten by passing a cancellationToken)</param>
        /// <param name="cancellationToken">Cancellation token allowing customized cancellation configuration, overwrites maxMsDuration.</param>
        /// <returns></returns>
        public async Task <string> GetOfferExportFile(OfferExportConfiguration exportConfiguration = null, int maxMsDuration = 1200000, CancellationToken?cancellationToken = null)
        {
            CancellationToken innerCancellationToken;

            if (cancellationToken == null)
            {
                var source = new CancellationTokenSource();
                source.CancelAfter(maxMsDuration);
                innerCancellationToken = source.Token;
            }
            else
            {
                innerCancellationToken = (CancellationToken)cancellationToken;
            }
            if (exportConfiguration == null)
            {
                exportConfiguration = new OfferExportConfiguration();
            }
            var offerExportRequest = await RequestOfferExportFile(exportConfiguration).ConfigureAwait(false);

            ProcessStatus exportStatus = null;
            var           firstRequest = true;

            while (exportStatus == null || exportStatus.Status != "SUCCESS")
            {
                if (firstRequest)
                {
                    await Task.Delay(1000, innerCancellationToken).ConfigureAwait(false);

                    firstRequest = false;
                }
                exportStatus = await BolApiCaller.ProcessStatus.GetStatusByProcessId(offerExportRequest.ProcessStatusId).ConfigureAwait(false);

                if (exportStatus.Status == "FAILURE")
                {
                    throw new BolRetailerApiException(exportStatus.ErrorMessage);
                }
                if (exportStatus.Status != "SUCCESS")
                {
                    await Task.Delay(4000, innerCancellationToken).ConfigureAwait(false);
                }
            }
            return(await RetrieveOfferExportFile(exportStatus.EntityId.ToString()).ConfigureAwait(false));
        }