Class: Twilio::REST::FlexApi::V1::InsightsUserRolesInstance

Inherits:
InstanceResource 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, payload) ⇒ InsightsUserRolesInstance

Initialize the InsightsUserRolesInstance



115
116
117
118
119
120
121
122
123
124
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 115

def initialize(version, payload)
  super(version)

  # Marshaled Properties
  @properties = {'roles' => payload['roles'], 'url' => payload['url'], }

  # Context
  @instance_context = nil
  @params = {}
end

Instance Method Details

#contextInsightsUserRolesContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context



130
131
132
133
134
135
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 130

def context
  unless @instance_context
    @instance_context = InsightsUserRolesContext.new(@version, )
  end
  @instance_context
end

#fetch(authorization: :unset) ⇒ InsightsUserRolesInstance

Fetch the InsightsUserRolesInstance



153
154
155
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 153

def fetch(authorization: :unset)
  context.fetch(authorization: authorization, )
end

#inspectObject

Provide a detailed, user friendly representation



166
167
168
169
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 166

def inspect
  values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.FlexApi.V1.InsightsUserRolesInstance #{values}>"
end

#rolesArray[String]



139
140
141
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 139

def roles
  @properties['roles']
end

#to_sObject

Provide a user friendly representation



159
160
161
162
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 159

def to_s
  values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
  "<Twilio.FlexApi.V1.InsightsUserRolesInstance #{values}>"
end

#urlString



145
146
147
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 145

def url
  @properties['url']
end