Class: Twilio::REST::Conversations::V1::RoleListResponse

Inherits:
InstanceListResource show all
Defined in:
lib/twilio-ruby/rest/conversations/v1/role.rb,
lib/twilio-ruby/rest/conversations/v1/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)


421
422
423
424
425
426
427
# File 'lib/twilio-ruby/rest/conversations/v1/role.rb', line 421

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



514
515
516
# File 'lib/twilio-ruby/rest/conversations/v1/role.rb', line 514

def headers
  @headers
end

#roleObject



510
511
512
# File 'lib/twilio-ruby/rest/conversations/v1/role.rb', line 510

def role
    @role
end

#role_instanceObject



429
430
431
# File 'lib/twilio-ruby/rest/conversations/v1/role.rb', line 429

def role_instance
    @instance
end

#status_codeObject



518
519
520
# File 'lib/twilio-ruby/rest/conversations/v1/role.rb', line 518

def status_code
  @status_code
end