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/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

#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



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

Parameters:

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

    A string that uniquely identifies this Event Type.

Returns:



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

Parameters:

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

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

Returns:



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

Parameters:

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

    A 34 character string that uniquely identifies this Sink.

Returns:



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

Parameters:

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

    A 34 character string that uniquely identifies this Subscription.

Returns:



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_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