Class: Blackbaud::AcademicYear
- Inherits:
-
BlackbaudObject
- Object
- BlackbaudObject
- Blackbaud::AcademicYear
- Defined in:
- lib/blackbaud-client/api/academic_year.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#ea7_academic_year_id ⇒ Object
Returns the value of attribute ea7_academic_year_id.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#links ⇒ Object
Returns the value of attribute links.
-
#school_id ⇒ Object
Returns the value of attribute school_id.
-
#school_name ⇒ Object
Returns the value of attribute school_name.
-
#sessions ⇒ Object
Returns the value of attribute sessions.
-
#short_description ⇒ Object
Returns the value of attribute short_description.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
Attributes inherited from BlackbaudObject
Instance Method Summary collapse
- #connection_string ⇒ Object
-
#initialize(options) ⇒ AcademicYear
constructor
A new instance of AcademicYear.
- #terms ⇒ Object
Methods inherited from BlackbaudObject
#format_date, #to_hash, #to_json
Constructor Details
#initialize(options) ⇒ AcademicYear
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 5 def initialize() .fetch(:values)["sessions"].map! {|s| Blackbaud::Session.new(values: s)} if .fetch(:values)["sessions"] ["start_date", "end_date"].each do |date| send("#{date}=".intern, format_date(.fetch(:values)["#{date}"])) .fetch(:values).delete("#{date}") end super end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 3 def description @description end |
#ea7_academic_year_id ⇒ Object
Returns the value of attribute ea7_academic_year_id.
3 4 5 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 3 def ea7_academic_year_id @ea7_academic_year_id end |
#end_date ⇒ Object
Returns the value of attribute end_date.
3 4 5 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 3 def end_date @end_date end |
#links ⇒ Object
Returns the value of attribute links.
3 4 5 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 3 def links @links end |
#school_id ⇒ Object
Returns the value of attribute school_id.
3 4 5 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 3 def school_id @school_id end |
#school_name ⇒ Object
Returns the value of attribute school_name.
3 4 5 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 3 def school_name @school_name end |
#sessions ⇒ Object
Returns the value of attribute sessions.
3 4 5 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 3 def sessions @sessions end |
#short_description ⇒ Object
Returns the value of attribute short_description.
3 4 5 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 3 def short_description @short_description end |
#start_date ⇒ Object
Returns the value of attribute start_date.
3 4 5 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 3 def start_date @start_date end |
Instance Method Details
#connection_string ⇒ Object
17 18 19 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 17 def connection_string "academic_years/#{self.ea7_academic_year_id}" end |
#terms ⇒ Object
21 22 23 |
# File 'lib/blackbaud-client/api/academic_year.rb', line 21 def terms self.sessions.inject([]) {|r, s| r + s.terms} end |