Method put!
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
def put!
if exists?
puts "[EXISTS] - #{@stripe_class}:#{@id}:#{stripe_id}" unless Stripe::Engine.testing
else
object = @stripe_class.create({:lookup_key => @lookup_key}.merge compact_create_options)
Method callback_matcher
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
def callback_matcher(options, block)
case only = options[:only]
when Proc, Method
proc do |target, evt|
block.call(target, evt) if only.call(target, evt)
Method put!
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
def put!
if exists?
puts "[EXISTS] - #{@stripe_class}:#{@id}" unless Stripe::Engine.testing
else
object = @stripe_class.create({:id => @id}.merge compact_create_options)
Method recurring_interval_count_maximum
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
def recurring_interval_count_maximum
time_unit = recurring_interval.to_sym
return unless VALID_TIME_UNITS.include?(time_unit) && recurring_interval_count.respond_to?(time_unit)
too_long = recurring_interval_count.send(time_unit) > 1.year