/// <summary>
 /// Creates the specified Workbook using POST.
 /// </summary>
 /// <param name="workbookToCreate">The Workbook to create.</param>
 /// <returns>The created Workbook.</returns>
 public System.Threading.Tasks.Task <Workbook> CreateAsync(Workbook workbookToCreate)
 {
     return(this.CreateAsync(workbookToCreate, CancellationToken.None));
 }
        /// <summary>
        /// Initializes any collection properties after deserialization, like next requests for paging.
        /// </summary>
        /// <param name="workbookToInitialize">The <see cref="Workbook"/> with the collection properties to initialize.</param>
        private void InitializeCollectionProperties(Workbook workbookToInitialize)
        {
            if (workbookToInitialize != null && workbookToInitialize.AdditionalData != null)
            {
                if (workbookToInitialize.Names != null && workbookToInitialize.Names.CurrentPage != null)
                {
                    workbookToInitialize.Names.AdditionalData = workbookToInitialize.AdditionalData;

                    object nextPageLink;
                    workbookToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink);
                    var nextPageLinkString = nextPageLink as string;

                    if (!string.IsNullOrEmpty(nextPageLinkString))
                    {
                        workbookToInitialize.Names.InitializeNextPageRequest(
                            this.Client,
                            nextPageLinkString);
                    }
                }

                if (workbookToInitialize.Tables != null && workbookToInitialize.Tables.CurrentPage != null)
                {
                    workbookToInitialize.Tables.AdditionalData = workbookToInitialize.AdditionalData;

                    object nextPageLink;
                    workbookToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink);
                    var nextPageLinkString = nextPageLink as string;

                    if (!string.IsNullOrEmpty(nextPageLinkString))
                    {
                        workbookToInitialize.Tables.InitializeNextPageRequest(
                            this.Client,
                            nextPageLinkString);
                    }
                }

                if (workbookToInitialize.Worksheets != null && workbookToInitialize.Worksheets.CurrentPage != null)
                {
                    workbookToInitialize.Worksheets.AdditionalData = workbookToInitialize.AdditionalData;

                    object nextPageLink;
                    workbookToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink);
                    var nextPageLinkString = nextPageLink as string;

                    if (!string.IsNullOrEmpty(nextPageLinkString))
                    {
                        workbookToInitialize.Worksheets.InitializeNextPageRequest(
                            this.Client,
                            nextPageLinkString);
                    }
                }

                if (workbookToInitialize.Comments != null && workbookToInitialize.Comments.CurrentPage != null)
                {
                    workbookToInitialize.Comments.AdditionalData = workbookToInitialize.AdditionalData;

                    object nextPageLink;
                    workbookToInitialize.AdditionalData.TryGetValue("*****@*****.**", out nextPageLink);
                    var nextPageLinkString = nextPageLink as string;

                    if (!string.IsNullOrEmpty(nextPageLinkString))
                    {
                        workbookToInitialize.Comments.InitializeNextPageRequest(
                            this.Client,
                            nextPageLinkString);
                    }
                }
            }
        }