class Payjunction::AccountDecorator < ApplicationDecorator
  def type
    case payment_type
    when 'ach'
      'ACH'
    when 'credit_card'
      'Credit Card'
    end
  end

  def settings_path
    if convenience_fee
      h.edit_accounting_payjunction_convenience_fee_path(
        convenience_fee
      )
    else
      h.new_accounting_payjunction_convenience_fee_path(
        account: id
      )
    end
  end
end
