<commit_before># -*- encoding: utf-8 -*-

module SendGrid4r
  module REST
    #
    # SendGrid Web API v3 Webhooks
    #
    module Webhooks
      #
      # SendGrid Web API v3 Webhooks ParseApi
      #
      module ParseApi
        include SendGrid4r::REST::Request

        ParseSettings = Struct.new(:result)
        ParseSetting = Struct.new(:url, :hostname, :spam_check_outgoing)

        def self.url
          "#{BASE_URL}/user/webhooks/parse/settings"
        end

        def self.create_parse_settings(resp)
          return resp if resp.nil?
          #puts resp['result']
          parse_settings = []
          resp['result'].each do |setting|
            parse_settings.push(
              SendGrid4r::REST::Webhooks::ParseApi.create_parse_setting(
                setting
              )
            )
          end
          ParseSettings.new(parse_settings)
        end

        def self.create_parse_setting(resp)
          return resp if resp.nil?
          ParseSetting.new(
            resp['url'],
            resp['hostname'],
            resp['spam_check_outgoing']
          )
        end

        def get_parse_settings(&block)<commit_msg>remove comment line<commit_after># -*- encoding: utf-8 -*-

module SendGrid4r
  module REST
    #
    # SendGrid Web API v3 Webhooks
    #
    module Webhooks
      #
      # SendGrid Web API v3 Webhooks ParseApi
      #
      module ParseApi
        include SendGrid4r::REST::Request

        ParseSettings = Struct.new(:result)
        ParseSetting = Struct.new(:url, :hostname, :spam_check_outgoing)

        def self.url
          "#{BASE_URL}/user/webhooks/parse/settings"
        end

        def self.create_parse_settings(resp)
          return resp if resp.nil?
          parse_settings = []
          resp['result'].each do |setting|
            parse_settings.push(
              SendGrid4r::REST::Webhooks::ParseApi.create_parse_setting(
                setting
              )
            )
          end
          ParseSettings.new(parse_settings)
        end

        def self.create_parse_setting(resp)
          return resp if resp.nil?
          ParseSetting.new(
            resp['url'],
            resp['hostname'],
            resp['spam_check_outgoing']
          )
        end

        def get_parse_settings(&block)
{'fraction_non_alphanumeric': 0.08980477223427331, 'fraction_numerical': 0.005206073752711497, 'mean_word_length': 1.697076023391813, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3507809', 'n_tokens_mistral': 648, 'n_tokens_neox': 644, 'n_words': 129}