Class: Twilio::REST::Iam::V1::RolePermissionInstance

Inherits:
Twilio::REST::InstanceResource show all
Defined in:
lib/twilio-ruby/rest/iam/v1/role_permission.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, role_sid: nil) ⇒ RolePermissionInstance

Initialize the RolePermissionInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this RolePermission resource.

  • sid (String)

    The SID of the Call resource to fetch.



259
260
261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 259

def initialize(version, payload , role_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'namespace' => payload['namespace'],
        'product' => payload['product'],
        'resource' => payload['resource'],
        'action' => payload['action'],
        'external_description' => payload['external_description'],
    }
end

Instance Method Details

#actionString

Returns The action granted by the permission (e.g., read).

Returns:

  • (String)

    The action granted by the permission (e.g., read).



301
302
303
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 301

def action
    @properties['action']
end

#external_descriptionString

Returns The external description of the permission.

Returns:

  • (String)

    The external description of the permission.



307
308
309
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 307

def external_description
    @properties['external_description']
end

#inspectObject

Provide a detailed, user friendly representation



319
320
321
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 319

def inspect
    "<Twilio.Iam.V1.RolePermissionInstance>"
end

#namespaceString

Returns The namespace of the permission (e.g., twilio).

Returns:

  • (String)

    The namespace of the permission (e.g., twilio).



283
284
285
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 283

def namespace
    @properties['namespace']
end

#productString

Returns The product the permission belongs to (e.g., iam).

Returns:

  • (String)

    The product the permission belongs to (e.g., iam).



289
290
291
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 289

def product
    @properties['product']
end

#resourceString

Returns The resource the permission applies to (e.g., roles).

Returns:

  • (String)

    The resource the permission applies to (e.g., roles).



295
296
297
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 295

def resource
    @properties['resource']
end

#sidString

Returns The unique string that identifies the Permission resource.

Returns:

  • (String)

    The unique string that identifies the Permission resource.



277
278
279
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 277

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



313
314
315
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 313

def to_s
    "<Twilio.Iam.V1.RolePermissionInstance>"
end