Class: Twilio::REST::Pricing::V1::MessagingList

Inherits:
ListResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/pricing/v1/messaging.rb,
lib/twilio-ruby/rest/pricing/v1/messaging/country.rb

Defined Under Namespace

Classes: CountryContext, CountryInstance, CountryList, CountryPage

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ MessagingList

Initialize the MessagingList

Parameters:

  • version (Version)

    Version that contains the resource



26
27
28
29
30
31
32
33
# File 'lib/twilio-ruby/rest/pricing/v1/messaging.rb', line 26

def initialize(version)
    super(version)
    # Path Solution
    @solution = {  }
    @uri = "/Messaging"
    # Components
    @countries = nil
end

Instance Method Details

#countries(iso_country = :unset) ⇒ CountryList, CountryContext

Access the countries

Returns:

Raises:

  • (ArgumentError)


40
41
42
43
44
45
46
47
48
# File 'lib/twilio-ruby/rest/pricing/v1/messaging.rb', line 40

def countries(iso_country=:unset)
    raise ArgumentError, 'iso_country cannot be nil' if iso_country.nil?

    if iso_country != :unset
        return CountryContext.new(@version,iso_country )
    end

    @countries ||= CountryList.new(@version )
end

#to_sObject

Provide a user friendly representation



51
52
53
# File 'lib/twilio-ruby/rest/pricing/v1/messaging.rb', line 51

def to_s
    '#<Twilio.Pricing.V1.MessagingList>'
end