Class: Twilio::REST::Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationList
- Inherits:
-
ListResource
- Object
- ListResource
- Twilio::REST::Verify::V2::ServiceContext::EntityContext::ChallengeContext::NotificationList
- Defined in:
- lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#create(ttl: :unset) ⇒ NotificationInstance
Create the NotificationInstance.
-
#initialize(version, service_sid: nil, identity: nil, challenge_sid: nil) ⇒ NotificationList
constructor
Initialize the NotificationList.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, service_sid: nil, identity: nil, challenge_sid: nil) ⇒ NotificationList
Initialize the NotificationList
29 30 31 32 33 34 35 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 29 def initialize(version, service_sid: nil, identity: nil, challenge_sid: nil) super(version) # Path Solution @solution = {service_sid: service_sid, identity: identity, challenge_sid: challenge_sid} @uri = "/Services/#{@solution[:service_sid]}/Entities/#{@solution[:identity]}/Challenges/#{@solution[:challenge_sid]}/Notifications" end |
Instance Method Details
#create(ttl: :unset) ⇒ NotificationInstance
Create the NotificationInstance
44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 44 def create(ttl: :unset) data = Twilio::Values.of({'Ttl' => ttl, }) payload = @version.create('POST', @uri, data: data) NotificationInstance.new( @version, payload, service_sid: @solution[:service_sid], identity: @solution[:identity], challenge_sid: @solution[:challenge_sid], ) end |
#to_s ⇒ Object
Provide a user friendly representation
60 61 62 |
# File 'lib/twilio-ruby/rest/verify/v2/service/entity/challenge/notification.rb', line 60 def to_s '#<Twilio.Verify.V2.NotificationList>' end |