class Twilio::REST::FlexApi::V1

Public Class Methods

new(domain) click to toggle source

Initialize the V1 version of FlexApi

Calls superclass method Twilio::REST::Version::new
   # File lib/twilio-ruby/rest/flex_api/v1.rb
15 def initialize(domain)
16   super
17   @version = 'v1'
18   @channel = nil
19   @configuration = nil
20   @flex_flow = nil
21   @web_channel = nil
22 end

Public Instance Methods

channel(sid=:unset) click to toggle source

@param [String] sid The SID of the Flex chat channel resource to fetch. @return [Twilio::REST::Flex_api::V1::ChannelContext] if sid was passed. @return [Twilio::REST::Flex_api::V1::ChannelList]

   # File lib/twilio-ruby/rest/flex_api/v1.rb
28 def channel(sid=:unset)
29   if sid.nil?
30       raise ArgumentError, 'sid cannot be nil'
31   end
32   if sid == :unset
33       @channel ||= ChannelList.new self
34   else
35       ChannelContext.new(self, sid)
36   end
37 end
configuration() click to toggle source

@return [Twilio::REST::Flex_api::V1::ConfigurationContext]

   # File lib/twilio-ruby/rest/flex_api/v1.rb
41 def configuration
42   @configuration ||= ConfigurationContext.new self
43 end
flex_flow(sid=:unset) click to toggle source

@param [String] sid The SID of the Flex Flow resource to fetch. @return [Twilio::REST::Flex_api::V1::FlexFlowContext] if sid was passed. @return [Twilio::REST::Flex_api::V1::FlexFlowList]

   # File lib/twilio-ruby/rest/flex_api/v1.rb
49 def flex_flow(sid=:unset)
50   if sid.nil?
51       raise ArgumentError, 'sid cannot be nil'
52   end
53   if sid == :unset
54       @flex_flow ||= FlexFlowList.new self
55   else
56       FlexFlowContext.new(self, sid)
57   end
58 end
to_s() click to toggle source

Provide a user friendly representation

   # File lib/twilio-ruby/rest/flex_api/v1.rb
77 def to_s
78   '<Twilio::REST::FlexApi::V1>'
79 end
web_channel(sid=:unset) click to toggle source

@param [String] sid The SID of the WebChannel resource to fetch. @return [Twilio::REST::Flex_api::V1::WebChannelContext] if sid was passed. @return [Twilio::REST::Flex_api::V1::WebChannelList]

   # File lib/twilio-ruby/rest/flex_api/v1.rb
64 def web_channel(sid=:unset)
65   if sid.nil?
66       raise ArgumentError, 'sid cannot be nil'
67   end
68   if sid == :unset
69       @web_channel ||= WebChannelList.new self
70   else
71       WebChannelContext.new(self, sid)
72   end
73 end