Class: Twilio::REST::Iam::V1
- 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/new_api_key.rb,
lib/twilio-ruby/rest/iam/v1/get_api_keys.rb
Defined Under Namespace
Classes: ApiKeyContext, ApiKeyInstance, ApiKeyList, ApiKeyPage, GetApiKeysInstance, GetApiKeysList, GetApiKeysPage, NewApiKeyInstance, NewApiKeyList, NewApiKeyPage, TokenInstance, TokenList, TokenPage
Instance Attribute Summary
Attributes inherited from Version
Instance Method Summary collapse
- #api_key(sid = :unset) ⇒ Twilio::REST::Iam::V1::ApiKeyContext, Twilio::REST::Iam::V1::ApiKeyList
- #get_api_keys ⇒ Twilio::REST::Iam::V1::GetApiKeysList
-
#initialize(domain) ⇒ V1
constructor
Initialize the V1 version of Iam.
- #new_api_key ⇒ Twilio::REST::Iam::V1::NewApiKeyList
-
#to_s ⇒ Object
Provide a user friendly representation.
- #token ⇒ Twilio::REST::Iam::V1::TokenList
Methods inherited from Version
#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update
Constructor Details
#initialize(domain) ⇒ V1
Initialize the V1 version of Iam
21 22 23 24 25 26 27 28 |
# 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 @token = nil end |
Instance Method Details
#api_key(sid = :unset) ⇒ Twilio::REST::Iam::V1::ApiKeyContext, Twilio::REST::Iam::V1::ApiKeyList
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 34 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_keys ⇒ Twilio::REST::Iam::V1::GetApiKeysList
46 47 48 |
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 46 def get_api_keys @get_api_keys ||= GetApiKeysList.new self end |
#new_api_key ⇒ Twilio::REST::Iam::V1::NewApiKeyList
51 52 53 |
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 51 def new_api_key @new_api_key ||= NewApiKeyList.new self end |
#to_s ⇒ Object
Provide a user friendly representation
61 62 63 |
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 61 def to_s '<Twilio::REST::Iam::V1>'; end |
#token ⇒ Twilio::REST::Iam::V1::TokenList
56 57 58 |
# File 'lib/twilio-ruby/rest/iam/v1.rb', line 56 def token @token ||= TokenList.new self end |