<commit_before>module Lobbyist
  module V2
    class Filter < Lobbyist::V2::HashieBase
      attr_accessor :id, :company_id, :name, :defined_by, :display_name, :visible
      attr_accessor :default_filter_id, :category_name, :customers_count
      attr_accessor :created_at, :updated_at, :meta_data, :company_meta_data 

      def self.create(company_id, params = {})
        create_response(post("v2/filters.json", params))
      end

      def self.find(company_id, id)
        create_response(get("/v2/filters/#{id}.json"))
      end

      def self.destroy(company_id, id)
        create_response(delete("/v2/filters/#{id}.json", company_id: company_d))
      end

      def self.update(company_id, id, params = {})
        create_response(put("/v2/filters/#{id}.json", company_id: company_id, filter: params))
      end

      def self.list(params = {})
        create_response(get('/v2/filters.json', params))
      end
    end
  end
end
<commit_msg>CA-7577 add clone action for lobbyist<commit_after>module Lobbyist
  module V2
    class Filter < Lobbyist::V2::HashieBase
      attr_accessor :id, :company_id, :name, :defined_by, :display_name, :visible
      attr_accessor :default_filter_id, :category_name, :customers_count
      attr_accessor :created_at, :updated_at, :meta_data, :company_meta_data 

      def self.create(company_id, params = {})
        create_response(post("v2/filters.json", params))
      end

      def self.clone(company_id, params = {})
        create_response(post("v2/filters/clone.json", params))
      end

      def self.find(company_id, id)
        create_response(get("/v2/filters/#{id}.json"))
      end

      def self.destroy(company_id, id)
        create_response(delete("/v2/filters/#{id}.json", company_id: company_d))
      end

      def self.update(company_id, id, params = {})
        create_response(put("/v2/filters/#{id}.json", company_id: company_id, filter: params))
      end

      def self.list(params = {})
        create_response(get('/v2/filters.json', params))
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.1293774319066148, 'fraction_numerical': 0.00924124513618677, 'mean_word_length': 3.2151639344262297, 'pattern_counts': {'":': 0, '<': 5, '<?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': '3068892', 'n_tokens_mistral': 679, 'n_tokens_neox': 670, 'n_words': 129}