public Folder CreateChildFolder(Guid folderId, string name, string description, bool inheritNamingConventions, bool inheritRecordRetention, bool allowRevision, string prefix, string suffix, DocDatePosition datePosition, DocSeqType sequenceType, ExpireAction expireAction, bool expirationRequired, int expirationDays, bool reviewRequired, int reviewDays)
        {
            if (folderId.Equals(Guid.Empty))
            {
                throw new ArgumentException("FolderId is required but was an empty Guid", "folderId");
            }

            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("Name is required but was an empty string", "name");
            }

            dynamic postData = new ExpandoObject();
            postData.Name = name;
            if (!String.IsNullOrWhiteSpace(description))
            {
                postData.Description = description;
            }
            postData.allowRevision = allowRevision;

            postData.inheritNamingConvention = inheritNamingConventions;
            postData.inheritRecordRetention = inheritRecordRetention;

            if (!String.IsNullOrWhiteSpace(prefix))
            {
                postData.dcPrefix = prefix;
            }
            if (!String.IsNullOrWhiteSpace(suffix))
            {
                postData.dcSuffix = suffix;
            }
            postData.dcDatePosition = datePosition;

            postData.dcSeqType = sequenceType;
            postData.expireAction = expireAction;
            postData.expirationRequired = expirationRequired;
            postData.expirationDays = expirationDays;
            postData.reviewRequired = reviewRequired;
            postData.reviewDays = reviewDays;

            return HttpHelper.Post<Folder>(GlobalConfiguration.Routes.FoldersId, string.Empty, GetUrlParts(), this.ClientSecrets, this.ApiTokens, postData, folderId);
        }
        public Folder CreateFolderByPath(string path, string description, bool inheritNamingConventions, bool inheritRecordRetention, bool allowRevision, string prefix, string suffix, DocDatePosition datePosition, DocSeqType sequenceType, ExpireAction expireAction, bool expirationRequired, int expirationDays, bool reviewRequired, int reviewDays)
        {
            if (string.IsNullOrWhiteSpace(path))
            {
                throw new ArgumentException("Path is required but was an empty string", "path");
            }

            dynamic postData = new ExpandoObject();

            postData.folderpath = path;

            if (!String.IsNullOrWhiteSpace(description))
            {
                postData.Description = description;
            }
            postData.allowRevisions = allowRevision;

            postData.inheritNamingConvention = inheritNamingConventions;
            postData.inheritRecordRetention  = inheritRecordRetention;

            if (!String.IsNullOrWhiteSpace(prefix))
            {
                postData.dcPrefix = prefix;
            }
            if (!String.IsNullOrWhiteSpace(suffix))
            {
                postData.dcSuffix = suffix;
            }
            postData.dcDatePosition = datePosition;

            postData.dcSeqType          = sequenceType;
            postData.expireAction       = expireAction;
            postData.expirationRequired = expirationRequired;
            postData.expirationDays     = expirationDays;
            postData.reviewRequired     = reviewRequired;
            postData.reviewDays         = reviewDays;

            return(HttpHelper.Post <Folder>(GlobalConfiguration.Routes.Folders, string.Empty, GetUrlParts(), this.ClientSecrets, this.ApiTokens, postData));
        }