Class: Mailstro::ListUnsubscribe
- Defined in:
- lib/mailstro/list_unsubscribe.rb
Instance Attribute Summary collapse
-
#contact_email ⇒ Object
readonly
Returns the value of attribute contact_email.
-
#list_name ⇒ Object
readonly
Returns the value of attribute list_name.
-
#list_type ⇒ Object
readonly
Returns the value of attribute list_type.
Instance Method Summary collapse
- #deliver ⇒ Object
-
#initialize(contact_email, list_type, list_name) ⇒ ListUnsubscribe
constructor
A new instance of ListUnsubscribe.
Constructor Details
#initialize(contact_email, list_type, list_name) ⇒ ListUnsubscribe
Returns a new instance of ListUnsubscribe.
5 6 7 8 9 |
# File 'lib/mailstro/list_unsubscribe.rb', line 5 def initialize(contact_email, list_type, list_name) @contact_email = contact_email @list_type = list_type @list_name = list_name end |
Instance Attribute Details
#contact_email ⇒ Object (readonly)
Returns the value of attribute contact_email.
3 4 5 |
# File 'lib/mailstro/list_unsubscribe.rb', line 3 def contact_email @contact_email end |
#list_name ⇒ Object (readonly)
Returns the value of attribute list_name.
3 4 5 |
# File 'lib/mailstro/list_unsubscribe.rb', line 3 def list_name @list_name end |
#list_type ⇒ Object (readonly)
Returns the value of attribute list_type.
3 4 5 |
# File 'lib/mailstro/list_unsubscribe.rb', line 3 def list_type @list_type end |
Instance Method Details
#deliver ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/mailstro/list_unsubscribe.rb', line 11 def deliver delete("lists/subscribers", :contact_email => @contact_email, :list_type => @list_type, :list_name => @list_name ) end |