Class: Wework::Api::Corp

Inherits:
Base
  • Object
show all
Includes:
Methods::Department, Methods::User, Cipher
Defined in:
lib/wework/api/corp.rb

Constant Summary

Constants included from Cipher

Cipher::BLOCK_SIZE, Cipher::CIPHER

Instance Attribute Summary collapse

Attributes inherited from Base

#corp_id, #options, #secret

Instance Method Summary collapse

Methods included from Methods::Department

#department_create, #department_delete, #department_list, #department_update

Methods included from Methods::User

#user_batchdelete, #user_create, #user_delete, #user_get, #user_list, #user_simplelist, #user_update

Methods included from Cipher

#decrypt, #encrypt, #pack, #unpack

Methods inherited from Base

#access_token, #get, #post, #post_file, #request, #valid?

Methods included from Methods::Media

#get_media_url, #media_get, #media_upload

Constructor Details

#initialize(options = {}) ⇒ Corp

Returns a new instance of Corp.



11
12
13
14
15
# File 'lib/wework/api/corp.rb', line 11

def initialize(options={})
  @suite = options.delete(:suite)
  @permanent_code = options.delete(:permanent_code)
  super(options)
end

Instance Attribute Details

#permanent_codeObject (readonly)

Returns the value of attribute permanent_code.



9
10
11
# File 'lib/wework/api/corp.rb', line 9

def permanent_code
  @permanent_code
end

#suiteObject (readonly)

Returns the value of attribute suite.



9
10
11
# File 'lib/wework/api/corp.rb', line 9

def suite
  @suite
end

Instance Method Details

#agent(agent_id) ⇒ Object



17
18
19
# File 'lib/wework/api/corp.rb', line 17

def agent(agent_id)
  Wework::Api::Agent.new(corp_id: corp_id, agent_id: agent_id, token_store: token_store)
end