Class: Webex::Meeting::Attendee
- Inherits:
-
Object
- Object
- Webex::Meeting::Attendee
- Includes:
- Webex, Webex::Meeting
- Defined in:
- lib/webex/meeting/attendee.rb
Overview
comment
Constant Summary
Constants included from Webex::Meeting
Constants included from Webex
Instance Attribute Summary collapse
-
#attendees ⇒ Object
Returns the value of attribute attendees.
-
#back_url ⇒ Object
Returns the value of attribute back_url.
-
#cancel_mail ⇒ Object
Returns the value of attribute cancel_mail.
-
#email ⇒ Object
Returns the value of attribute email.
-
#invitation ⇒ Object
Returns the value of attribute invitation.
-
#meeting_key ⇒ Object
Returns the value of attribute meeting_key.
Instance Method Summary collapse
- #add ⇒ Object
- #delete ⇒ Object
- #detail ⇒ Object
- #generate_params(overwrite_params = {}) ⇒ Object
-
#initialize(attributes = {}) ⇒ Attendee
constructor
attendees: [FullName1, EmailAddress: nil, PhoneCountry: nil, PhoneArea: nil, PhoneLocal: nil, PhoneExt: nil, TimeZone: nil, Language: nil, Locale: nil, AddToAddressBook: nil, FullName1, EmailAddress: nil, PhoneCountry: nil, PhoneArea: nil, PhoneLocal: nil, PhoneExt: nil, TimeZone: nil, Language: nil, Locale: nil, AddToAddressBook: nil, FullName1, EmailAddress: nil, PhoneCountry: nil, PhoneArea: nil, PhoneLocal: nil, PhoneExt: nil, TimeZone: nil, Language: nil, Locale: nil, AddToAddressBook: nil].
Methods included from Webex::Meeting
Methods included from Webex
#env_attributes!, #option_required!
Constructor Details
#initialize(attributes = {}) ⇒ Attendee
attendees: [FullName1, EmailAddress: nil, PhoneCountry: nil, PhoneArea: nil, PhoneLocal: nil, PhoneExt: nil, TimeZone: nil, Language: nil, Locale: nil, AddToAddressBook: nil,
{FullName: FullName1, EmailAddress: nil, PhoneCountry: nil, PhoneArea: nil, PhoneLocal: nil, PhoneExt: nil, TimeZone: nil, Language: nil, Locale: nil, AddToAddressBook: nil},
{FullName: FullName1, EmailAddress: nil, PhoneCountry: nil, PhoneArea: nil, PhoneLocal: nil, PhoneExt: nil, TimeZone: nil, Language: nil, Locale: nil, AddToAddressBook: nil}]
12 13 14 15 16 |
# File 'lib/webex/meeting/attendee.rb', line 12 def initialize(attributes = {}) attributes.each { |k, v| send("#{k}=", v) } env_attributes! option_required! :back_url, :meeting_key end |
Instance Attribute Details
#attendees ⇒ Object
Returns the value of attribute attendees.
7 8 9 |
# File 'lib/webex/meeting/attendee.rb', line 7 def attendees @attendees end |
#back_url ⇒ Object
Returns the value of attribute back_url.
7 8 9 |
# File 'lib/webex/meeting/attendee.rb', line 7 def back_url @back_url end |
#cancel_mail ⇒ Object
Returns the value of attribute cancel_mail.
7 8 9 |
# File 'lib/webex/meeting/attendee.rb', line 7 def cancel_mail @cancel_mail end |
#email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'lib/webex/meeting/attendee.rb', line 7 def email @email end |
#invitation ⇒ Object
Returns the value of attribute invitation.
7 8 9 |
# File 'lib/webex/meeting/attendee.rb', line 7 def invitation @invitation end |
#meeting_key ⇒ Object
Returns the value of attribute meeting_key.
7 8 9 |
# File 'lib/webex/meeting/attendee.rb', line 7 def meeting_key @meeting_key end |
Instance Method Details
#add ⇒ Object
18 19 20 21 22 |
# File 'lib/webex/meeting/attendee.rb', line 18 def add option_required! :attendees res = Net::HTTP.post_form post_url, generate_params(api_type: 'AA') Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }] end |
#delete ⇒ Object
24 25 26 27 28 |
# File 'lib/webex/meeting/attendee.rb', line 24 def delete option_required! :email res = Net::HTTP.post_form post_url, generate_params(api_type: 'DA') Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }] end |
#detail ⇒ Object
30 31 32 33 34 |
# File 'lib/webex/meeting/attendee.rb', line 30 def detail option_required! :email res = Net::HTTP.post_form post_url, generate_params(api_type: 'MD') Hash[res.body.stringify_string.split('&').map! { |i| i.split('=') }] end |
#generate_params(overwrite_params = {}) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/webex/meeting/attendee.rb', line 36 def generate_params(overwrite_params = {}) result = {} result[:AT] = overwrite_params[:api_type] result[:MK] = meeting_key result[:BU] = back_url result[:EM] = email result[:EI] = invitation result.merge!(attendees_hash) if result[:AT] == 'AA' result[:EC] = cancel_mail? if result[:AT] == 'DA' result.delete_if { |k, v| v.nil? } end |