class Twilio::REST::Events::V1

Public Class Methods

new(domain) click to toggle source

Initialize the V1 version of Events

Calls superclass method Twilio::REST::Version::new
   # File lib/twilio-ruby/rest/events/v1.rb
15 def initialize(domain)
16   super
17   @version = 'v1'
18   @event_types = nil
19   @schemas = nil
20   @sinks = nil
21   @subscriptions = nil
22 end

Public Instance Methods

event_types(type=:unset) click to toggle source

@param [String] type A string that uniquely identifies this Event Type. @return [Twilio::REST::Events::V1::EventTypeContext] if type was passed. @return [Twilio::REST::Events::V1::EventTypeList]

   # File lib/twilio-ruby/rest/events/v1.rb
28 def event_types(type=:unset)
29   if type.nil?
30       raise ArgumentError, 'type cannot be nil'
31   end
32   if type == :unset
33       @event_types ||= EventTypeList.new self
34   else
35       EventTypeContext.new(self, type)
36   end
37 end
schemas(id=:unset) click to toggle source

@param [String] id The unique identifier of the schema. Each schema can have

multiple versions, that share the same id.

@return [Twilio::REST::Events::V1::SchemaContext] if id was passed. @return [Twilio::REST::Events::V1::SchemaList]

   # File lib/twilio-ruby/rest/events/v1.rb
44 def schemas(id=:unset)
45   if id.nil?
46       raise ArgumentError, 'id cannot be nil'
47   end
48   if id == :unset
49       @schemas ||= SchemaList.new self
50   else
51       SchemaContext.new(self, id)
52   end
53 end
sinks(sid=:unset) click to toggle source

@param [String] sid A 34 character string that uniquely identifies this Sink. @return [Twilio::REST::Events::V1::SinkContext] if sid was passed. @return [Twilio::REST::Events::V1::SinkList]

   # File lib/twilio-ruby/rest/events/v1.rb
59 def sinks(sid=:unset)
60   if sid.nil?
61       raise ArgumentError, 'sid cannot be nil'
62   end
63   if sid == :unset
64       @sinks ||= SinkList.new self
65   else
66       SinkContext.new(self, sid)
67   end
68 end
subscriptions(sid=:unset) click to toggle source

@param [String] sid A 34 character string that uniquely identifies this

Subscription.

@return [Twilio::REST::Events::V1::SubscriptionContext] if sid was passed. @return [Twilio::REST::Events::V1::SubscriptionList]

   # File lib/twilio-ruby/rest/events/v1.rb
75 def subscriptions(sid=:unset)
76   if sid.nil?
77       raise ArgumentError, 'sid cannot be nil'
78   end
79   if sid == :unset
80       @subscriptions ||= SubscriptionList.new self
81   else
82       SubscriptionContext.new(self, sid)
83   end
84 end
to_s() click to toggle source

Provide a user friendly representation

   # File lib/twilio-ruby/rest/events/v1.rb
88 def to_s
89   '<Twilio::REST::Events::V1>'
90 end