Class: GetResponse::FollowUp

Inherits:
Message
  • Object
show all
Defined in:
lib/get_response/follow_up.rb

Instance Attribute Summary collapse

Attributes inherited from Message

#created_on, #flags, #id, #subject, #type

Instance Method Summary collapse

Methods inherited from Message

#contents, #initialize, #links, #stats

Constructor Details

This class inherits a constructor from GetResponse::Message

Instance Attribute Details

#day_of_cycleObject

Returns the value of attribute day_of_cycle.



5
6
7
# File 'lib/get_response/follow_up.rb', line 5

def day_of_cycle
  @day_of_cycle
end

Instance Method Details

#destroyObject

Delete follow up message.



8
9
10
11
# File 'lib/get_response/follow_up.rb', line 8

def destroy
  response = @connection.send_request("delete_follow_up", :message => @id)["result"]
  response["deleted"].to_i == 1
end

#saveObject

Save follow-up message. When object can’t be saved GetResponseError is raised, otherwise returns true.



27
28
29
30
31
32
33
34
35
36
# File 'lib/get_response/follow_up.rb', line 27

def save
  params = {
    campaign: @campaign_id,
    subject: @subject,
    contents: @contents,
    day_of_cycle: @day_of_cycle
  }
  result = @connection.send_request(:add_follow_up, params)
  result["added"] == 1
end