Class: Twilio::REST::Oauth::V2::AuthorizeList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Oauth::V2::AuthorizeList
- Defined in:
- lib/twilio-ruby/rest/oauth/v2/authorize.rb
Instance Method Summary collapse
-
#fetch(response_type: :unset, client_id: :unset, redirect_uri: :unset, scope: :unset, state: :unset, code_challenge: :unset, code_challenge_method: :unset) ⇒ AuthorizeInstance
Fetch the AuthorizeInstance.
-
#fetch_with_metadata(response_type: :unset, client_id: :unset, redirect_uri: :unset, scope: :unset, state: :unset, code_challenge: :unset, code_challenge_method: :unset) ⇒ AuthorizeInstance
Fetch the AuthorizeInstanceMetadata.
-
#initialize(version) ⇒ AuthorizeList
constructor
Initialize the AuthorizeList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ AuthorizeList
Initialize the AuthorizeList
26 27 28 29 30 31 32 33 |
# File 'lib/twilio-ruby/rest/oauth/v2/authorize.rb', line 26 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/authorize" end |
Instance Method Details
#fetch(response_type: :unset, client_id: :unset, redirect_uri: :unset, scope: :unset, state: :unset, code_challenge: :unset, code_challenge_method: :unset) ⇒ AuthorizeInstance
Fetch the AuthorizeInstance
44 45 46 47 48 49 50 51 52 53 54 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/authorize.rb', line 44 def fetch( response_type: :unset, client_id: :unset, redirect_uri: :unset, scope: :unset, state: :unset, code_challenge: :unset, code_challenge_method: :unset ) params = Twilio::Values.of({ 'response_type' => response_type, 'client_id' => client_id, 'redirect_uri' => redirect_uri, 'scope' => scope, 'state' => state, 'code_challenge' => code_challenge, 'code_challenge_method' => code_challenge_method, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, params: params, headers: headers) AuthorizeInstance.new( @version, payload, ) end |
#fetch_with_metadata(response_type: :unset, client_id: :unset, redirect_uri: :unset, scope: :unset, state: :unset, code_challenge: :unset, code_challenge_method: :unset) ⇒ AuthorizeInstance
Fetch the AuthorizeInstanceMetadata
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/twilio-ruby/rest/oauth/v2/authorize.rb', line 86 def ( response_type: :unset, client_id: :unset, redirect_uri: :unset, scope: :unset, state: :unset, code_challenge: :unset, code_challenge_method: :unset ) params = Twilio::Values.of({ 'response_type' => response_type, 'client_id' => client_id, 'redirect_uri' => redirect_uri, 'scope' => scope, 'state' => state, 'code_challenge' => code_challenge, 'code_challenge_method' => code_challenge_method, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, params: params, headers: headers) = AuthorizeInstance.new( @version, response.body, ) AuthorizeInstanceMetadata.new( @version, , response.headers, response.status_code ) end |
#to_s ⇒ Object
Provide a user friendly representation
128 129 130 |
# File 'lib/twilio-ruby/rest/oauth/v2/authorize.rb', line 128 def to_s '#<Twilio.Oauth.V2.AuthorizeList>' end |