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

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/oauth/v1/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.



112
113
114
115
116
117
118
119
# File 'lib/twilio-ruby/rest/oauth/v1/authorize.rb', line 112

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

Instance Method Details

#inspectObject

Provide a detailed, user friendly representation



136
137
138
# File 'lib/twilio-ruby/rest/oauth/v1/authorize.rb', line 136

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

#redirect_toString

Returns The callback URL.

Returns:

  • (String)

    The callback URL



124
125
126
# File 'lib/twilio-ruby/rest/oauth/v1/authorize.rb', line 124

def redirect_to
    @properties['redirect_to']
end

#to_sObject

Provide a user friendly representation



130
131
132
# File 'lib/twilio-ruby/rest/oauth/v1/authorize.rb', line 130

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