Class: Twilio::REST::Proxy::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/proxy/v1.rb,
lib/twilio-ruby/rest/proxy/v1/service.rb,
lib/twilio-ruby/rest/proxy/v1/service/session.rb,
lib/twilio-ruby/rest/proxy/v1/service/short_code.rb,
lib/twilio-ruby/rest/proxy/v1/service/phone_number.rb,
lib/twilio-ruby/rest/proxy/v1/service/session/interaction.rb,
lib/twilio-ruby/rest/proxy/v1/service/session/participant.rb,
lib/twilio-ruby/rest/proxy/v1/service/session/participant/message_interaction.rb

Defined Under Namespace

Classes: ServiceContext, ServiceInstance, ServiceList, ServicePage

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 Proxy



21
22
23
24
25
# File 'lib/twilio-ruby/rest/proxy/v1.rb', line 21

def initialize(domain)
    super
    @version = 'v1'
    @services = nil
end

Instance Method Details

#services(sid = :unset) ⇒ Twilio::REST::Proxy::V1::ServiceContext, Twilio::REST::Proxy::V1::ServiceList

Parameters:

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

    The Twilio-provided string that uniquely identifies the Service resource to fetch.

Returns:



31
32
33
34
35
36
37
38
39
40
# File 'lib/twilio-ruby/rest/proxy/v1.rb', line 31

def services(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @services ||= ServiceList.new self
    else
        ServiceContext.new(self, sid)
    end
end

#to_sObject

Provide a user friendly representation



43
44
45
# File 'lib/twilio-ruby/rest/proxy/v1.rb', line 43

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