Class: Twilio::REST::PreviewIam::Versionless::OrganizationContext::RoleAssignmentContext

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

Instance Method Summary collapse

Constructor Details

#initialize(version, organization_sid, sid) ⇒ RoleAssignmentContext

Initialize the RoleAssignmentContext

Parameters:

  • version (Version)

    Version that contains the resource

  • organization_sid (String)
  • sid (String)


192
193
194
195
196
197
198
199
200
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 192

def initialize(version, organization_sid, sid)
    super(version)

    # Path Solution
    @solution = { organization_sid: organization_sid, sid: sid,  }
    @uri = "/#{@solution[:organization_sid]}/RoleAssignments/#{@solution[:sid]}"

    
end

Instance Method Details

#deleteBoolean

Delete the RoleAssignmentInstance

Returns:

  • (Boolean)

    True if delete succeeds, false otherwise



204
205
206
207
208
209
210
211
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 204

def delete

    headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', })
    
    
    headers['Accept'] = '*/*'
    @version.delete('DELETE', @uri, headers: headers)
end

#inspectObject

Provide a detailed, user friendly representation



223
224
225
226
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 223

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.PreviewIam.Versionless.RoleAssignmentContext #{context}>"
end

#to_sObject

Provide a user friendly representation



216
217
218
219
# File 'lib/twilio-ruby/rest/preview_iam/versionless/organization/role_assignment.rb', line 216

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.PreviewIam.Versionless.RoleAssignmentContext #{context}>"
end