Class: Twilio::REST::FlexApi::V1::InsightsSessionContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::InsightsSessionContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_session.rb
Instance Method Summary collapse
-
#create(authorization: :unset) ⇒ InsightsSessionInstance
Create the InsightsSessionInstance.
-
#create_with_metadata(authorization: :unset) ⇒ InsightsSessionInstance
Create the InsightsSessionInstanceMetadata.
-
#initialize(version) ⇒ InsightsSessionContext
constructor
Initialize the InsightsSessionContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version) ⇒ InsightsSessionContext
Initialize the InsightsSessionContext
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 49 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/Insights/Session" end |
Instance Method Details
#create(authorization: :unset) ⇒ InsightsSessionInstance
Create the InsightsSessionInstance
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 63 def create( authorization: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) payload = @version.create('POST', @uri, headers: headers) InsightsSessionInstance.new( @version, payload, ) end |
#create_with_metadata(authorization: :unset) ⇒ InsightsSessionInstance
Create the InsightsSessionInstanceMetadata
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 84 def ( authorization: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => , }) response = @version.('POST', @uri, headers: headers) insights_session_instance = InsightsSessionInstance.new( @version, response.body, ) InsightsSessionInstanceMetadata.new( @version, insights_session_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
117 118 119 120 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 117 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsSessionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
110 111 112 113 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 110 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.InsightsSessionContext #{context}>" end |