Class: MailchimpAPI::InterestCategory
- Extended by:
- Support::Countable
- Includes:
- Support::PatchUpdate
- Defined in:
- lib/mailchimp_api/resources/interest_category.rb
Instance Method Summary collapse
-
#interests(params = {}) ⇒ Object
The path to get interests is ‘/3.0/lists/:list_id/interest-categories/:interest_category_id’ Unfortunately, ActiveResource does not support nested resources, only single parent resources:.
Methods included from Support::Countable
Methods inherited from Base
activate_session, exists?, headers, reset_session, #to_h
Instance Method Details
#interests(params = {}) ⇒ Object
The path to get interests is ‘/3.0/lists/:list_id/interest-categories/:interest_category_id’ Unfortunately, ActiveResource does not support nested resources, only single parent resources:
Using a has_many, there is no way to include the ‘list_id`, so we just create our own interests method.
21 22 23 |
# File 'lib/mailchimp_api/resources/interest_category.rb', line 21 def interests(params = {}) @interests ||= MailchimpAPI::Interest.find(:all, params: { interest_category_id: id }.deep_merge().deep_merge(params)) end |