Class: Twilio::REST::FlexApi::V1::InsightsUserRolesContext

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.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

Constructor Details

#initialize(version) ⇒ InsightsUserRolesContext

Initialize the InsightsUserRolesContext

Parameters:

  • version (Version)

    Version that contains the resource



72
73
74
75
76
77
78
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 72

def initialize(version)
  super(version)

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

Instance Method Details

#fetch(authorization: :unset) ⇒ InsightsUserRolesInstance

Fetch the InsightsUserRolesInstance

Parameters:

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

    The Authorization HTTP request header

Returns:



84
85
86
87
88
89
90
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 84

def fetch(authorization: :unset)
  headers = Twilio::Values.of({'Authorization' => authorization, })

  payload = @version.fetch('GET', @uri, headers: headers)

  InsightsUserRolesInstance.new(@version, payload, )
end

#inspectObject

Provide a detailed, user friendly representation



101
102
103
104
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 101

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

#to_sObject

Provide a user friendly representation



94
95
96
97
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 94

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