Class: Wework::Api::Corp

Inherits:
Base
  • Object
show all
Includes:
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 Cipher

#decrypt, #encrypt, #generate_xml, #msg_decrypt, #msg_encrypt, #pack, #signature, #unpack

Methods inherited from Base

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

Methods included from Methods::Batch

#batch_getresult, #batch_invite, #batch_replaceparty, #batch_replaceuser, #batch_syncuser

Methods included from Methods::Crm

#crm_get_external_contact

Methods included from Methods::Tag

#tag_addtagusers, #tag_create, #tag_delete, #tag_deltagusers, #tag_get, #tag_list, #tag_update

Methods included from Methods::Department

#department_create, #department_delete, #department_list, #department_update

Methods included from Methods::User

#authsucc, #convert_to_openid, #convert_to_userid, #user_batchdelete, #user_create, #user_delete, #user_get, #user_list, #user_simplelist, #user_update

Methods included from Methods::Media

#get_media_url, #media_get, #media_upload

Constructor Details

#initialize(options = {}) ⇒ Corp

Returns a new instance of Corp.



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

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.



7
8
9
# File 'lib/wework/api/corp.rb', line 7

def permanent_code
  @permanent_code
end

#suiteObject (readonly)

Returns the value of attribute suite.



7
8
9
# File 'lib/wework/api/corp.rb', line 7

def suite
  @suite
end

Instance Method Details

#agent(agent_id) ⇒ Object



15
16
17
# File 'lib/wework/api/corp.rb', line 15

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