Class: PortaText::Command::Api::SmsCampaign

Inherits:
Campaigns show all
Defined in:
lib/portatext/command/api/sms_campaign.rb

Overview

An SMS campaign. github.com/PortaText/docs/wiki/REST-API#api_campaigns

Author

Marcelo Gornstein ([email protected])

Copyright

Copyright © 2015 PortaText

License

Apache-2.0

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Campaigns

#all_subscribers, #contact, #contacts, #csv, #description, #endpoint, #from, #id, #name, #page, #save_to, #schedule, #set_setting, #to_contact_lists

Methods inherited from Base

#accept_content_type, #body, #content_type, #delete, #get, #patch, #post, #put, #set

Constructor Details

#initializeSmsCampaign

Returns a new instance of SmsCampaign.



24
25
26
27
# File 'lib/portatext/command/api/sms_campaign.rb', line 24

def initialize
  super
  set :type, 'sms'
end

Instance Method Details

#from_service(service_id) ⇒ Object



11
12
13
# File 'lib/portatext/command/api/sms_campaign.rb', line 11

def from_service(service_id)
  set :service_id, service_id
end

#text(text) ⇒ Object



20
21
22
# File 'lib/portatext/command/api/sms_campaign.rb', line 20

def text(text)
  set_setting :text, text
end

#use_template(template_id, variables) ⇒ Object



15
16
17
18
# File 'lib/portatext/command/api/sms_campaign.rb', line 15

def use_template(template_id, variables)
  set_setting :template_id, template_id
  set_setting :variables, variables
end