Class: Twilio::REST::FlexApi::V2::FlexUserInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V2::FlexUserInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v2/flex_user.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID of the account that created the resource.
-
#context ⇒ FlexUserContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#created_date ⇒ Time
The date that this user was created, given in ISO 8601 format.
-
#email ⇒ String
Email of the User.
-
#fetch ⇒ FlexUserInstance
Fetch the FlexUserInstance.
-
#first_name ⇒ String
First name of the User.
-
#flex_team_sid ⇒ String
The unique SID identifier of the Flex Team.
-
#flex_user_sid ⇒ String
The unique SID identifier of the Flex User.
-
#friendly_name ⇒ String
Friendly name of the User.
-
#initialize(version, payload, instance_sid: nil, flex_user_sid: nil) ⇒ FlexUserInstance
constructor
Initialize the FlexUserInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#instance_sid ⇒ String
The unique ID created by Twilio to identify a Flex instance.
-
#last_name ⇒ String
Last name of the User.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#updated_date ⇒ Time
The date that this user was updated, given in ISO 8601 format.
- #url ⇒ String
-
#user_sid ⇒ String
The unique SID identifier of the Twilio Unified User.
-
#username ⇒ String
Username of the User.
-
#version ⇒ String
The current version of the user.
-
#worker_sid ⇒ String
The unique SID identifier of the worker.
-
#workspace_sid ⇒ String
The unique SID identifier of the workspace.
Constructor Details
#initialize(version, payload, instance_sid: nil, flex_user_sid: nil) ⇒ FlexUserInstance
Initialize the FlexUserInstance
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 128 def initialize(version, payload , instance_sid: nil, flex_user_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'instance_sid' => payload['instance_sid'], 'user_sid' => payload['user_sid'], 'flex_user_sid' => payload['flex_user_sid'], 'worker_sid' => payload['worker_sid'], 'workspace_sid' => payload['workspace_sid'], 'flex_team_sid' => payload['flex_team_sid'], 'first_name' => payload['first_name'], 'last_name' => payload['last_name'], 'username' => payload['username'], 'email' => payload['email'], 'friendly_name' => payload['friendly_name'], 'created_date' => Twilio.deserialize_iso8601_datetime(payload['created_date']), 'updated_date' => Twilio.deserialize_iso8601_datetime(payload['updated_date']), 'version' => payload['version'] == nil ? payload['version'] : payload['version'].to_i, 'url' => payload['url'], } # Context @instance_context = nil @params = { 'instance_sid' => instance_sid || @properties['instance_sid'] ,'flex_user_sid' => flex_user_sid || @properties['flex_user_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique SID of the account that created the resource.
169 170 171 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 169 def account_sid @properties['account_sid'] end |
#context ⇒ FlexUserContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
160 161 162 163 164 165 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 160 def context unless @instance_context @instance_context = FlexUserContext.new(@version , @params['instance_sid'], @params['flex_user_sid']) end @instance_context end |
#created_date ⇒ Time
Returns The date that this user was created, given in ISO 8601 format.
241 242 243 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 241 def created_date @properties['created_date'] end |
#email ⇒ String
Returns Email of the User.
229 230 231 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 229 def email @properties['email'] end |
#fetch ⇒ FlexUserInstance
Fetch the FlexUserInstance
266 267 268 269 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 266 def fetch context.fetch end |
#first_name ⇒ String
Returns First name of the User.
211 212 213 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 211 def first_name @properties['first_name'] end |
#flex_team_sid ⇒ String
Returns The unique SID identifier of the Flex Team.
205 206 207 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 205 def flex_team_sid @properties['flex_team_sid'] end |
#flex_user_sid ⇒ String
Returns The unique SID identifier of the Flex User.
187 188 189 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 187 def flex_user_sid @properties['flex_user_sid'] end |
#friendly_name ⇒ String
Returns Friendly name of the User.
235 236 237 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 235 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
280 281 282 283 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 280 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V2.FlexUserInstance #{values}>" end |
#instance_sid ⇒ String
Returns The unique ID created by Twilio to identify a Flex instance.
175 176 177 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 175 def instance_sid @properties['instance_sid'] end |
#last_name ⇒ String
Returns Last name of the User.
217 218 219 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 217 def last_name @properties['last_name'] end |
#to_s ⇒ Object
Provide a user friendly representation
273 274 275 276 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 273 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V2.FlexUserInstance #{values}>" end |
#updated_date ⇒ Time
Returns The date that this user was updated, given in ISO 8601 format.
247 248 249 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 247 def updated_date @properties['updated_date'] end |
#url ⇒ String
259 260 261 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 259 def url @properties['url'] end |
#user_sid ⇒ String
Returns The unique SID identifier of the Twilio Unified User.
181 182 183 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 181 def user_sid @properties['user_sid'] end |
#username ⇒ String
Returns Username of the User.
223 224 225 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 223 def username @properties['username'] end |
#version ⇒ String
Returns The current version of the user.
253 254 255 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 253 def version @properties['version'] end |
#worker_sid ⇒ String
Returns The unique SID identifier of the worker.
193 194 195 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 193 def worker_sid @properties['worker_sid'] end |
#workspace_sid ⇒ String
Returns The unique SID identifier of the workspace.
199 200 201 |
# File 'lib/twilio-ruby/rest/flex_api/v2/flex_user.rb', line 199 def workspace_sid @properties['workspace_sid'] end |