class PaymentSerializer < ActiveModel::Serializer
  attributes :id, :name, :amount, :category_id, :type, :schedule, :upcoming

  def upcoming
    schedule.next_occurrences(5)
  end
end

class PaymentSerializer < ActiveModel::Serializer
  attributes :id, :name, :amount, :category_id, :type, :schedule, :upcoming

  def upcoming
    schedule.occurrences_between(Date.today, Date.today + 30.days)
  end
end

Include payment occurences for the next 30 days in `upcoming`
Include payment occurences for the next 30 days in `upcoming`
