<commit_before>require "stripe"
require "stripe_event/engine"
require "stripe_event/subscriber"
require "stripe_event/publisher"

module StripeEvent
  mattr_accessor :event_retriever
  self.event_retriever = Proc.new { |params| Stripe::Event.retrieve(params[:id]) }

  def self.setup(&block)
    instance_eval(&block)
  end

  def self.publish(event)
    Publisher.new(event).instrument
  end

  def self.subscribe(*names, &block)
    Subscriber.new(*names).register(&block)
  end

  class StripeEventError < StandardError; end
  class InvalidEventTypeError < StripeEventError; end

  TYPE_LIST = [
    'account.updated',
    'account.application.deauthorized',
    'charge.succeeded',
    'charge.failed',
    'charge.refunded',
    'charge.dispute.created',
    'charge.dispute.updated',
    'charge.dispute.closed',
    'customer.created',
    'customer.updated',
    'customer.deleted',
    'customer.subscription.created',
    'customer.subscription.updated',
    'customer.subscription.deleted',
    'customer.subscription.trial_will_end',
    'customer.discount.created',
    'customer.discount.updated',
    'customer.discount.deleted',
    'invoice.created',
    'invoice.updated',
    'invoice.payment_succeeded',
    'invoice.payment_failed',
    'invoiceitem.created',
    'invoiceitem.updated',
    'invoiceitem.deleted',
    'plan.created',
    'plan.updated',
    'plan.deleted',
    'coupon.created',
    'coupon.updated',
    'coupon.deleted',
    'transfer.created',
    'transfer.updated',
    'transfer.failed',
    'ping'
  ]
end<commit_msg>Remove old event type<commit_after>require "stripe"
require "stripe_event/engine"
require "stripe_event/subscriber"
require "stripe_event/publisher"

module StripeEvent
  mattr_accessor :event_retriever
  self.event_retriever = Proc.new { |params| Stripe::Event.retrieve(params[:id]) }

  def self.setup(&block)
    instance_eval(&block)
  end

  def self.publish(event)
    Publisher.new(event).instrument
  end

  def self.subscribe(*names, &block)
    Subscriber.new(*names).register(&block)
  end

  class StripeEventError < StandardError; end
  class InvalidEventTypeError < StripeEventError; end

  TYPE_LIST = [
    'account.updated',
    'account.application.deauthorized',
    'charge.succeeded',
    'charge.failed',
    'charge.refunded',
    'charge.dispute.created',
    'charge.dispute.updated',
    'charge.dispute.closed',
    'customer.created',
    'customer.updated',
    'customer.deleted',
    'customer.subscription.created',
    'customer.subscription.updated',
    'customer.subscription.deleted',
    'customer.subscription.trial_will_end',
    'customer.discount.created',
    'customer.discount.updated',
    'customer.discount.deleted',
    'invoice.created',
    'invoice.updated',
    'invoice.payment_succeeded',
    'invoice.payment_failed',
    'invoiceitem.created',
    'invoiceitem.updated',
    'invoiceitem.deleted',
    'plan.created',
    'plan.updated',
    'plan.deleted',
    'coupon.created',
    'coupon.deleted',
    'transfer.created',
    'transfer.updated',
    'transfer.failed',
    'ping'
  ]
end
{'fraction_non_alphanumeric': 0.13633440514469453, 'fraction_numerical': 0.0, 'mean_word_length': 3.8609375, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4510918', 'n_tokens_mistral': 1026, 'n_tokens_neox': 1024, 'n_words': 149}