/// <exclude/>
 protected void MakeApiGetRequestDelegateStream(Uri uri, string acceptEncoding, ICompanyFileCredentials credentials, Action <HttpStatusCode, Stream> onComplete, Action <Uri, Exception> onError)
 {
     WrapApiRequestWithOAuthRenew(response =>
     {
         var api = new ApiStreamRequestHandler(Configuration, credentials, response);
         api.Get(WebRequestFactory.Create(uri, acceptEncoding), onComplete, onError);
     }, onError);
 }
        /// <exclude/>
        async protected Task <Stream> MakeApiGetRequestAsyncStream(Uri uri, string acceptEncoding, ICompanyFileCredentials credentials, CancellationToken cancellationToken)
        {
            await RenewOAuthTokensAsync(cancellationToken);

            var api  = new ApiStreamRequestHandler(Configuration, credentials, GetOAuthResponse());
            var data = await api.GetAsync(this.WebRequestFactory.Create(uri, acceptEncoding), cancellationToken);

            return(data.Item2);
        }