public virtual Discussion CreateDiscussion(long objectId, Discussion discussion) { throw new System.NotSupportedException(); }
/// <summary> /// Create a discussion. /// /// It mirrors To the following Smartsheet REST API method: POST /sheet/{Id}/Discussions POST /row/{Id}/Discussions /// /// Returns: the created discussion /// /// Exceptions: /// IllegalArgumentException : if any argument is null /// InvalidRequestException : if there is any problem with the REST API request /// AuthorizationException : if there is any problem with the REST API authorization(access token) /// ResourceNotFoundException : if the resource can not be found /// ServiceUnavailableException : if the REST API service is not available (possibly due To rate limiting) /// SmartsheetRestException : if there is any other REST API related error occurred during the operation /// SmartsheetException : if there is any other error occurred during the operation /// </summary> /// <param name="objectId"> the ID of the object </param> /// <param name="discussion"> the discussion object limited To the following attributes: Title, Comment </param> /// <returns> the created discussion </returns> /// <exception cref="SmartsheetException"> the Smartsheet exception </exception> public virtual Discussion CreateDiscussion(long objectId, Discussion discussion) { Utils.ThrowIfNull(objectId, discussion); return(this.CreateResource <Discussion>(MasterResourceType + "/" + objectId + "/discussions", typeof(Discussion), discussion)); }