Class: Twilio::REST::Iam::V1

Inherits:
Version
  • Object
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

#api_key(sid = :unset) ⇒ Twilio::REST::Iam::V1::ApiKeyContext, Twilio::REST::Iam::V1::ApiKeyList

Parameters:

  • sid (String) (defaults to: :unset)

    The Twilio-provided string that uniquely identifies the Key resource to fetch.

Returns:



36
37
38
39
40
41
42
43
44
45
# 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

#get_api_keysTwilio::REST::Iam::V1::GetApiKeysList



48
49
50
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 48

def get_api_keys
    @get_api_keys ||= GetApiKeysList.new self
end

#new_api_keyTwilio::REST::Iam::V1::NewApiKeyList



53
54
55
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 53

def new_api_key
    @new_api_key ||= NewApiKeyList.new self
end

#o_auth_apps(sid = :unset) ⇒ Twilio::REST::Iam::V1::OAuthAppContext, Twilio::REST::Iam::V1::OAuthAppList

Parameters:

  • sid (String) (defaults to: :unset)

    Unique ID (sid) of the OAuth app

Returns:



60
61
62
63
64
65
66
67
68
69
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 60

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

#role_permissionTwilio::REST::Iam::V1::RolePermissionList



72
73
74
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 72

def role_permission
    @role_permission ||= RolePermissionList.new self
end

#to_sObject

Provide a user friendly representation



82
83
84
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 82

def to_s
    '<Twilio::REST::Iam::V1>';
end

#tokenTwilio::REST::Iam::V1::TokenList



77
78
79
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 77

def token
    @token ||= TokenList.new self
end