/// <summary> /// <para>Update a workspace.</para> /// <para>It mirrors To the following Smartsheet REST API method: PUT /workspaces/{workspaceId}</para> /// </summary> /// <param name="workspace"> the workspace To update </param> /// <returns> the updated workspace (note that if there is no such resource, this method will throw /// ResourceNotFoundException rather than returning null) </returns> /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception> /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception> /// <exception cref="AuthorizationException"> if there is any problem with the REST API authorization (access token) </exception> /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception> /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception> /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception> public virtual Workspace UpdateWorkspace(Workspace workspace) { return this.UpdateResource<Workspace>("workspaces/" + workspace.Id, typeof(Workspace), workspace); }
/// <summary> /// <para>Create a workspace.</para> /// <para>It mirrors To the following Smartsheet REST API method: POST /Workspaces</para> /// </summary> /// <param name="workspace"> the workspace To create </param> /// <returns> the created workspace </returns> /// <exception cref="System.InvalidOperationException"> if any argument is null or empty string </exception> /// <exception cref="InvalidRequestException"> if there is any problem with the REST API request </exception> /// <exception cref="AuthorizationException"> if there is any problem with the REST API authorization (access token) </exception> /// <exception cref="ResourceNotFoundException"> if the resource cannot be found </exception> /// <exception cref="ServiceUnavailableException"> if the REST API service is not available (possibly due To rate limiting) </exception> /// <exception cref="SmartsheetException"> if there is any other error during the operation </exception> public virtual Workspace CreateWorkspace(Workspace workspace) { return this.CreateResource<Workspace>("workspaces", typeof(Workspace), workspace); }