Class: Webex::User::Activation

Inherits:
Object
  • Object
show all
Includes:
Webex
Defined in:
lib/webex/user/activation.rb

Overview

comment

Constant Summary

Constants included from Webex

CONFIGURATION, VERSION

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Webex

#env_attributes!, #option_required!

Constructor Details

#initialize(attributes = {}) ⇒ Activation

Returns a new instance of Activation.



8
9
10
11
12
# File 'lib/webex/user/activation.rb', line 8

def initialize(attributes = {})
  attributes.each { |k, v| send("#{k}=", v) }
  env_attributes!
  option_required! :webex_id, :partner_id, :back_url
end

Instance Attribute Details

#back_urlObject

Returns the value of attribute back_url.



6
7
8
# File 'lib/webex/user/activation.rb', line 6

def back_url
  @back_url
end

#partner_idObject

Returns the value of attribute partner_id.



6
7
8
# File 'lib/webex/user/activation.rb', line 6

def partner_id
  @partner_id
end

#webex_idObject

Returns the value of attribute webex_id.



6
7
8
# File 'lib/webex/user/activation.rb', line 6

def webex_id
  @webex_id
end

Instance Method Details

#activateObject



14
15
16
17
# File 'lib/webex/user/activation.rb', line 14

def activate
  { params: generate_params(api_type: 'AC'),
    url: URI.join(CONFIGURATION.host_url + PATH_URL) }
end

#deactivateObject



19
20
21
22
# File 'lib/webex/user/activation.rb', line 19

def deactivate
  { params: generate_params(api_type: 'IN'),
    url: URI.join(CONFIGURATION.host_url + PATH_URL) }
end