Class: Twilio::REST::FlexApi::V1::InsightsSegmentsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::InsightsSegmentsContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_segments.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
-
#fetch(token: :unset) ⇒ InsightsSegmentsInstance
Fetch the InsightsSegmentsInstance.
-
#initialize(version, segment_id) ⇒ InsightsSegmentsContext
constructor
Initialize the InsightsSegmentsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, segment_id) ⇒ InsightsSegmentsContext
Initialize the InsightsSegmentsContext
167 168 169 170 171 172 173 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb', line 167 def initialize(version, segment_id) super(version) # Path Solution @solution = {segment_id: segment_id, } @uri = "/Insights/Segments/#{@solution[:segment_id]}" end |
Instance Method Details
#fetch(token: :unset) ⇒ InsightsSegmentsInstance
Fetch the InsightsSegmentsInstance
179 180 181 182 183 184 185 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb', line 179 def fetch(token: :unset) headers = Twilio::Values.of({'Token' => token, }) payload = @version.fetch('GET', @uri, headers: headers) InsightsSegmentsInstance.new(@version, payload, segment_id: @solution[:segment_id], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
196 197 198 199 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb', line 196 def inspect context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
189 190 191 192 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_segments.rb', line 189 def to_s context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsSegmentsContext #{context}>" end |