Class: Twilio::REST::Oauth::V1::UserInfoInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Oauth::V1::UserInfoInstance
- Defined in:
- lib/twilio-ruby/rest/oauth/v1/user_info.rb
Instance Method Summary collapse
-
#context ⇒ UserInfoContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#email ⇒ String
The end-user’s preferred email address.
-
#fetch ⇒ UserInfoInstance
Fetch the UserInfoInstance.
-
#first_name ⇒ String
The first name of the end-user.
-
#friendly_name ⇒ String
The friendly name of the end-user.
-
#initialize(version, payload) ⇒ UserInfoInstance
constructor
Initialize the UserInfoInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#last_name ⇒ String
The last name of the end-user.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #url ⇒ String
-
#user_sid ⇒ String
The URL of the party that will create the token and sign it with its private key.
Constructor Details
#initialize(version, payload) ⇒ UserInfoInstance
Initialize the UserInfoInstance
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 122 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'user_sid' => payload['user_sid'], 'first_name' => payload['first_name'], 'last_name' => payload['last_name'], 'friendly_name' => payload['friendly_name'], 'email' => payload['email'], 'url' => payload['url'], } # Context @instance_context = nil @params = { } end |
Instance Method Details
#context ⇒ UserInfoContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
144 145 146 147 148 149 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 144 def context unless @instance_context @instance_context = UserInfoContext.new(@version ) end @instance_context end |
#email ⇒ String
Returns The end-user’s preferred email address.
177 178 179 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 177 def email @properties['email'] end |
#fetch ⇒ UserInfoInstance
Fetch the UserInfoInstance
190 191 192 193 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 190 def fetch context.fetch end |
#first_name ⇒ String
Returns The first name of the end-user.
159 160 161 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 159 def first_name @properties['first_name'] end |
#friendly_name ⇒ String
Returns The friendly name of the end-user.
171 172 173 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 171 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
204 205 206 207 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 204 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Oauth.V1.UserInfoInstance #{values}>" end |
#last_name ⇒ String
Returns The last name of the end-user.
165 166 167 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 165 def last_name @properties['last_name'] end |
#to_s ⇒ Object
Provide a user friendly representation
197 198 199 200 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 197 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Oauth.V1.UserInfoInstance #{values}>" end |
#url ⇒ String
183 184 185 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 183 def url @properties['url'] end |
#user_sid ⇒ String
Returns The URL of the party that will create the token and sign it with its private key.
153 154 155 |
# File 'lib/twilio-ruby/rest/oauth/v1/user_info.rb', line 153 def user_sid @properties['user_sid'] end |