Class: Twilio::REST::FlexApi::V1

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1.rb,
lib/twilio-ruby/rest/flex_api/v1/channel.rb,
lib/twilio-ruby/rest/flex_api/v1/flex_flow.rb,
lib/twilio-ruby/rest/flex_api/v1/web_channel.rb,
lib/twilio-ruby/rest/flex_api/v1/configuration.rb

Defined Under Namespace

Classes: ChannelContext, ChannelInstance, ChannelList, ChannelPage, ConfigurationContext, ConfigurationInstance, ConfigurationList, ConfigurationPage, FlexFlowContext, FlexFlowInstance, FlexFlowList, FlexFlowPage, WebChannelContext, WebChannelInstance, WebChannelList, WebChannelPage

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 FlexApi


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

def initialize(domain)
  super
  @version = 'v1'
  @channel = nil
  @configuration = nil
  @flex_flow = nil
  @web_channel = nil
end

Instance Method Details

#channel(sid = :unset) ⇒ Twilio::REST::Flex_api::V1::ChannelContext, Twilio::REST::Flex_api::V1::ChannelList

Parameters:

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

    The SID of the Flex chat channel resource to fetch.

Returns:

  • (Twilio::REST::Flex_api::V1::ChannelContext)

    if sid was passed.

  • (Twilio::REST::Flex_api::V1::ChannelList)

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

def channel(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @channel ||= ChannelList.new self
  else
      ChannelContext.new(self, sid)
  end
end

#configurationTwilio::REST::Flex_api::V1::ConfigurationContext

Returns:

  • (Twilio::REST::Flex_api::V1::ConfigurationContext)

41
42
43
# File 'lib/twilio-ruby/rest/flex_api/v1.rb', line 41

def configuration
  @configuration ||= ConfigurationContext.new self
end

#flex_flow(sid = :unset) ⇒ Twilio::REST::Flex_api::V1::FlexFlowContext, Twilio::REST::Flex_api::V1::FlexFlowList

Parameters:

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

    The SID of the Flex Flow resource to fetch.

Returns:

  • (Twilio::REST::Flex_api::V1::FlexFlowContext)

    if sid was passed.

  • (Twilio::REST::Flex_api::V1::FlexFlowList)

49
50
51
52
53
54
55
56
57
58
# File 'lib/twilio-ruby/rest/flex_api/v1.rb', line 49

def flex_flow(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @flex_flow ||= FlexFlowList.new self
  else
      FlexFlowContext.new(self, sid)
  end
end

#to_sObject

Provide a user friendly representation


77
78
79
# File 'lib/twilio-ruby/rest/flex_api/v1.rb', line 77

def to_s
  '<Twilio::REST::FlexApi::V1>'
end

#web_channel(sid = :unset) ⇒ Twilio::REST::Flex_api::V1::WebChannelContext, Twilio::REST::Flex_api::V1::WebChannelList

Parameters:

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

    The SID of the WebChannel resource to fetch.

Returns:

  • (Twilio::REST::Flex_api::V1::WebChannelContext)

    if sid was passed.

  • (Twilio::REST::Flex_api::V1::WebChannelList)

64
65
66
67
68
69
70
71
72
73
# File 'lib/twilio-ruby/rest/flex_api/v1.rb', line 64

def web_channel(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @web_channel ||= WebChannelList.new self
  else
      WebChannelContext.new(self, sid)
  end
end