Phone sales support +39 0575 05077
  Phone technical support +39 0575 0508
 
Backup > 2 - Account Management > Change the Pricing Plan

2.4 Change the Pricing Plan

By the method IWsBackup SetUpgradeBackupAccountPlan you can change backup plan for the backup account and overlimit behavior

Parameter
backupAccountID
Type: int
Account identifier
backupPricingTypeId
Type: int
pricint type identifier
overLimitBehavior
Type: EnumsOverLimitBehavior
Over Limit Behaior of the plan

/// WsBackupClient.SetUpgradeBackupAccountPlan     Method (c# .NET)           
public static string SetUpgradeBackupAccountPlan(WsBackupClient client,
        int backupAccountID, int backupPricingTypeId,
        EnumsOverLimitBehavior overLimitBehavior)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        // call method WsResult  
        // obtaining a SetUpgradeBackupAccountPlan  item
        WsResult result = client.SetUpgradeBackupAccountPlan(backupAccountID,
            backupPricingTypeId, overLimitBehavior);

        // if the call is Success print returned values
        if (result.Success)
        {
            stringBuilder.Append("Operation ends successfully\n");
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        // re-run the error
        throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
/// IWsBackupClient.SetUpgradeBackupAccountPlan     Method (JAVA)
public static String SetUpgradeBackupAccountPlan(WsBackupClient client,
        int backupAccountID, int backupPricingTypeId,
        EnumsOverLimitBehavior overLimitBehavior)
{
        //specify the account login details 
    ((BindingProvider) client).getRequestContext()
        .put(BindingProvider.USERNAME_PROPERTY, "ARU-0000");
    ((BindingProvider) client).getRequestContext()
        .put(BindingProvider.PASSWORD_PROPERTY, "0123456789");

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        // call method WsResult  
        // obtaining a SetUpgradeBackupAccountPlan  item
        WsResult result = client.SetUpgradeBackupAccountPlan(backupAccountID,
            backupPricingTypeId, overLimitBehavior);

        // if the call is Success print returned values
        if (result.isSuccess())
        {
            stringBuilder.append("Operation ends successfully\n");
        }
        else
        {
            throw new Exception(result.getResultMessage());
        }
    }
    catch (Exception ex)
    {
            System.out.println(ex);
    }

    return stringBuilder.toString();
}
Version
API: v2.8 URL:https://api.services.cloud.it/wsBackup/v2.8/WsBackup.svc?wsdl


Bookmark and Share