Class: Twilio::REST::Oauth::V2::OauthAuthorizationServerList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ OauthAuthorizationServerList

Initialize the OauthAuthorizationServerList

Parameters:

  • version (Version)

    Version that contains the resource



26
27
28
29
30
31
32
33
# File 'lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb', line 26

def initialize(version)
    super(version)
    
    # Path Solution
    @solution = {  }
    @uri = "/oauth-authorization-server"
    
end

Instance Method Details

#fetchOauthAuthorizationServerInstance

Fetch the OauthAuthorizationServerInstance

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb', line 37

def fetch

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    payload = @version.fetch('GET', @uri, headers: headers)
    OauthAuthorizationServerInstance.new(
        @version,
        payload,
    )
end

#fetch_with_metadataOauthAuthorizationServerInstance

Fetch the OauthAuthorizationServerInstanceMetadata

Returns:



55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb', line 55

def 

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    
    
    
    response = @version.('GET', @uri, headers: headers)
    oauth_authorization_server_instance = OauthAuthorizationServerInstance.new(
        @version,
        response.body,
    )
    OauthAuthorizationServerInstanceMetadata.new(
        @version,
        oauth_authorization_server_instance,
        response.headers,
        response.status_code
    )
end

#to_sObject

Provide a user friendly representation



80
81
82
# File 'lib/twilio-ruby/rest/oauth/v2/oauth_authorization_server.rb', line 80

def to_s
    '#<Twilio.Oauth.V2.OauthAuthorizationServerList>'
end