Computing > 10 - Requests for Assistance > Get assistance request details

10.5 Get assistance request details

The method GetAssistanceRequestDetails retrieve assistance request details data, bounded with a quotation if it is available. Quotation is available when request is in ‘Estimated’ status.

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

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

    StringBuilder stringBuilder = new StringBuilder();

    try
    {
        //call method GetAssistanceRequestDetails, 
        //obtaining a WsResultOfAssistanceRequest item
        WsResultOfAssistanceRequest result = client.GetAssistanceRequestDetails(requestId);

        //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);

            //print information about the AssistanceRequest request
            AssistanceRequest assistanceRequest = result.Value;
            stringBuilder.Append("AssistanceQuotation: ");
            stringBuilder.Append(assistanceRequest.AssistanceQuotation);
            stringBuilder.Append("AssistanceRequestBody: ");
            stringBuilder.Append(assistanceRequest.AssistanceRequestBody);
            stringBuilder.Append("AssistanceRequestCurrency: ");
            stringBuilder.Append(assistanceRequest.AssistanceRequestCurrency);
            stringBuilder.Append("AssistanceRequestID: ");
            stringBuilder.Append(assistanceRequest.AssistanceRequestID);
            stringBuilder.Append("AssistanceRequestStatus: ");
            stringBuilder.Append(assistanceRequest.AssistanceRequestStatus);
            stringBuilder.Append("AssistanceRequestSubject: ");
            stringBuilder.Append(assistanceRequest.AssistanceRequestSubject);
            stringBuilder.Append("CompanyID: ");
            stringBuilder.Append(assistanceRequest.CompanyID);
            stringBuilder.Append("CompanyName: ");
            stringBuilder.Append(assistanceRequest.CompanyName);
            stringBuilder.Append("CustomerFullName: ");
            stringBuilder.Append(assistanceRequest.CustomerFullName);
            stringBuilder.Append("CustomerMail: ");
            stringBuilder.Append(assistanceRequest.CustomerMail);
            stringBuilder.Append("CustomerPhoneNumber: ");
            stringBuilder.Append(assistanceRequest.CustomerPhoneNumber);
            stringBuilder.Append("DataCenterID: ");
            stringBuilder.Append(assistanceRequest.DataCenterID);
            stringBuilder.Append("Language: ");
            stringBuilder.Append(assistanceRequest.Language);
            stringBuilder.Append("LastModifiedDate: ");
            stringBuilder.Append(assistanceRequest.LastModifiedDate);
            stringBuilder.Append("ResourceID: ");
            stringBuilder.Append(assistanceRequest.ResourceID);
            stringBuilder.Append("UnitPrice: ");
            stringBuilder.Append(assistanceRequest.UnitPrice);
            stringBuilder.Append("UserID: ");
            stringBuilder.Append(assistanceRequest.UserID);
            stringBuilder.Append("VirtualMachineID: ");
            stringBuilder.Append(assistanceRequest.VirtualMachineID);
        }
        else
        {
            throw new ApplicationException(result.ResultMessage);
        }
    }
    catch (Exception ex)
    {
        // re-run the error
        throw new ApplicationException(ex.Message);
    }

    return stringBuilder.ToString();
}
/// IWsEndUser.GetAssistanceRequestDetails Method (JAVA)
private static String getAssistanceRequestDetails(IWsEndUser client,
    int requestId )
{
    //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 getAssistanceRequestDetails, 
        //obtaining a WsResultOfAssistanceRequest item
        WsResultOfAssistanceRequest result = 
            client.getAssistanceRequestDetails(requestId);

        //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());
            stringBuilder.append(" - value: ");
            stringBuilder.append(result.getValue());

             //print information about the AssistanceRequest request
            AssistanceRequest assistanceRequest = result.getValue();
            stringBuilder.append("AssistanceQuotation: ");
            stringBuilder.append(assistanceRequest.getAssistanceQuotation());
            stringBuilder.append("AssistanceRequestBody: ");
            stringBuilder.append(assistanceRequest.getAssistanceRequestBody());
            stringBuilder.append("AssistanceRequestCurrency: ");
            stringBuilder.append(assistanceRequest.getAssistanceRequestCurrency());
            stringBuilder.append("AssistanceRequestID: ");
            stringBuilder.append(assistanceRequest.getAssistanceRequestID());
            stringBuilder.append("AssistanceRequestStatus: ");
            stringBuilder.append(assistanceRequest.getAssistanceRequestStatus());
            stringBuilder.append("AssistanceRequestSubject: ");
            stringBuilder.append(assistanceRequest.getAssistanceRequestSubject());
            stringBuilder.append("CompanyID: ");
            stringBuilder.append(assistanceRequest.getCompanyID());
            stringBuilder.append("CompanyName: ");
            stringBuilder.append(assistanceRequest.getCompanyName());
            stringBuilder.append("CustomerFullName: ");
            stringBuilder.append(assistanceRequest.getCustomerFullName());
            stringBuilder.append("CustomerMail: ");
            stringBuilder.append(assistanceRequest.getCustomerMail());
            stringBuilder.append("CustomerPhoneNumber: ");
            stringBuilder.append(assistanceRequest.getCustomerPhoneNumber());
            stringBuilder.append("DataCenterID: ");
            stringBuilder.append(assistanceRequest.getDataCenterID());
            stringBuilder.append("Language: ");
            stringBuilder.append(assistanceRequest.getLanguage());
            stringBuilder.append("LastModifiedDate: ");
            stringBuilder.append(assistanceRequest.getLastModifiedDate());
            stringBuilder.append("ResourceID: ");
            stringBuilder.append(assistanceRequest.getResourceID());
            stringBuilder.append("UnitPrice: ");
            stringBuilder.append(assistanceRequest.getUnitPrice());
            stringBuilder.append("UserID: ");
            stringBuilder.append(assistanceRequest.getUserID());
            stringBuilder.append("VirtualMachineID: ");
            stringBuilder.append(assistanceRequest.getVirtualMachineID());
        }
        else
        {
            throw new Exception(result.getResultMessage());
        }
    }
    catch (Exception ex)
    {
         // show the error
        System.out.println(ex);
    }

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