Class: Twilio::REST::PreviewIam::Versionless::OrganizationContext::RoleAssignmentInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::PreviewIam::Versionless::OrganizationContext::RoleAssignmentInstance
- Defined in:
- lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb
Instance Method Summary collapse
-
#code ⇒ String
Twilio-specific error code.
-
#context ⇒ RoleAssignmentContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#delete ⇒ Boolean
Delete the RoleAssignmentInstance.
-
#identity ⇒ String
Twilio Sid representing scope of this assignment.
-
#initialize(version, payload, organization_sid: nil, sid: nil) ⇒ RoleAssignmentInstance
constructor
Initialize the RoleAssignmentInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#message ⇒ String
Error message.
-
#more_info ⇒ String
Link to Error Code References.
-
#role_sid ⇒ String
Twilio Role Sid representing assigned role.
-
#scope ⇒ String
Twilio Sid representing identity of this assignment.
-
#sid ⇒ String
Twilio Role Assignment Sid representing this role assignment.
-
#status ⇒ String
HTTP response status code.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, organization_sid: nil, sid: nil) ⇒ RoleAssignmentInstance
Initialize the RoleAssignmentInstance
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 267 def initialize(version, payload , organization_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'role_sid' => payload['role_sid'], 'scope' => payload['scope'], 'identity' => payload['identity'], 'code' => payload['code'], 'message' => payload['message'], 'more_info' => payload['more_info'], 'status' => payload['status'], } # Context @instance_context = nil @params = { 'organization_sid' => organization_sid || @properties['organization_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#code ⇒ String
Returns Twilio-specific error code.
324 325 326 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 324 def code @properties['code'] end |
#context ⇒ RoleAssignmentContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
291 292 293 294 295 296 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 291 def context unless @instance_context @instance_context = RoleAssignmentContext.new(@version , @params['organization_sid'], @params['sid']) end @instance_context end |
#delete ⇒ Boolean
Delete the RoleAssignmentInstance
349 350 351 352 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 349 def delete context.delete end |
#identity ⇒ String
Returns Twilio Sid representing scope of this assignment.
318 319 320 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 318 def identity @properties['identity'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
363 364 365 366 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 363 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.PreviewIam.Versionless.RoleAssignmentInstance #{values}>" end |
#message ⇒ String
Returns Error message.
330 331 332 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 330 def @properties['message'] end |
#more_info ⇒ String
Returns Link to Error Code References.
336 337 338 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 336 def more_info @properties['more_info'] end |
#role_sid ⇒ String
Returns Twilio Role Sid representing assigned role.
306 307 308 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 306 def role_sid @properties['role_sid'] end |
#scope ⇒ String
Returns Twilio Sid representing identity of this assignment.
312 313 314 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 312 def scope @properties['scope'] end |
#sid ⇒ String
Returns Twilio Role Assignment Sid representing this role assignment.
300 301 302 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 300 def sid @properties['sid'] end |
#status ⇒ String
Returns HTTP response status code.
342 343 344 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 342 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
356 357 358 359 |
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 356 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.PreviewIam.Versionless.RoleAssignmentInstance #{values}>" end |