class PlanningCenter::Plan
Public Class Methods
find(id, client)
click to toggle source
# File lib/planning_center/plan.rb, line 31 def self.find(id, client) attrs = client.get("/plans/#{id}.json") plan = new(attrs, client) plan.load_state = :loaded plan end
find_all_for_service_type(service_type_id, client)
click to toggle source
# File lib/planning_center/plan.rb, line 26 def self.find_all_for_service_type(service_type_id, client) plans = client.get("/service_types/#{service_type_id}/plans.json") plans.map { |plan| new(plan, client) } end
Public Instance Methods
items()
click to toggle source
# File lib/planning_center/plan.rb, line 38 def items attrs['items'].map { |item_attrs| Item.new(item_attrs, client) } end
Private Instance Methods
complete_attrs()
click to toggle source
# File lib/planning_center/plan.rb, line 44 def complete_attrs @complete_attrs ||= client.get("/plans/#{id}.json") end