Computing > 10 - Requests for Assistance > Update assistance request

10.3 Update assistance request

The method SetUpdateAssistanceRequest is aimed to update assistance request data. Assistance request is updatable until user will send it to assistance team. Updatable data are RequestSubject, RequestBody, VirtualMachineID, CustomerEmail, CustomerFullName, CustomerPhoneNumber.

Parameters
requestId
Type: int
Value of type int with request identifier.

requestSubject
Type: string
Value of type string with request subject.

requestBody
Type: string
Value of type string with request body.

email
Type: string
Value of type string with customer email.

fullName
Type: string
Value of type string with customer full name.

phoneNumber
Type: string
Value of type string with customer phone number.

virtualMachineID
Type: int
Value of type int with virtual server identifier

 
// IWsEndUser.SetUpdateAssistanceRequest Method (c# .NET)
public static string SetUpdateAssistanceRequest(WsEndUserClient client,
    int requestId, string requestSubject, string requestBody, string email,
    string fullName, string phoneNumber, int virtualMachineID)
{
    //specify the account login details 
    client.ClientCredentials.UserName.UserName = "ARU-0000";
    client.ClientCredentials.UserName.Password = "0123456789";

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        // create the object UpdateAssistanceRequest  for the request 
        // with data to process
        UpdateAssistanceRequest request = new UpdateAssistanceRequest();

        // mandatory fields
        request.AssistanceRequestID = requestId;
        request.AssistanceRequestSubject = requestSubject;
        request.AssistanceRequestBody = requestBody;
        request.CustomerEmail = email;
        request.CustomerFullName = fullName;
        request.CustomerPhoneNumber = phoneNumber;

        // other optional fields
        request.Language = Languages.en;
        request.VirtualMachineID = virtualMachineID;

        //call method SetUpdateAssistanceRequest, 
        //obtaining a WsResult item
        WsResult result = client.SetUpdateAssistanceRequest(request);

        //if the call is not successful, re-run the error indicating the message
        if (result.Success)
        {
            // print the result code and message
            stringBuilder.Append("code: ");
            stringBuilder.Append(result.ResultCode);
            stringBuilder.Append(" - message: ");
            stringBuilder.Append(result.ResultMessage);
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        // re-run the error
        throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
// IWsEndUser.SetUpdateAssistanceRequest Method (JAVA)
private static String setUpdateAssistanceRequest(IWsEndUser client,
    int requestId, String requestSubject, String requestBody, String email,
    String fullName, String phoneNumber, int virtualMachineID)
{
    //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
    {
        // create the object UpdateAssistanceRequest  for the request 
        // with data to process
        UpdateAssistanceRequest request = new UpdateAssistanceRequest();

        // mandatory fields
        request.setAssistanceRequestID(requestId);
        request.setAssistanceRequestSubject(requestSubject);
        request.setAssistanceRequestBody(requestBody);
        request.setCustomerEmail(email);
        request.setCustomerFullName(fullName);
        request.setCustomerPhoneNumber(phoneNumber);

        // other optional fields
        request.setLanguage(Languages.EN);
        request.setVirtualMachineID(virtualMachineID);

        //call method setUpdateAssistanceRequest, 
        //obtaining a WsResult item
        WsResult result = client.setUpdateAssistanceRequest(request);

        //if the call is not successful, re-run the error indicating the message
        if (result.isSuccess())
        {
            // print the result code and message
            StringBuilder.append("code: ");
            StringBuilder.append(result.getResultCode());
            StringBuilder.append(" - message: ");
            StringBuilder.append(result.getResultMessage());
        }
        else
        {
            throw new Exception(result.getResultMessage());
        }
    }
    catch (Exception ex)
    {
        // show the error
        System.out.println(ex);
    }

    System.out.println("StringBuilder: "+StringBuilder);
    
    return StringBuilder.toString();
}
Version
API: v2.8 URL: https://api.dc1.computing.cloud.it/WsEndUser/v2.8/WsEndUser.svc?wsdl