Method: CreateSend::Subscriber.add
- Defined in:
- lib/createsend/subscriber.rb
.add(list_id, email_address, name, custom_fields, resubscribe) ⇒ Object
Adds a subscriber to a subscriber list.
23 24 25 26 27 28 29 30 31 |
# File 'lib/createsend/subscriber.rb', line 23 def self.add(list_id, email_address, name, custom_fields, resubscribe) = { :body => { :EmailAddress => email_address, :Name => name, :CustomFields => custom_fields, :Resubscribe => resubscribe }.to_json } response = CreateSend.post "/subscribers/#{list_id}.json", response.parsed_response end |