lib/twilio-ruby/rest/events/v1/subscription.rb in twilio-ruby-5.49.0 vs lib/twilio-ruby/rest/events/v1/subscription.rb in twilio-ruby-5.50.0
- old
+ new
@@ -224,11 +224,17 @@
end
##
# Access the subscribed_events
# @return [SubscribedEventList]
- # @return [SubscribedEventContext]
- def subscribed_events
+ # @return [SubscribedEventContext] if type was passed.
+ def subscribed_events(type=:unset)
+ raise ArgumentError, 'type cannot be nil' if type.nil?
+
+ if type != :unset
+ return SubscribedEventContext.new(@version, @solution[:sid], type, )
+ end
+
unless @subscribed_events
@subscribed_events = SubscribedEventList.new(@version, subscription_sid: @solution[:sid], )
end
@subscribed_events
\ No newline at end of file