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.



251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 251

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).



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

def action
    @properties['action']
end

#external_descriptionString

Returns The external description of the permission.

Returns:

  • (String)

    The external description of the permission.



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

def external_description
    @properties['external_description']
end

#inspectObject

Provide a detailed, user friendly representation



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

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).



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

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).



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

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).



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

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.



269
270
271
# File 'lib/twilio-ruby/rest/iam/v1/role_permission.rb', line 269

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



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

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