Class: Twilio::REST::Iam::V1
- Inherits:
-
Version
- Object
- Version
- Twilio::REST::Iam::V1
show all
- Defined in:
- lib/twilio-ruby/rest/iam/v1.rb,
lib/twilio-ruby/rest/iam/v1/token.rb,
lib/twilio-ruby/rest/iam/v1/api_key.rb,
lib/twilio-ruby/rest/iam/v1/o_auth_app.rb,
lib/twilio-ruby/rest/iam/v1/new_api_key.rb,
lib/twilio-ruby/rest/iam/v1/get_api_keys.rb,
lib/twilio-ruby/rest/iam/v1/role_permission.rb
Defined Under Namespace
Classes: ApiKeyContext, ApiKeyInstance, ApiKeyInstanceMetadata, ApiKeyList, ApiKeyListResponse, ApiKeyPage, ApiKeyPageMetadata, GetApiKeysInstance, GetApiKeysList, GetApiKeysListResponse, GetApiKeysPage, GetApiKeysPageMetadata, NewApiKeyInstance, NewApiKeyList, NewApiKeyListResponse, NewApiKeyPage, NewApiKeyPageMetadata, OAuthAppContext, OAuthAppInstance, OAuthAppInstanceMetadata, OAuthAppList, OAuthAppListResponse, OAuthAppPage, OAuthAppPageMetadata, RolePermissionInstance, RolePermissionList, RolePermissionListResponse, RolePermissionPage, RolePermissionPageMetadata, TokenInstance, TokenList, TokenListResponse, TokenPage, TokenPageMetadata
Instance Attribute Summary
Attributes inherited from Version
#domain, #version
Instance Method Summary
collapse
Methods inherited from Version
#absolute_url, #create, #create_with_metadata, #delete, #delete_with_metadata, #exception, #fetch, #fetch_with_metadata, #page, #patch, #read_limits, #relative_uri, #request, #stream, #stream_with_metadata, #update, #update_with_metadata
Constructor Details
#initialize(domain) ⇒ V1
Initialize the V1 version of Iam
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 21
def initialize(domain)
super
@version = 'v1'
@api_key = nil
@get_api_keys = nil
@new_api_key = nil
@o_auth_apps = nil
@role_permission = nil
@token = nil
end
|
Instance Method Details
36
37
38
39
40
41
42
43
44
45
46
|
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 36
def api_key(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@api_key ||= ApiKeyList.new self
else
ApiKeyContext.new(self, sid)
end
end
|
49
50
51
|
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 49
def get_api_keys
@get_api_keys ||= GetApiKeysList.new self
end
|
54
55
56
|
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 54
def new_api_key
@new_api_key ||= NewApiKeyList.new self
end
|
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 61
def o_auth_apps(sid=:unset)
if sid.nil?
raise ArgumentError, 'sid cannot be nil'
end
if sid == :unset
@o_auth_apps ||= OAuthAppList.new self
else
OAuthAppContext.new(self, sid)
end
end
|
75
76
77
78
79
80
81
82
83
84
85
|
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 75
def role_permission(role_sid=:unset)
if role_sid.nil?
raise ArgumentError, 'role_sid cannot be nil'
end
if role_sid == :unset
@role_permission ||= RolePermissionList.new self
else
RolePermissionList.new(self, role_sid: role_sid)
end
end
|
#to_s ⇒ Object
Provide a user friendly representation
93
94
95
|
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 93
def to_s
'<Twilio::REST::Iam::V1>';
end
|
88
89
90
|
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 88
def token
@token ||= TokenList.new self
end
|