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



21
22
23
24
25
26
27
28
29
# File 'lib/twilio-ruby/rest/oauth/v1.rb', line 21

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

Instance Method Details

#device_codeTwilio::REST::Oauth::V1::DeviceCodeList



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

Returns:

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


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

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

#openid_discoveryTwilio::REST::Oauth::V1::openidDiscoveryContext

Returns:

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


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

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

#to_sObject

Provide a user friendly representation



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

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

#tokenTwilio::REST::Oauth::V1::TokenList



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

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

#user_infoTwilio::REST::Oauth::V1::userInfoContext

Returns:

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


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

def 
    @user_info ||= UserInfoContext.new self
end