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
Overview
PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].
Instance Method Summary collapse
-
#base_url ⇒ String
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.
-
#session_id ⇒ String
Unique session ID.
-
#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
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 115 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 Base URL to fetch reports and dashboards.
163 164 165 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 163 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
136 137 138 139 140 141 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 136 def context unless @instance_context @instance_context = InsightsSessionContext.new(@version, ) end @instance_context end |
#create(authorization: :unset) ⇒ InsightsSessionInstance
Create the InsightsSessionInstance
177 178 179 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 177 def create(authorization: :unset) context.create(authorization: , ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
190 191 192 193 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 190 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.
151 152 153 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 151 def session_expiry @properties['session_expiry'] end |
#session_id ⇒ String
Returns Unique session ID.
157 158 159 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 157 def session_id @properties['session_id'] end |
#to_s ⇒ Object
Provide a user friendly representation
183 184 185 186 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 183 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.
169 170 171 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 169 def url @properties['url'] end |
#workspace_id ⇒ String
Returns Unique ID to identify the user’s workspace.
145 146 147 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 145 def workspace_id @properties['workspace_id'] end |