Class: Twilio::REST::Oauth::V2::AuthorizeInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/oauth/v2/authorize.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ AuthorizeInstance

Initialize the AuthorizeInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this Authorize resource.

  • sid (String) —

    The SID of the Call resource to fetch.



173
174
175
176
177
178
179
180
181
# File 'lib/twilio-ruby/rest/oauth/v2/authorize.rb', line 173

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'redirect_to' => payload['redirect_to'],
    }
end

Instance Method Details

#inspect ⇒ Object

Provide a detailed, user friendly representation



198
199
200
# File 'lib/twilio-ruby/rest/oauth/v2/authorize.rb', line 198

def inspect
    "<Twilio.Oauth.V2.AuthorizeInstance>"
end

#redirect_to ⇒ String

Returns The callback URL.

Returns:

  • (String) —

    The callback URL



186
187
188
# File 'lib/twilio-ruby/rest/oauth/v2/authorize.rb', line 186

def redirect_to
    @properties['redirect_to']
end

#to_s ⇒ Object

Provide a user friendly representation



192
193
194
# File 'lib/twilio-ruby/rest/oauth/v2/authorize.rb', line 192

def to_s
    "<Twilio.Oauth.V2.AuthorizeInstance>"
end