class ExpressPigeon::AutoResponders

Attributes

endpoint[R]

Public Class Methods

new() click to toggle source
# File lib/expresspigeon-ruby/auto_responders.rb, line 5
def initialize
  @endpoint = 'auto_responders'
end

Public Instance Methods

all() click to toggle source

Get all autoresponders

Returns an array of autoresponders.

# File lib/expresspigeon-ruby/auto_responders.rb, line 15
def all
  get @endpoint
end
bounced(auto_responder_id, autoresponder_part_id) click to toggle source

Reports bounces for autoresponder part

:param auto_responder_id: autoresponder id to be stopped for a contact :param auto_responder_part_id: id of the autoresponder part in questions

# File lib/expresspigeon-ruby/auto_responders.rb, line 59
def bounced(auto_responder_id, autoresponder_part_id)
  get "#{@endpoint}/#{auto_responder_id}/#{autoresponder_part_id}/bounced"
end
report(auto_responder_id) click to toggle source

Reports for a single responder

:param auto_responder_id: autoresponder id to be stopped for a contact :param email: contact email

# File lib/expresspigeon-ruby/auto_responders.rb, line 49
def report(auto_responder_id)
  get "#{@endpoint}/#{auto_responder_id}"
end
spam(auto_responder_id, autoresponder_part_id) click to toggle source

Get spam reports for autoresponder part

:param auto_responder_id: autoresponder id to be stopped for a contact :param auto_responder_part_id: id of the autoresponder part in questions

# File lib/expresspigeon-ruby/auto_responders.rb, line 78
def spam(auto_responder_id, autoresponder_part_id)
  get "#{@endpoint}/#{auto_responder_id}/#{autoresponder_part_id}/spam"
end
start(auto_responder_id, email) click to toggle source

Start for a contact

This call starts an autoresponder for a contact.

:param auto_responder_id: autoresponder id to be started for a contact :param email: contact email

# File lib/expresspigeon-ruby/auto_responders.rb, line 27
def start(auto_responder_id, email)
  post "#{@endpoint}/#{auto_responder_id}/start", email: email
end
stop(auto_responder_id, email) click to toggle source

Stop for a contact

This call stops an autoresponder for a contact.

:param auto_responder_id: autoresponder id to be stopped for a contact :param email: contact email

Docs: expresspigeon.com/api#auto_responders_stop

# File lib/expresspigeon-ruby/auto_responders.rb, line 40
def stop(auto_responder_id, email)
  post "#{@endpoint}/#{auto_responder_id}/stop", email: email
end
unsubscribed(auto_responder_id, autoresponder_part_id) click to toggle source

Reports unsubscribed for autoresponder part

:param auto_responder_id: autoresponder id to be stopped for a contact :param auto_responder_part_id: id of the autoresponder part in questions

# File lib/expresspigeon-ruby/auto_responders.rb, line 68
def unsubscribed(auto_responder_id, autoresponder_part_id)
  get "#{@endpoint}/#{auto_responder_id}/#{autoresponder_part_id}/unsubscribed"
end