Sha256: aa947fd89c3e5b15f3fae5a190307594555d052ba3fa2c6249469f793cf98358
Contents?: true
Size: 961 Bytes
Versions: 13
Compression:
Stored size: 961 Bytes
Contents
module PortaText module Command module Api # The campaigns/:id/lifecycle endpoint. # https://github.com/PortaText/docs/wiki/REST-API#api_campaigns_lifecycle # # Author:: Marcelo Gornstein (mailto:marcelog@portatext.com) # Copyright:: Copyright (c) 2015 PortaText # License:: Apache-2.0 class CampaignLifecycle < Base def id(id) set :id, id end def start action 'start' end def pause action 'pause' end def resume action 'resume' end def cancel action 'cancel' end def endpoint(_method) fail 'Campaign id cant be null' if @args[:id].nil? id = @args[:id] @args.delete :id "campaigns/#{id}/lifecycle" end private def action(action) set :action, action end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems