Class: Twilio::REST::FlexApi::V1::InsightsSessionInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::InsightsSessionInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_session.rb
Instance Method Summary collapse
-
#base_url ⇒ String
The base URL to fetch reports and dashboards.
-
#context ⇒ InsightsSessionContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#create(authorization: :unset) ⇒ InsightsSessionInstance
Create the InsightsSessionInstance.
-
#initialize(version, payload) ⇒ InsightsSessionInstance
constructor
Initialize the InsightsSessionInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#session_expiry ⇒ String
The session expiry date and time, given in ISO 8601 format.
-
#session_id ⇒ String
The unique ID for the session.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
-
#workspace_id ⇒ String
Unique ID to identify the user’s workspace.
Constructor Details
#initialize(version, payload) ⇒ InsightsSessionInstance
Initialize the InsightsSessionInstance
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 269 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'workspace_id' => payload['workspace_id'], 'session_expiry' => payload['session_expiry'], 'session_id' => payload['session_id'], 'base_url' => payload['base_url'], 'url' => payload['url'], } # Context @instance_context = nil @params = { } end |
Instance Method Details
#base_url ⇒ String
Returns The base URL to fetch reports and dashboards.
318 319 320 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 318 def base_url @properties['base_url'] end |
#context ⇒ InsightsSessionContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
291 292 293 294 295 296 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 291 def context unless @instance_context @instance_context = InsightsSessionContext.new(@version ) end @instance_context end |
#create(authorization: :unset) ⇒ InsightsSessionInstance
Create the InsightsSessionInstance
332 333 334 335 336 337 338 339 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 332 def create( authorization: :unset ) context.create( authorization: , ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
350 351 352 353 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 350 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsSessionInstance #{values}>" end |
#session_expiry ⇒ String
Returns The session expiry date and time, given in ISO 8601 format.
306 307 308 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 306 def session_expiry @properties['session_expiry'] end |
#session_id ⇒ String
Returns The unique ID for the session.
312 313 314 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 312 def session_id @properties['session_id'] end |
#to_s ⇒ Object
Provide a user friendly representation
343 344 345 346 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 343 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsSessionInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
324 325 326 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 324 def url @properties['url'] end |
#workspace_id ⇒ String
Returns Unique ID to identify the user’s workspace.
300 301 302 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 300 def workspace_id @properties['workspace_id'] end |