Class: Twilio::REST::ChatBase

Inherits:
Domain
  • Object
show all
Defined in:
lib/twilio-ruby/rest/chat_base.rb

Direct Known Subclasses

Chat

Instance Attribute Summary

Attributes inherited from Domain

#client

Instance Method Summary collapse

Methods inherited from Domain

#absolute_url, #request

Constructor Details

#initialize(twilio) ⇒ ChatBase

Initialize chat domain

Parameters:

  • twilio
    • The twilio client



19
20
21
22
23
24
25
26
27
# File 'lib/twilio-ruby/rest/chat_base.rb', line 19

def initialize(twilio)
  super(twilio)
  @base_url =  "https://chat.twilio.com"
  @host = "chat.twilio.com"
  @port = 443
  @v1 = nil
  @v2 = nil
  @v3 = nil
end

Instance Method Details

#to_sObject

Provide a user friendly representation



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

def to_s
  '<Twilio::REST::Chat>';
end

#v1Object



29
30
31
# File 'lib/twilio-ruby/rest/chat_base.rb', line 29

def v1
  @v1 ||= Chat::V1.new self
end

#v2Object



33
34
35
# File 'lib/twilio-ruby/rest/chat_base.rb', line 33

def v2
  @v2 ||= Chat::V2.new self
end

#v3Object



37
38
39
# File 'lib/twilio-ruby/rest/chat_base.rb', line 37

def v3
  @v3 ||= Chat::V3.new self
end