Class: GoToWebinar::Attendee
- Inherits:
-
Object
- Object
- GoToWebinar::Attendee
- Defined in:
- lib/go_to_webinar/attendee.rb
Class Method Summary collapse
Instance Method Summary collapse
- #attendance ⇒ Object
- #attendance_time_in_seconds ⇒ Object
- #email ⇒ Object
- #first_name ⇒ Object
-
#initialize(data) ⇒ Attendee
constructor
A new instance of Attendee.
- #join_time ⇒ Object
- #last_name ⇒ Object
- #leave_time ⇒ Object
- #registrant_key ⇒ Object
- #session_key ⇒ Object
Constructor Details
#initialize(data) ⇒ Attendee
Returns a new instance of Attendee.
3 4 5 |
# File 'lib/go_to_webinar/attendee.rb', line 3 def initialize(data) @data = data end |
Class Method Details
.all_for_session(webinar_key:, session_key:) ⇒ Object
43 44 45 |
# File 'lib/go_to_webinar/attendee.rb', line 43 def self.all_for_session(webinar_key:, session_key:) make(GoToWebinar.client.get("/organizers/:organizer_key:/webinars/#{webinar_key}/sessions/#{session_key}/attendees")) end |
.make(data) ⇒ Object
47 48 49 |
# File 'lib/go_to_webinar/attendee.rb', line 47 def self.make(data) data.map { |registrant| Attendee.new(registrant) } end |
Instance Method Details
#attendance ⇒ Object
31 32 33 |
# File 'lib/go_to_webinar/attendee.rb', line 31 def attendance @data['attendance'] end |
#attendance_time_in_seconds ⇒ Object
23 24 25 |
# File 'lib/go_to_webinar/attendee.rb', line 23 def attendance_time_in_seconds @data['attendanceTimeInSeconds'].to_s end |
#email ⇒ Object
19 20 21 |
# File 'lib/go_to_webinar/attendee.rb', line 19 def email @data['email'].to_s end |
#first_name ⇒ Object
11 12 13 |
# File 'lib/go_to_webinar/attendee.rb', line 11 def first_name @data['firstName'].to_s end |
#join_time ⇒ Object
35 36 37 |
# File 'lib/go_to_webinar/attendee.rb', line 35 def join_time attendance['joinTime'].to_datetime end |
#last_name ⇒ Object
15 16 17 |
# File 'lib/go_to_webinar/attendee.rb', line 15 def last_name @data['lastName'].to_s end |
#leave_time ⇒ Object
39 40 41 |
# File 'lib/go_to_webinar/attendee.rb', line 39 def leave_time attendance['leaveTime'].to_datetime end |
#registrant_key ⇒ Object
7 8 9 |
# File 'lib/go_to_webinar/attendee.rb', line 7 def registrant_key @data['registrantKey'].to_s end |
#session_key ⇒ Object
27 28 29 |
# File 'lib/go_to_webinar/attendee.rb', line 27 def session_key @data['sessionKey'].to_s end |