Class: MessagePub::Reply

Inherits:
Object
  • Object
show all
Defined in:
lib/messagepub/reply.rb

Overview

Represents a MessagePub reply.. For more info, visit messagepub.com/documentation/replies

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Reply

Returns a new instance of Reply.



24
25
26
27
28
29
30
# File 'lib/messagepub/reply.rb', line 24

def initialize(options={})
  @notification_id = options[:notification_id]
  @channel = options[:channel]
  @address = options[:address]
  @body = options[:body]
  @id = nil
end

Instance Attribute Details

#addressObject

The address for the person that replies. Depending on the channel, this can be a phone number, an email, a username, etc…



16
17
18
# File 'lib/messagepub/reply.rb', line 16

def address
  @address
end

#bodyObject

The content of the reply.



19
20
21
# File 'lib/messagepub/reply.rb', line 19

def body
  @body
end

#channelObject

The communication channel where this reply was done. Must be one of the following: sms, phone, email, twitter, gchat, aim.



12
13
14
# File 'lib/messagepub/reply.rb', line 12

def channel
  @channel
end

#idObject

The unique id for this reply.



22
23
24
# File 'lib/messagepub/reply.rb', line 22

def id
  @id
end

#notification_idObject

The ID of the notification associated with this reply.



8
9
10
# File 'lib/messagepub/reply.rb', line 8

def notification_id
  @notification_id
end