Class: Clickmeetings::Open::LoginHash

Inherits:
Model
  • Object
show all
Defined in:
lib/clickmeetings/models/open/login_hash.rb

Defined Under Namespace

Classes: InvalidParamsError

Class Attribute Summary collapse

Instance Attribute Summary collapse

Attributes inherited from Model

#id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

api_key, client_options, #default_headers, ping, with_account

Methods inherited from Model

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

Constructor Details

#initialize(params = {}) ⇒ LoginHash

Returns a new instance of LoginHash.



39
40
41
42
# File 'lib/clickmeetings/models/open/login_hash.rb', line 39

def initialize(params = {})
  super
  @conference_id ||= self.class.conference_id
end

Class Attribute Details

.conference_idObject (readonly)

Returns the value of attribute conference_id.



11
12
13
# File 'lib/clickmeetings/models/open/login_hash.rb', line 11

def conference_id
  @conference_id
end

Instance Attribute Details

#autologin_hashObject

Returns the value of attribute autologin_hash.



8
9
10
# File 'lib/clickmeetings/models/open/login_hash.rb', line 8

def autologin_hash
  @autologin_hash
end

#conference_idObject

Returns the value of attribute conference_id.



8
9
10
# File 'lib/clickmeetings/models/open/login_hash.rb', line 8

def conference_id
  @conference_id
end

#emailObject

Returns the value of attribute email.



8
9
10
# File 'lib/clickmeetings/models/open/login_hash.rb', line 8

def email
  @email
end

#nicknameObject

Returns the value of attribute nickname.



8
9
10
# File 'lib/clickmeetings/models/open/login_hash.rb', line 8

def nickname
  @nickname
end

#passwordObject

Returns the value of attribute password.



8
9
10
# File 'lib/clickmeetings/models/open/login_hash.rb', line 8

def password
  @password
end

#roleObject

Returns the value of attribute role.



8
9
10
# File 'lib/clickmeetings/models/open/login_hash.rb', line 8

def role
  @role
end

#tokenObject

Returns the value of attribute token.



8
9
10
# File 'lib/clickmeetings/models/open/login_hash.rb', line 8

def token
  @token
end

Class Method Details

.create(params = {}) ⇒ Object



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

def create(params = {})
  validate_params params
  params[:token] = params[:token].token if params[:token].is_a? Token
  @conference_id = params.delete(:conference_id)
  obj = super
  params.each do |key, value|
    obj.send("#{key}=", value)
  end
  obj
end

Instance Method Details

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



44
45
46
47
# File 'lib/clickmeetings/models/open/login_hash.rb', line 44

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