Class: Clickmeetings::Open::Invitation

Inherits:
Model
  • Object
show all
Includes:
WithConference, WithLocale
Defined in:
lib/clickmeetings/models/open/invitation.rb

Instance Attribute Summary collapse

Attributes inherited from Model

#id

Class Method Summary collapse

Instance Method Summary collapse

Methods included from WithConference

#initialize

Methods inherited from Model

api_key, client_options, #default_headers, ping, with_account

Methods inherited from Model

#action_path, all, #client, client_options, create, #default_headers, #default_params, #destroy, find, #handle_response, #remote_path, set_resource_name, #update

Instance Attribute Details

#attendeesObject

Returns the value of attribute attendees.



9
10
11
# File 'lib/clickmeetings/models/open/invitation.rb', line 9

def attendees
  @attendees
end

#roleObject

Returns the value of attribute role.



9
10
11
# File 'lib/clickmeetings/models/open/invitation.rb', line 9

def role
  @role
end

#templateObject

Returns the value of attribute template.



9
10
11
# File 'lib/clickmeetings/models/open/invitation.rb', line 9

def template
  @template
end

Class Method Details

.send_emails(params = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/clickmeetings/models/open/invitation.rb', line 12

def send_emails(params = {})
  Storage.cm_current_conference =
    params.delete(:conference_id) if params[:conference_id].present?
  with_locale params.delete(:lang) do
    Clickmeetings.with_client(client_options) do
      Clickmeetings.client.post remote_url(locale),
        params.merge(default_params), default_headers
    end
  end
  new(params)
end

Instance Method Details

#remote_url(action = nil, params = {}) ⇒ Object



25
26
27
# File 'lib/clickmeetings/models/open/invitation.rb', line 25

def remote_url(action = nil, params = {})
  Conference.remote_path(:find, id: conference_id) + '/' + remote_path(action, params)
end