Class: Twilio::REST::Events::V1

Inherits:
Version
  • Object
show all
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/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: EventTypeContext, EventTypeInstance, EventTypeList, EventTypePage, SchemaContext, SchemaInstance, SchemaList, SchemaPage, SinkContext, SinkInstance, SinkList, SinkPage, SubscriptionContext, SubscriptionInstance, SubscriptionList, SubscriptionPage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

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


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

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

Parameters:

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

    A string that uniquely identifies this Event Type.

Returns:


28
29
30
31
32
33
34
35
36
37
# File 'lib/twilio-ruby/rest/events/v1.rb', line 28

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

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
47
48
49
50
51
52
53
# File 'lib/twilio-ruby/rest/events/v1.rb', line 44

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

Parameters:

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

    A 34 character string that uniquely identifies this Sink.

Returns:


59
60
61
62
63
64
65
66
67
68
# File 'lib/twilio-ruby/rest/events/v1.rb', line 59

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

Parameters:

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

    A 34 character string that uniquely identifies this Subscription.

Returns:


75
76
77
78
79
80
81
82
83
84
# File 'lib/twilio-ruby/rest/events/v1.rb', line 75

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_sObject

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