Class: Twilio::REST::Oauth::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/oauth/v1.rb,
lib/twilio-ruby/rest/oauth/v1/oauth.rb,
lib/twilio-ruby/rest/oauth/v1/token.rb,
lib/twilio-ruby/rest/oauth/v1/user_info.rb,
lib/twilio-ruby/rest/oauth/v1/device_code.rb,
lib/twilio-ruby/rest/oauth/v1/openid_discovery.rb

Defined Under Namespace

Classes: DeviceCodeInstance, DeviceCodeList, DeviceCodePage, OauthContext, OauthInstance, OauthList, OauthPage, OpenidDiscoveryContext, OpenidDiscoveryInstance, OpenidDiscoveryList, OpenidDiscoveryPage, TokenInstance, TokenList, TokenPage, UserInfoContext, UserInfoInstance, UserInfoList, UserInfoPage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

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 Oauth



15
16
17
18
19
20
21
22
23
# File 'lib/twilio-ruby/rest/oauth/v1.rb', line 15

def initialize(domain)
  super
  @version = 'v1'
  @oauth = nil
  @device_code = nil
  @openid_discovery = nil
  @token = nil
  @user_info = nil
end

Instance Method Details

#device_codeTwilio::REST::Oauth::V1::DeviceCodeContext

Returns:

  • (Twilio::REST::Oauth::V1::DeviceCodeContext)


33
34
35
# File 'lib/twilio-ruby/rest/oauth/v1.rb', line 33

def device_code
  @device_code ||= DeviceCodeList.new self
end

#oauthTwilio::REST::Oauth::V1::OauthContext



27
28
29
# File 'lib/twilio-ruby/rest/oauth/v1.rb', line 27

def oauth
  @oauth ||= OauthContext.new self
end

#openid_discoveryTwilio::REST::Oauth::V1::OpenidDiscoveryContext



39
40
41
# File 'lib/twilio-ruby/rest/oauth/v1.rb', line 39

def openid_discovery
  @openid_discovery ||= OpenidDiscoveryContext.new self
end

#to_sObject

Provide a user friendly representation



57
58
59
# File 'lib/twilio-ruby/rest/oauth/v1.rb', line 57

def to_s
  '<Twilio::REST::Oauth::V1>'
end

#tokenTwilio::REST::Oauth::V1::TokenContext

Returns:

  • (Twilio::REST::Oauth::V1::TokenContext)


45
46
47
# File 'lib/twilio-ruby/rest/oauth/v1.rb', line 45

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

#user_infoTwilio::REST::Oauth::V1::UserInfoContext



51
52
53
# File 'lib/twilio-ruby/rest/oauth/v1.rb', line 51

def 
  @user_info ||= UserInfoContext.new self
end