UpdateWorkspace() 공개 메소드

Update a workspace.

It mirrors To the following Smartsheet REST API method: PUT /workspaces/{workspaceId}

if any argument is null or empty string if there is any problem with the REST API request if there is any problem with the REST API authorization (access token) if the resource cannot be found if the REST API service is not available (possibly due To rate limiting) if there is any other error during the operation
public UpdateWorkspace ( Api.Models.Workspace workspace ) : Api.Models.Workspace
workspace Api.Models.Workspace the workspace To update
리턴 Api.Models.Workspace
        public virtual void TestUpdateWorkspace()
        {
            server.setResponseBody("../../../TestSDK/resources/updateWorkspace.json");

            Workspace workspace    = new Workspace.UpdateWorkspaceBuilder(32434534, "Updated workspace").Build();
            Workspace newWorkspace = workspaceResources.UpdateWorkspace(workspace);

            Assert.AreEqual(7960873114331012, (long)newWorkspace.Id);
            Assert.AreEqual("Updated workspace", newWorkspace.Name);
            Assert.AreEqual(AccessLevel.OWNER, newWorkspace.AccessLevel);
            Assert.AreEqual("https://app.smartsheet.com/b/home?lx=rBU8QqUVPCJ3geRgl7L8yQ", newWorkspace.Permalink);
        }
예제 #2
0
        public virtual void TestUpdateWorkspace()
        {
            server.setResponseBody("../../../TestSDK/resources/updateWorkspace.json");

            Workspace workspace = new Workspace();

            workspace.Name = "New Workspace";
            Workspace newWorkspace = workspaceResources.UpdateWorkspace(workspace);

            Assert.AreEqual(2349499415848836L, (long)newWorkspace.ID);
            Assert.AreEqual("New Workspace1", newWorkspace.Name);
            Assert.AreEqual(AccessLevel.OWNER, newWorkspace.AccessLevel);
            Assert.AreEqual("https://app.smartsheet.com/b/home?lx=asdf", newWorkspace.Permalink);
        }