Class: Twilio::REST::FlexApi::V1::InsightsSessionContext

Inherits:
InstanceContext show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/insights_session.rb

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ InsightsSessionContext

Initialize the InsightsSessionContext

Parameters:

  • version (Version)

    Version that contains the resource



48
49
50
51
52
53
54
55
56
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 48

def initialize(version)
    super(version)

    # Path Solution
    @solution = {  }
    @uri = "/Insights/Session"

    
end

Instance Method Details

#create(authorization: :unset) ⇒ InsightsSessionInstance

Create the InsightsSessionInstance

Parameters:

  • authorization (String) (defaults to: :unset)

    The Authorization HTTP request header

Returns:



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 61

def create(
    authorization: :unset
)

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Authorization' => authorization, })
    
    
    
    
    
    payload = @version.create('POST', @uri, headers: headers)
    InsightsSessionInstance.new(
        @version,
        payload,
    )
end

#inspectObject

Provide a detailed, user friendly representation



88
89
90
91
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 88

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.FlexApi.V1.InsightsSessionContext #{context}>"
end

#to_sObject

Provide a user friendly representation



81
82
83
84
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_session.rb', line 81

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.FlexApi.V1.InsightsSessionContext #{context}>"
end