Class: Twilio::REST::FlexApi::V1::InsightsUserRolesInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::FlexApi::V1::InsightsUserRolesInstance
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb
Instance Method Summary collapse
-
#context ⇒ InsightsUserRolesContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch(authorization: :unset) ⇒ InsightsUserRolesInstance
Fetch the InsightsUserRolesInstance.
-
#initialize(version, payload) ⇒ InsightsUserRolesInstance
constructor
Initialize the InsightsUserRolesInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#roles ⇒ Array<String>
Flex Insights roles for the user.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #url ⇒ String
Constructor Details
#initialize(version, payload) ⇒ InsightsUserRolesInstance
Initialize the InsightsUserRolesInstance
130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 130 def initialize(version, payload ) super(version) # Marshaled Properties @properties = { 'roles' => payload['roles'], 'url' => payload['url'], } # Context @instance_context = nil @params = { } end |
Instance Method Details
#context ⇒ InsightsUserRolesContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
148 149 150 151 152 153 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 148 def context unless @instance_context @instance_context = InsightsUserRolesContext.new(@version ) end @instance_context end |
#fetch(authorization: :unset) ⇒ InsightsUserRolesInstance
Fetch the InsightsUserRolesInstance
171 172 173 174 175 176 177 178 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 171 def fetch( authorization: :unset ) context.fetch( authorization: , ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
189 190 191 192 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 189 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsUserRolesInstance #{values}>" end |
#roles ⇒ Array<String>
Returns Flex Insights roles for the user.
157 158 159 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 157 def roles @properties['roles'] end |
#to_s ⇒ Object
Provide a user friendly representation
182 183 184 185 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 182 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.FlexApi.V1.InsightsUserRolesInstance #{values}>" end |
#url ⇒ String
163 164 165 |
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_user_roles.rb', line 163 def url @properties['url'] end |