class PortaText::Command::Api::CampaignLifecycle
The campaigns/:id/lifecycle endpoint. github.com/PortaText/docs/wiki/REST-API#api_campaigns_lifecycle
- Author
-
Marcelo Gornstein (marcelog@portatext.com)
- Copyright
-
Copyright © 2015
PortaText
- License
-
Apache-2.0
Public Instance Methods
cancel()
click to toggle source
# File lib/portatext/command/api/campaign_lifecycle.rb, line 27 def cancel action 'cancel' end
endpoint(_method)
click to toggle source
# File lib/portatext/command/api/campaign_lifecycle.rb, line 31 def endpoint(_method) raise 'Campaign id cant be null' if @args[:id].nil? id = @args[:id] @args.delete :id "campaigns/#{id}/lifecycle" end
id(id)
click to toggle source
# File lib/portatext/command/api/campaign_lifecycle.rb, line 11 def id(id) set :id, id end
pause()
click to toggle source
# File lib/portatext/command/api/campaign_lifecycle.rb, line 19 def pause action 'pause' end
resume()
click to toggle source
# File lib/portatext/command/api/campaign_lifecycle.rb, line 23 def resume action 'resume' end
start()
click to toggle source
# File lib/portatext/command/api/campaign_lifecycle.rb, line 15 def start action 'start' end
Private Instance Methods
action(action)
click to toggle source
# File lib/portatext/command/api/campaign_lifecycle.rb, line 40 def action(action) set :action, action end