Class: Twilio::REST::Messaging::V2

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/messaging/v2.rb,
lib/twilio-ruby/rest/messaging/v2/domain_certs.rb,
lib/twilio-ruby/rest/messaging/v2/channels_sender.rb,
lib/twilio-ruby/rest/messaging/v2/typing_indicator.rb

Defined Under Namespace

Classes: ChannelsSenderContext, ChannelsSenderInstance, ChannelsSenderList, ChannelsSenderPage, DomainCertsContext, DomainCertsInstance, DomainCertsList, DomainCertsPage, TypingIndicatorInstance, TypingIndicatorList, TypingIndicatorPage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #patch, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ V2

Initialize the V2 version of Messaging



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

def initialize(domain)
    super
    @version = 'v2'
    @channels_senders = nil
    @domain_certs = nil
    @typing_indicator = nil
end

Instance Method Details

#channels_senders(sid = :unset) ⇒ Twilio::REST::Messaging::V2::ChannelsSenderContext, Twilio::REST::Messaging::V2::ChannelsSenderList

Parameters:

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

    The SID of the sender.

Returns:



33
34
35
36
37
38
39
40
41
42
# File 'lib/twilio-ruby/rest/messaging/v2.rb', line 33

def channels_senders(sid=:unset)
    if sid.nil?
        raise ArgumentError, 'sid cannot be nil'
    end
    if sid == :unset
        @channels_senders ||= ChannelsSenderList.new self
    else
        ChannelsSenderContext.new(self, sid)
    end
end

#domain_certs(domain_sid = :unset) ⇒ Twilio::REST::Messaging::V2::DomainCertsContext, Twilio::REST::Messaging::V2::DomainCertsList

Parameters:

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

    Unique string used to identify the domain that this certificate should be associated with.

Returns:



47
48
49
50
51
52
53
54
55
56
# File 'lib/twilio-ruby/rest/messaging/v2.rb', line 47

def domain_certs(domain_sid=:unset)
    if domain_sid.nil?
        raise ArgumentError, 'domain_sid cannot be nil'
    end
    if domain_sid == :unset
        @domain_certs ||= DomainCertsList.new self
    else
        DomainCertsContext.new(self, domain_sid)
    end
end

#to_sObject

Provide a user friendly representation



64
65
66
# File 'lib/twilio-ruby/rest/messaging/v2.rb', line 64

def to_s
    '<Twilio::REST::Messaging::V2>';
end

#typing_indicatorTwilio::REST::Messaging::V2::TypingIndicatorList



59
60
61
# File 'lib/twilio-ruby/rest/messaging/v2.rb', line 59

def typing_indicator
    @typing_indicator ||= TypingIndicatorList.new self
end