Class: Twilio::REST::Webhooks::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/webhooks/v1.rb,
lib/twilio-ruby/rest/webhooks/v1/rule.rb,
lib/twilio-ruby/rest/webhooks/v1/test.rb,
lib/twilio-ruby/rest/webhooks/v1/setting.rb,
lib/twilio-ruby/rest/webhooks/v1/edge_zone.rb,
lib/twilio-ruby/rest/webhooks/v1/operation.rb,
lib/twilio-ruby/rest/webhooks/v1/shared_key.rb,
lib/twilio-ruby/rest/webhooks/v1/auth_profile.rb

Defined Under Namespace

Classes: AuthProfileContext, AuthProfileInstance, AuthProfileInstanceMetadata, AuthProfileList, AuthProfileListResponse, AuthProfilePage, AuthProfilePageMetadata, EdgeZoneInstance, EdgeZoneList, EdgeZoneListResponse, EdgeZonePage, EdgeZonePageMetadata, OperationContext, OperationInstance, OperationInstanceMetadata, OperationList, OperationListResponse, OperationPage, OperationPageMetadata, RuleContext, RuleInstance, RuleInstanceMetadata, RuleList, RuleListResponse, RulePage, RulePageMetadata, SettingContext, SettingInstance, SettingInstanceMetadata, SettingList, SettingListResponse, SettingPage, SettingPageMetadata, SharedKeyContext, SharedKeyInstance, SharedKeyInstanceMetadata, SharedKeyList, SharedKeyListResponse, SharedKeyPage, SharedKeyPageMetadata, TestInstance, TestList, TestPage

Instance Attribute Summary

Attributes inherited from Version

#domain, #version

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #create_with_metadata, #delete, #delete_with_metadata, #exception, #fetch, #fetch_with_metadata, #page, #patch, #read_limits, #relative_uri, #request, #stream, #stream_with_metadata, #update, #update_with_metadata

Constructor Details

#initialize(domain) ⇒ V1

Initialize the V1 version of Webhooks



21
22
23
24
25
26
27
28
29
30
31
# File 'lib/twilio-ruby/rest/webhooks/v1.rb', line 21

def initialize(domain)
    super
    @version = 'v1'
    @auth_profiles = nil
    @edge_zones = nil
    @operations = nil
    @rules = nil
    @settings = nil
    @shared_keys = nil
    @tests = nil
end

Instance Method Details

#auth_profiles(auth_profile_id = :unset) ⇒ Twilio::REST::Webhooks::V1::AuthProfileContext, Twilio::REST::Webhooks::V1::AuthProfileList

Parameters:

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

Returns:



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/twilio-ruby/rest/webhooks/v1.rb', line 37

def auth_profiles(auth_profile_id=:unset)
    if auth_profile_id.nil?
        raise ArgumentError, 'auth_profile_id cannot be nil'
    end

    if auth_profile_id == :unset
        @auth_profiles ||= AuthProfileList.new self
    else
        AuthProfileContext.new(self, auth_profile_id)
    end
end

#edge_zones ⇒ Twilio::REST::Webhooks::V1::EdgeZoneList



50
51
52
# File 'lib/twilio-ruby/rest/webhooks/v1.rb', line 50

def edge_zones
    @edge_zones ||= EdgeZoneList.new self
end

#operations(operation_id = :unset) ⇒ Twilio::REST::Webhooks::V1::OperationContext, Twilio::REST::Webhooks::V1::OperationList

Parameters:

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

Returns:



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

def operations(operation_id=:unset)
    if operation_id.nil?
        raise ArgumentError, 'operation_id cannot be nil'
    end

    if operation_id == :unset
        @operations ||= OperationList.new self
    else
        OperationContext.new(self, operation_id)
    end
end

#rules(rule_id = :unset) ⇒ Twilio::REST::Webhooks::V1::RuleContext, Twilio::REST::Webhooks::V1::RuleList

Parameters:

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

Returns:



72
73
74
75
76
77
78
79
80
81
82
# File 'lib/twilio-ruby/rest/webhooks/v1.rb', line 72

def rules(rule_id=:unset)
    if rule_id.nil?
        raise ArgumentError, 'rule_id cannot be nil'
    end

    if rule_id == :unset
        @rules ||= RuleList.new self
    else
        RuleContext.new(self, rule_id)
    end
end

#settings(setting_id = :unset) ⇒ Twilio::REST::Webhooks::V1::SettingContext, Twilio::REST::Webhooks::V1::SettingList

Parameters:

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

Returns:



87
88
89
90
91
92
93
94
95
96
97
# File 'lib/twilio-ruby/rest/webhooks/v1.rb', line 87

def settings(setting_id=:unset)
    if setting_id.nil?
        raise ArgumentError, 'setting_id cannot be nil'
    end

    if setting_id == :unset
        @settings ||= SettingList.new self
    else
        SettingContext.new(self, setting_id)
    end
end

#shared_keys(shared_key_id = :unset) ⇒ Twilio::REST::Webhooks::V1::SharedKeyContext, Twilio::REST::Webhooks::V1::SharedKeyList

Parameters:

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

Returns:



102
103
104
105
106
107
108
109
110
111
112
# File 'lib/twilio-ruby/rest/webhooks/v1.rb', line 102

def shared_keys(shared_key_id=:unset)
    if shared_key_id.nil?
        raise ArgumentError, 'shared_key_id cannot be nil'
    end

    if shared_key_id == :unset
        @shared_keys ||= SharedKeyList.new self
    else
        SharedKeyContext.new(self, shared_key_id)
    end
end

#tests ⇒ Twilio::REST::Webhooks::V1::TestList



115
116
117
# File 'lib/twilio-ruby/rest/webhooks/v1.rb', line 115

def tests
    @tests ||= TestList.new self
end

#to_s ⇒ Object

Provide a user friendly representation



120
121
122
# File 'lib/twilio-ruby/rest/webhooks/v1.rb', line 120

def to_s
    '<Twilio::REST::Webhooks::V1>';
end