class Twilio::REST::Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationList
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Public Class Methods
new(version, service_sid: nil, identity: nil, challenge_sid: nil)
click to toggle source
Initialize the NotificationList
@param [Version] version Version
that contains the resource @param [String] service_sid The unique SID identifier of the Service. @param [String] identity Customer unique identity for the Entity owner of the
Challenge. This identifier should be immutable, not PII, length between 8 and 64 characters, and generated by your external system, such as your user's UUID, GUID, or SID. It can only contain dash (-) separated alphanumeric characters.
@param [String] challenge_sid The unique SID identifier of the Challenge. @return [NotificationList] NotificationList
Calls superclass method
Twilio::REST::ListResource::new
# File lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb 29 def initialize(version, service_sid: nil, identity: nil, challenge_sid: nil) 30 super(version) 31 32 # Path Solution 33 @solution = {service_sid: service_sid, identity: identity, challenge_sid: challenge_sid} 34 @uri = "/Services/#{@solution[:service_sid]}/Entities/#{@solution[:identity]}/Challenges/#{@solution[:challenge_sid]}/Notifications" 35 end
Public Instance Methods
create(ttl: :unset)
click to toggle source
Create the NotificationInstance
@param [String] ttl How long, in seconds, the notification is valid. Can be an
integer between 0 and 300. Default is 300. Delivery is attempted until the TTL elapses, even if the device is offline. 0 means that the notification delivery is attempted immediately, only once, and is not stored for future delivery.
@return [NotificationInstance] Created NotificationInstance
# File lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb 44 def create(ttl: :unset) 45 data = Twilio::Values.of({'Ttl' => ttl, }) 46 47 payload = @version.create('POST', @uri, data: data) 48 49 NotificationInstance.new( 50 @version, 51 payload, 52 service_sid: @solution[:service_sid], 53 identity: @solution[:identity], 54 challenge_sid: @solution[:challenge_sid], 55 ) 56 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb 60 def to_s 61 '#<Twilio.Verify.V2.NotificationList>' 62 end