Box.V2.Managers.BoxFilesManager.PromoteVersionAsync C# (CSharp) Метод

PromoteVersionAsync() публичный Метод

If there are previous versions of this file, this method can be used to promote one of the older versions to the top of the stack. This actually mints a copy of the old version and puts it on the top of the versions stack. The file will have the exact same contents, the same SHA1/etag, and the same name as the promoted version. Other properties such as comments do not get updated to their former values.
public PromoteVersionAsync ( string id, string versionId ) : Task
id string Id of the file (Required).
versionId string Id of the version (Required).
Результат Task
        public async Task<BoxFileVersion> PromoteVersionAsync(string id, string versionId)
        {
            id.ThrowIfNullOrWhiteSpace("id");
            versionId.ThrowIfNullOrWhiteSpace("versionId");

            BoxRequest request = new BoxRequest(_config.FilesEndpointUri, string.Format(Constants.PromoteVersionPathString, id))
                .Method(RequestMethod.Post)
                .Payload(_converter.Serialize(new BoxPromoteVersionRequest()
                    {
                        Id = versionId
                    }));

            IBoxResponse<BoxFileVersion> response = await ToResponseAsync<BoxFileVersion>(request).ConfigureAwait(false);

            return response.ResponseObject;
        }
    }