1.2 Tariff Plans

By the method GetCloudStoragePricingTypes you can show the list of available pricing plans.

Returns
The method returns a WsResultOfArrayOfCloudStoragePricingType item with information on the result of the call to the method and the list of available pricing plans.
 
//WsCloudStorage.GetCloudStoragePricingTypes Method (c# .NET)
private static String GetCloudStoragePricingTypes(WsCloudStorageClient client)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "1234567890";

    StringBuilder stringBuilder = new StringBuilder();
    try
    {
        //call method GetCloudStoragePricingTypes,
        //obtaining a WsResultOfArrayOfCloudStoragePricingType item
        WsResultOfArrayOfCloudStoragePricingType result =
        client.GetCloudStoragePricingTypes();
        System.Console.WriteLine("result.Success " + result.Success);
        //if the call is not successful, re-run the error indicating the message
        if (result.Success)
        {
            CloudStoragePricingType[] arrayOfCloudStoragePricingType = result.Value;
            //browse the list and print the values
            foreach (CloudStoragePricingType cloudStoragePricingType 
                in arrayOfCloudStoragePricingType)
            {
                int id = cloudStoragePricingType.CloudStoragePricingTypeID;
                stringBuilder.Append("id: ");
                stringBuilder.Append(id);

            }
        }
        else
        {
            throw new Exception(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        //re-run the error
        throw new Exception(ex.Message);
    }
    System.Console.WriteLine("stringBuilder.ToString()" + stringBuilder.ToString());
    return stringBuilder.ToString();
}
//IWsCloudStorage.GetCloudStoragePricingTypes Method Method (JAVA)
private static String GetCloudStoragePricingTypes(IWsCloudStorage client)
{
    StringBuilder sb = new StringBuilder();
    try
    {
        // call method GetCloudStoragePricingTypes,
        // obtaining a WsResultOfCloudStorageAccount item
        WsResultOfArrayOfCloudStoragePricingType result = 
        client.getCloudStoragePricingTypes();
        //if the call is not successful, re-run the error indicating the message
        if (result.isSuccess())
        {
            ArrayOfCloudStoragePricingType arrayOfCloudStoragePricingType = 
            result.getValue();

            List<CloudStoragePricingType> 
            listOfArrayOfCloudStoragePricingType = 
                arrayOfCloudStoragePricingType.getCloudStoragePricingType();
            //browse the list and print the values
            for (Iterator<CloudStoragePricingType> it = 
                listOfArrayOfCloudStoragePricingType.iterator(); it.hasNext();)
            {
                CloudStoragePricingType cloudStoragePricingType = it.next();
                ArrayOfCloudStoragePricingTypeDescription 
                    arrayOfCloudStoragePricingTypeDescription = 
                    cloudStoragePricingType.getPricingTypeDescriptions();
                List<CloudStoragePricingTypeDescription> 
                    listOfArrayOfCloudStoragePricingTypeDescription = 
                        arrayOfCloudStoragePricingTypeDescription
                            .getCloudStoragePricingTypeDescription();
                for (Iterator<CloudStoragePricingTypeDescription> it2 = 
                    listOfArrayOfCloudStoragePricingTypeDescription.iterator(); 
                        it2.hasNext();)
                {
                    CloudStoragePricingTypeDescription 
                        cloudStoragePricingTypeDescription = it2.next();
                    String pricingTypeDescription = 
                        cloudStoragePricingTypeDescription.getDescription();
                    sb.append("pricingTypeDescription: ");
                    sb.append(pricingTypeDescription);
                }
            }
        }
        else
        {
            throw new Exception(result.getResultMessage().getValue());
        }

    }
    catch (Exception ex)
    {
        //show result
        System.out.println(ex);
    }
    System.out.println("sb.toString(): " + sb.toString());

    return sb.toString();
}
Versione
API: v2.8 URL: https://api.services.cloud.it/wsCloudStorage/v2.8/WsCloudStorage.svc?wsdl