Class: Twilio::REST::Chat::V1::ServiceContext::RoleListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/chat/v1/service/role.rb,
lib/twilio-ruby/rest/chat/v1/service/role.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, key, limit = :unset) ⇒ RoleListResponse

Returns a new instance of RoleListResponse.

Parameters:

  • instance (Array<RoleInstance>)
  • headers (Hash{String => Object})
  • status_code (Integer)


430
431
432
433
434
435
436
# File 'lib/twilio-ruby/rest/chat/v1/service/role.rb', line 430

def initialize(version, payload, key)
   @role_instance = payload.body[key].map do |data|
    RoleInstance.new(version, data)
   end
   @headers = payload.headers
   @status_code = payload.status_code
end

Instance Method Details

#headersObject



523
524
525
# File 'lib/twilio-ruby/rest/chat/v1/service/role.rb', line 523

def headers
  @headers
end

#roleObject



519
520
521
# File 'lib/twilio-ruby/rest/chat/v1/service/role.rb', line 519

def role
    @role
end

#role_instanceObject



438
439
440
# File 'lib/twilio-ruby/rest/chat/v1/service/role.rb', line 438

def role_instance
    @instance
end

#status_codeObject



527
528
529
# File 'lib/twilio-ruby/rest/chat/v1/service/role.rb', line 527

def status_code
  @status_code
end