IWsBackupGetBackupPricingTypes Method |
Namespace: Aruba.Cloud.WsBackup
[OperationContractAttribute] WsResult<List<BackupPricingType>> GetBackupPricingTypes( int regionId, EnumsBackupType backupTypeId )
/// WsBackupClient.GetBackupPricingTypes Method (c# .NET) public static string GetBackupPricingTypes(WsBackupClient client, int regionId,Enums.BackupType backupTypeId ) { //specify the account login details client.ClientCredentials.UserName.UserName = "ARU-0000"; client.ClientCredentials.UserName.Password = "0123456789"; StringBuilder stringBuilder = new StringBuilder(); try { // call method GetBackupPricingTypes // obtaining a WsResultOfArrayOfBackupPricingType item WsResultOfArrayOfBackupPricingType result = client.GetBackupPricingTypes(regionId,backupTypeId); // if the call is Success print returned values if (result.Success) { stringBuilder.Append("Operation ends successfully\n"); // get Value returned from server BackupPricingType[] items = result.Value; if (items != null) { foreach (BackupPricingType item in items) { stringBuilder.Append("\nBackupPricingType detail\n"); stringBuilder.Append("\n RegionID: "); stringBuilder.Append(item.RegionID); stringBuilder.Append("\n PricingTypeDescriptions: "); stringBuilder.Append(item.PricingTypeDescriptions); stringBuilder.Append("\n CreationDate: "); stringBuilder.Append(item.CreationDate); } } } else { throw new ApplicationException(result.ResultMessage); } } catch (Exception ex) { // re-run the error throw new ApplicationException(ex.Message); } return stringBuilder.ToString(); }