Class: Twilio::REST::Events::V1
- Defined in:
- lib/twilio-ruby/rest/events/v1.rb,
lib/twilio-ruby/rest/events/v1/sink.rb,
lib/twilio-ruby/rest/events/v1/schema.rb,
lib/twilio-ruby/rest/events/v1/event_type.rb,
lib/twilio-ruby/rest/events/v1/subscription.rb,
lib/twilio-ruby/rest/events/v1/sink/sink_test.rb,
lib/twilio-ruby/rest/events/v1/sink/sink_validate.rb,
lib/twilio-ruby/rest/events/v1/schema/schema_version.rb,
lib/twilio-ruby/rest/events/v1/subscription/subscribed_event.rb
Defined Under Namespace
Classes: EventTypeContext, EventTypeInstance, EventTypeList, EventTypePage, SchemaContext, SchemaInstance, SchemaList, SchemaPage, SinkContext, SinkInstance, SinkList, SinkPage, SubscriptionContext, SubscriptionInstance, SubscriptionList, SubscriptionPage
Instance Attribute Summary
Attributes inherited from Version
Instance Method Summary collapse
- #event_types(type = :unset) ⇒ Twilio::REST::Events::V1::EventTypeContext, Twilio::REST::Events::V1::EventTypeList
-
#initialize(domain) ⇒ V1
constructor
Initialize the V1 version of Events.
- #schemas(id = :unset) ⇒ Twilio::REST::Events::V1::SchemaContext, Twilio::REST::Events::V1::SchemaList
- #sinks(sid = :unset) ⇒ Twilio::REST::Events::V1::SinkContext, Twilio::REST::Events::V1::SinkList
- #subscriptions(sid = :unset) ⇒ Twilio::REST::Events::V1::SubscriptionContext, Twilio::REST::Events::V1::SubscriptionList
-
#to_s ⇒ Object
Provide a user friendly representation.
Methods inherited from Version
#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update
Constructor Details
#initialize(domain) ⇒ V1
Initialize the V1 version of Events
21 22 23 24 25 26 27 28 |
# File 'lib/twilio-ruby/rest/events/v1.rb', line 21 def initialize(domain) super @version = 'v1' @event_types = nil @schemas = nil @sinks = nil @subscriptions = nil end |
Instance Method Details
#event_types(type = :unset) ⇒ Twilio::REST::Events::V1::EventTypeContext, Twilio::REST::Events::V1::EventTypeList
34 35 36 37 38 39 40 41 42 43 |
# File 'lib/twilio-ruby/rest/events/v1.rb', line 34 def event_types(type=:unset) if type.nil? raise ArgumentError, 'type cannot be nil' end if type == :unset @event_types ||= EventTypeList.new self else EventTypeContext.new(self, type) end end |
#schemas(id = :unset) ⇒ Twilio::REST::Events::V1::SchemaContext, Twilio::REST::Events::V1::SchemaList
48 49 50 51 52 53 54 55 56 57 |
# File 'lib/twilio-ruby/rest/events/v1.rb', line 48 def schemas(id=:unset) if id.nil? raise ArgumentError, 'id cannot be nil' end if id == :unset @schemas ||= SchemaList.new self else SchemaContext.new(self, id) end end |
#sinks(sid = :unset) ⇒ Twilio::REST::Events::V1::SinkContext, Twilio::REST::Events::V1::SinkList
62 63 64 65 66 67 68 69 70 71 |
# File 'lib/twilio-ruby/rest/events/v1.rb', line 62 def sinks(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' end if sid == :unset @sinks ||= SinkList.new self else SinkContext.new(self, sid) end end |
#subscriptions(sid = :unset) ⇒ Twilio::REST::Events::V1::SubscriptionContext, Twilio::REST::Events::V1::SubscriptionList
76 77 78 79 80 81 82 83 84 85 |
# File 'lib/twilio-ruby/rest/events/v1.rb', line 76 def subscriptions(sid=:unset) if sid.nil? raise ArgumentError, 'sid cannot be nil' end if sid == :unset @subscriptions ||= SubscriptionList.new self else SubscriptionContext.new(self, sid) end end |
#to_s ⇒ Object
Provide a user friendly representation
88 89 90 |
# File 'lib/twilio-ruby/rest/events/v1.rb', line 88 def to_s '<Twilio::REST::Events::V1>'; end |