def parser_endpoint_to_web_url
      # @type [String]
      prop_name = nil
      if Constants::RAPID_ENDPOINT_PRODUCTION.casecmp(@rapid_endpoint).zero?
        prop_name = Constants::GLOBAL_RAPID_PRODUCTION_REST_URL_PARAM
      elsif Constants::RAPID_ENDPOINT_SANDBOX.casecmp(@rapid_endpoint).zero?
        prop_name = Constants::GLOBAL_RAPID_SANDBOX_REST_URL_PARAM
      end
      if prop_name.nil?
        set_web_url(@rapid_endpoint)
      else
        property_array = YAML.load_file(File.join(File.dirname(__FILE__), 'resources', 'rapid-api.yml'))
        property_array.each do |h|
          if prop_name.casecmp(h.keys.first).zero?
            set_web_url(h[h.keys.first])
          end
        end
        if @web_url.nil?
          fail Exception, "The endpoint #{prop_name} is invalid."
        end
      end
      # verify_endpoint_url(@web_url) # this is unreliable
    end
def parser_endpoint_to_web_url
      # @type [String]
      prop_name = nil
      if Constants::RAPID_ENDPOINT_PRODUCTION.casecmp(@rapid_endpoint).zero?
        prop_name = Constants::GLOBAL_RAPID_PRODUCTION_REST_URL_PARAM
      elsif Constants::RAPID_ENDPOINT_SANDBOX.casecmp(@rapid_endpoint).zero?
        prop_name = Constants::GLOBAL_RAPID_SANDBOX_REST_URL_PARAM
      end
      if prop_name.nil?
        set_web_url(@rapid_endpoint)
      else
        property_array = YAML.load_file(File.join(File.dirname(__FILE__), 'resources', 'rapid-api.yml'))
        property_array.each do |h|
          if prop_name.casecmp(h.keys.first).zero?
            set_web_url(h[h.keys.first])
          end
        end
        if @web_url.nil?
          fail Exception, "The endpoint #{prop_name} is invalid."
        end
      end
      # verify_endpoint_url(@web_url) # this is unreliable
    end
Converts an endpoint string to a URL