Class: Twilio::REST::PreviewIam::Versionless::OrganizationContext::RoleAssignmentList::PublicApiCreateRoleAssignmentRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ PublicApiCreateRoleAssignmentRequest

Returns a new instance of PublicApiCreateRoleAssignmentRequest.



29
30
31
32
33
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 29

def initialize(payload)
        @role_sid = payload["role_sid"]
        @scope = payload["scope"]
        @identity = payload["identity"]
end

Instance Attribute Details

#identityObject

Parameters:

  • : (role_sid)
    String

    Twilio Role Sid representing assigned role

  • : (scope)
    String

    Twilio Sid representing scope of this assignment

  • : (identity)
    String

    Twilio Sid representing identity of this assignment



28
29
30
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 28

def identity
  @identity
end

#role_sidObject

Parameters:

  • : (role_sid)
    String

    Twilio Role Sid representing assigned role

  • : (scope)
    String

    Twilio Sid representing scope of this assignment

  • : (identity)
    String

    Twilio Sid representing identity of this assignment



28
29
30
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 28

def role_sid
  @role_sid
end

#scopeObject

Parameters:

  • : (role_sid)
    String

    Twilio Role Sid representing assigned role

  • : (scope)
    String

    Twilio Sid representing scope of this assignment

  • : (identity)
    String

    Twilio Sid representing identity of this assignment



28
29
30
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 28

def scope
  @scope
end

Instance Method Details

#to_json(options = {}) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 34

def to_json(options = {})
{
        "role_sid": @role_sid,
        "scope": @scope,
        "identity": @identity,
}.to_json(options)
end