/**
   * @param processAgentInfo
   * @return ProcessAgentInfo
   */
  private ProcessAgentInfo Parse(ProcessAgentInfo processAgentInfo) {
    final String methodName = "Parse";
    Logfile.WriteCalled(logLevel, STR_ClassName, methodName);

    try {
      /*
       * Check if ProcessAgentInfo has been provided
       */
      if (processAgentInfo == null) {
        /*
         * Create instance of ProcessAgentInfo ready to fill in
         */
        processAgentInfo = new ProcessAgentInfo();
        processAgentInfo.setOutCoupon(new Coupon());

        /*
         * Check that WebService Url has been entered
         */
        this.hitServiceUrl = this.hitServiceUrl.trim();
        if (this.hitServiceUrl.isEmpty() == true) {
          throw new Exception(String.format(STRERR_NotSpecified_arg, STRERR_ServiceUrl));
        }
        processAgentInfo.setServiceUrl(this.hitServiceUrl);

        /*
         * Check that Service Passkey has been entered
         */
        this.hitServicePasskey = this.hitServicePasskey.trim();
        if (this.hitServicePasskey.isEmpty() == true) {
          throw new Exception(String.format(STRERR_NotSpecified_arg, STRERR_ServicePasskey));
        }
        processAgentInfo.getOutCoupon().setPasskey(this.hitServicePasskey);
      } else {
        /*
         * Optional Information
         */
        SystemSupportInfo systemSupportInfo = processAgentInfo.getSystemSupportInfo();
        this.htaDescription = this.htaDescription.trim();
        systemSupportInfo.setDescription(
            this.htaDescription.isEmpty() ? null : this.htaDescription);
        this.hitLocation = this.hitLocation.trim();
        systemSupportInfo.setLocation(this.hitLocation.isEmpty() ? null : this.hitLocation);
        this.hitInfoUrl = this.hitInfoUrl.trim();
        systemSupportInfo.setInfoUrl(this.hitInfoUrl.isEmpty() ? null : this.hitInfoUrl);
        this.hitContactName = this.hitContactName.trim();
        systemSupportInfo.setContactName(
            this.hitContactName.isEmpty() ? null : this.hitContactName);
        this.hitContactEmail = this.hitContactEmail.trim();
        systemSupportInfo.setContactEmail(
            this.hitContactEmail.isEmpty() ? null : this.hitContactEmail);
      }
    } catch (Exception ex) {
      this.ShowMessageError(ex.getMessage());
      processAgentInfo = null;
    }

    Logfile.WriteCompleted(logLevel, STR_ClassName, methodName);

    return processAgentInfo;
  }