app/models/chargeback_rate_detail.rb
# Set the rates according to the tiers
Set the rates according to the tiers
Set the rates according to the tiers
def find_rate(value)
    fixed_rate = 0.0
    variable_rate = 0.0
    chargeback_tiers.each do |tier|
      next if value < rate_adjustment(tier.start)
      next if value >= rate_adjustment(tier.finish)
      fixed_rate = tier.fixed_rate
      variable_rate = tier.variable_rate
      break
    end
    return fixed_rate, variable_rate
  end
def find_rate ( value ) fixed_rate = 0.0 variable_rate = 0.0 chargeback_tiers . each do | tier | next if value < rate_adjustment ( tier . start ) next if value >= rate_adjustment ( tier . finish ) fixed_rate = tier . fixed_rate variable_rate = tier . variable_rate break end return fixed_rate , variable_rate end
Set the rates according to the tiers
Set the rates according to the tiers
value
<not_specific>