class Podio::Promotion
Public Class Methods
assign(promotion_id, user_id)
click to toggle source
# File lib/podio/models/promotion.rb, line 60 def assign(promotion_id, user_id) Podio.connection.post("/promotion/#{promotion_id}/assign/#{user_id}") end
click(promotion_id, body = nil)
click to toggle source
# File lib/podio/models/promotion.rb, line 81 def click(promotion_id, body = nil) Podio.connection.post { |req| req.url "/promotion/#{promotion_id}/click" req.body = body } end
create(attributes)
click to toggle source
# File lib/podio/models/promotion.rb, line 30 def create(attributes) member Podio.connection.post { |req| req.url("/promotion/") req.body = attributes }.body end
delete(promotion_id)
click to toggle source
# File lib/podio/models/promotion.rb, line 52 def delete(promotion_id) Podio.connection.delete("/promotion/#{promotion_id}") end
disable(promotion_id)
click to toggle source
# File lib/podio/models/promotion.rb, line 48 def disable(promotion_id) member Podio.connection.post("/promotion/#{promotion_id}/disable").body end
enable(promotion_id)
click to toggle source
# File lib/podio/models/promotion.rb, line 44 def enable(promotion_id) member Podio.connection.post("/promotion/#{promotion_id}/enable").body end
end(promotion_id, body = nil)
click to toggle source
# File lib/podio/models/promotion.rb, line 74 def end(promotion_id, body = nil) Podio.connection.post { |req| req.url "/promotion/#{promotion_id}/end" req.body = body } end
find(promotion_id)
click to toggle source
# File lib/podio/models/promotion.rb, line 26 def find(promotion_id) member Podio.connection.get("/promotion/#{promotion_id}").body end
find_all(options={})
click to toggle source
# File lib/podio/models/promotion.rb, line 20 def find_all(options={}) list Podio.connection.get { |req| req.url("/promotion/", options) }.body end
find_for_context(context_name, options = {})
click to toggle source
# File lib/podio/models/promotion.rb, line 64 def find_for_context(context_name, options = {}) result = Podio.connection.get("/promotion/#{context_name}", options) if result.body.present? member(result.body) else nil end end
stats(promotion_id)
click to toggle source
# File lib/podio/models/promotion.rb, line 56 def stats(promotion_id) Podio.connection.get("/promotion/#{promotion_id}/stats").body end
update(promotion_id, attributes)
click to toggle source
# File lib/podio/models/promotion.rb, line 37 def update(promotion_id, attributes) member Podio.connection.put { |req| req.url("/promotion/#{promotion_id}") req.body = attributes }.body end