Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationListResponse

Inherits:
InstanceListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of NotificationListResponse.

Parameters:



173
174
175
176
177
178
179
180
181
182
183
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 173

def initialize(version, payload, key, limit = :unset)
  data_list = payload.body[key]
  if limit != :unset
    data_list = data_list[0, limit]
  end
  @notification = data_list.map do |data|
    NotificationInstance.new(version, data)
  end
  @headers = payload.headers
  @status_code = payload.status_code
end

Instance Method Details

#headersObject



189
190
191
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 189

def headers
  @headers
end

#notificationObject



185
186
187
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 185

def notification
    @notification
end

#status_codeObject



193
194
195
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 193

def status_code
  @status_code
end