Class: Mailchimp::List::Members
- Inherits:
-
Collection
- Object
- Array
- Collection
- Mailchimp::List::Members
- Defined in:
- lib/mailchimp_api_v3/member.rb
Constant Summary collapse
- PATH_KEY =
DATA_KEY = 'members'.freeze
- CHILD_CLASS =
Member
Constants included from Collection::Paging
Collection::Paging::DEFAULT_PAGE_SIZE
Instance Method Summary collapse
Methods inherited from Collection
#count, #find_by, #first_or_create, #initialize, #name_field, #path, #where
Methods included from Collection::Paging
#fetch_options, #find_each, #find_in_pages, #invalidate_current_page, #offset, #page, #page_array, #page_children, #page_size, #parse_options
Constructor Details
This class inherits a constructor from Mailchimp::Collection
Instance Method Details
#create(data) ⇒ Object
64 65 66 67 |
# File 'lib/mailchimp_api_v3/member.rb', line 64 def create(data) return super Mailchimp::List::Member.parse_name_from(data) if data.respond_to? :deep_stringify_keys raise Mailchimp::Exception::BadRequest, "Expecting a Hash, received a #{data.class}: #{data}" end |