Class: Mosaic::Lyris::List
Instance Attribute Summary collapse
-
#cache_time ⇒ Object
readonly
Returns the value of attribute cache_time.
-
#clickthru_url ⇒ Object
readonly
Returns the value of attribute clickthru_url.
-
#footer_html ⇒ Object
readonly
Returns the value of attribute footer_html.
-
#footer_text ⇒ Object
readonly
Returns the value of attribute footer_text.
-
#handle_autoreply ⇒ Object
readonly
Returns the value of attribute handle_autoreply.
-
#handle_autoreply_email ⇒ Object
readonly
Returns the value of attribute handle_autoreply_email.
-
#handle_unsubscribe ⇒ Object
readonly
Returns the value of attribute handle_unsubscribe.
-
#handle_unsubscribe_email ⇒ Object
readonly
Returns the value of attribute handle_unsubscribe_email.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#last_sent ⇒ Object
readonly
Returns the value of attribute last_sent.
-
#members ⇒ Object
readonly
Returns the value of attribute members.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#reply_forward_email ⇒ Object
readonly
Returns the value of attribute reply_forward_email.
-
#reply_forward_subject ⇒ Object
readonly
Returns the value of attribute reply_forward_subject.
-
#reply_from_email ⇒ Object
readonly
Returns the value of attribute reply_from_email.
-
#reply_from_name ⇒ Object
readonly
Returns the value of attribute reply_from_name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Object
callback_url, configuration, configuration=, default_list_id, default_trigger_id, get_array_data, get_boolean_data, get_data, get_date_data, get_demographic_data, get_element, get_integer_data, get_integer_element, get_time_data, get_time_element, get_time_offset_data, get_xml_time_data, #initialize, load_configuration, logger, logger=, password, post, put_array_data, put_data, put_demographic_data, put_extra_data, server, site_id, #to_param, triggers
Constructor Details
This class inherits a constructor from Mosaic::Lyris::Object
Instance Attribute Details
#cache_time ⇒ Object (readonly)
Returns the value of attribute cache_time.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def cache_time @cache_time end |
#clickthru_url ⇒ Object (readonly)
Returns the value of attribute clickthru_url.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def clickthru_url @clickthru_url end |
#footer_html ⇒ Object (readonly)
Returns the value of attribute footer_html.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def @footer_html end |
#footer_text ⇒ Object (readonly)
Returns the value of attribute footer_text.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def @footer_text end |
#handle_autoreply ⇒ Object (readonly)
Returns the value of attribute handle_autoreply.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def handle_autoreply @handle_autoreply end |
#handle_autoreply_email ⇒ Object (readonly)
Returns the value of attribute handle_autoreply_email.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def handle_autoreply_email @handle_autoreply_email end |
#handle_unsubscribe ⇒ Object (readonly)
Returns the value of attribute handle_unsubscribe.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def handle_unsubscribe @handle_unsubscribe end |
#handle_unsubscribe_email ⇒ Object (readonly)
Returns the value of attribute handle_unsubscribe_email.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def handle_unsubscribe_email @handle_unsubscribe_email end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def id @id end |
#last_sent ⇒ Object (readonly)
Returns the value of attribute last_sent.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def last_sent @last_sent end |
#members ⇒ Object (readonly)
Returns the value of attribute members.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def members @members end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def @messages end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def name @name end |
#reply_forward_email ⇒ Object (readonly)
Returns the value of attribute reply_forward_email.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def reply_forward_email @reply_forward_email end |
#reply_forward_subject ⇒ Object (readonly)
Returns the value of attribute reply_forward_subject.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def reply_forward_subject @reply_forward_subject end |
#reply_from_email ⇒ Object (readonly)
Returns the value of attribute reply_from_email.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def reply_from_email @reply_from_email end |
#reply_from_name ⇒ Object (readonly)
Returns the value of attribute reply_from_name.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def reply_from_name @reply_from_name end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/mosaic/lyris/list.rb', line 6 def status @status end |
Class Method Details
.add(name, attributes = {}) ⇒ Object
34 35 36 37 38 39 40 |
# File 'lib/mosaic/lyris/list.rb', line 34 def add(name, attributes = {}) reply = post('list', 'add') do |request| put_data(request, 'name', name) put_extra_data(request, 'CLICKTHRU_URL', attributes[:clickthru_url]) end new attributes.merge(:id => reply.at('/DATASET/DATA').inner_html.to_i, :name => name) end |
.delete(id) ⇒ Object
42 43 44 45 46 47 |
# File 'lib/mosaic/lyris/list.rb', line 42 def delete(id) reply = post('list', 'delete') do |request| request.MLID id end new :id => id end |
.query(what) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/mosaic/lyris/list.rb', line 49 def query(what) reply = post('list', query_type(what)) reply.search('/DATASET/RECORD').collect do |record| new :cache_time => get_xml_time_data(record, 'cache-time'), :id => get_integer_data(record, 'name', :id), :last_sent => get_date_data(record, 'last-sent'), :members => get_integer_data(record, 'members'), :messages => get_integer_data(record, 'messages'), :name => get_data(record, 'name'), :status => get_data(record, 'status') end end |
Instance Method Details
#active? ⇒ Boolean
25 26 27 |
# File 'lib/mosaic/lyris/list.rb', line 25 def active? status == 'active' end |
#archived? ⇒ Boolean
29 30 31 |
# File 'lib/mosaic/lyris/list.rb', line 29 def archived? status == 'archived' end |