module Eloqua::Contact
Public Instance Methods
contact_activity(contact_id, options={})
click to toggle source
# File lib/eloqua_api/rest/contact.rb, line 38 def contact_activity(contact_id, options={}) options[:startDate] ||= 1.year.ago.to_i options[:endDate] ||= Time.now.to_i options[:type] ||= "webVisit" options[:count] ||= 1000 get("data/activities/contact/%s" % contact_id, options) end
create_contact(data)
click to toggle source
# File lib/eloqua_api/rest/contact.rb, line 23 def create_contact(data) post("data/contact", data) end
find_contact_by_email(email, options={})
click to toggle source
# File lib/eloqua_api/rest/contact.rb, line 3 def find_contact_by_email(email, options={}) options[:depth] ||= "minimal" options[:count] ||= 1 options[:search] = email get("data/contacts", options) end
get_contact(contact_id, options={})
click to toggle source
# File lib/eloqua_api/rest/contact.rb, line 11 def get_contact(contact_id, options={}) options[:depth] ||= "minimal" get("data/contact/#{contact_id}", options) end
get_contact_fields(options={})
click to toggle source
# File lib/eloqua_api/rest/contact.rb, line 17 def get_contact_fields(options={}) options[:depth] ||= "minimal" get("assets/contact/fields", options) end
get_contacts(options={})
click to toggle source
# File lib/eloqua_api/rest/contact.rb, line 31 def get_contacts(options={}) options[:count] ||= 10 options[:depth] ||= "minimal" get("data/contacts", options) end
update_contact(contact_id, data)
click to toggle source
# File lib/eloqua_api/rest/contact.rb, line 27 def update_contact(contact_id, data) put("data/contact/#{contact_id}", data) end