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

  def upcoming
    schedule.next_occurrences(5)
  end
end
```

Include payment occurences for the next 30 days in `upcoming`
user
```ruby
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
```
assistant