Class: Twilio::REST::Events

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/events.rb,
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/schema/version.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/subscription/subscribed_event.rb

Defined Under Namespace

Classes: V1

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ Events

Initialize the Events Domain


14
15
16
17
18
19
20
21
22
23
# File 'lib/twilio-ruby/rest/events.rb', line 14

def initialize(twilio)
  super

  @base_url = 'https://events.twilio.com'
  @host = 'events.twilio.com'
  @port = 443

  # Versions
  @v1 = nil
end

Instance Method Details

#event_types(type = :unset) ⇒ Twilio::REST::Events::V1::EventTypeInstance, Twilio::REST::Events::V1::EventTypeList

Parameters:

  • type (String) (defaults to: :unset)

    A string that uniquely identifies this Event Type.

Returns:


35
36
37
# File 'lib/twilio-ruby/rest/events.rb', line 35

def event_types(type=:unset)
  self.v1.event_types(type)
end

#schemas(id = :unset) ⇒ Twilio::REST::Events::V1::SchemaInstance, Twilio::REST::Events::V1::SchemaList

Parameters:

  • id (String) (defaults to: :unset)

    The unique identifier of the schema. Each schema can have multiple versions, that share the same id.

Returns:


44
45
46
# File 'lib/twilio-ruby/rest/events.rb', line 44

def schemas(id=:unset)
  self.v1.schemas(id)
end

#sinks(sid = :unset) ⇒ Twilio::REST::Events::V1::SinkInstance, Twilio::REST::Events::V1::SinkList

Parameters:

  • sid (String) (defaults to: :unset)

    A 34 character string that uniquely identifies this Sink.

Returns:


52
53
54
# File 'lib/twilio-ruby/rest/events.rb', line 52

def sinks(sid=:unset)
  self.v1.sinks(sid)
end

#subscriptions(sid = :unset) ⇒ Twilio::REST::Events::V1::SubscriptionInstance, Twilio::REST::Events::V1::SubscriptionList

Parameters:

  • sid (String) (defaults to: :unset)

    A 34 character string that uniquely identifies this Subscription.

Returns:


61
62
63
# File 'lib/twilio-ruby/rest/events.rb', line 61

def subscriptions(sid=:unset)
  self.v1.subscriptions(sid)
end

#to_sObject

Provide a user friendly representation


67
68
69
# File 'lib/twilio-ruby/rest/events.rb', line 67

def to_s
  '#<Twilio::REST::Events>'
end

#v1Object

Version v1 of events


27
28
29
# File 'lib/twilio-ruby/rest/events.rb', line 27

def v1
  @v1 ||= V1.new self
end