Class: PlanningCenter::Organization

Inherits:
Base
  • Object
show all
Defined in:
lib/planning_center/organization.rb

Instance Attribute Summary

Attributes inherited from Base

#attrs

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, #method_missing, #respond_to_missing?

Constructor Details

This class inherits a constructor from PlanningCenter::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class PlanningCenter::Base

Class Method Details

.find(client) ⇒ Object



5
6
7
8
# File 'lib/planning_center/organization.rb', line 5

def self.find(client)
  attrs = client.get('/organization.json')
  new(attrs, client)
end

Instance Method Details

#service_typesObject



10
11
12
13
14
# File 'lib/planning_center/organization.rb', line 10

def service_types
  attrs['service_types'].map do |service_type_attrs|
    ServiceType.new(service_type_attrs, client)
  end
end