##
# This code was generated by
# \ / _    _  _|   _  _
#  | (_)\/(_)(_|\/| |(/_  v1.0.0
#       /       /       

module Twilio
  module REST
    class Pricing < Domain
      class V1 < Version
        class MessagingList < ListResource
          ##
          # Initialize the MessagingList
          # @param [Version] version Version that contains the resource
          
          # @return [MessagingList] MessagingList
          def initialize(version)
            super(version)
            
            # Path Solution
            @solution = {}
            
            # Components
            @countries = nil
          end
          
          ##
          # Access the countries
          # @param [String] iso_country The iso_country
          
          # @return [CountryList] CountryList
          def countries(iso_country=:unset)
            if iso_country != :unset
              return CountryContext.new(
                  @version,
                  iso_country,
              )
            end
            
              @countries ||= CountryList.new(
                  @version,
              )
          end
          
          ##
          # Provide a user friendly representation
          def to_s
            '#<Twilio.Pricing.V1.MessagingList>'
          end
        end
      
        class MessagingPage < Page
          ##
          # Initialize the MessagingPage
          # @param [Version] version Version that contains the resource
          # @param [Response] response Response from the API
          # @param [Hash] solution Path solution for the resource
          
          # @return [MessagingPage] MessagingPage
          def initialize(version, response, solution)
            super(version, response)
            
            # Path Solution
            @solution = solution
          end
          
          ##
          # Build an instance of MessagingInstance
          # @param [Hash] payload Payload response from the API
          
          # @return [MessagingInstance] MessagingInstance
          def get_instance(payload)
            return MessagingInstance.new(
                @version,
                payload,
            )
          end
          
          ##
          # Provide a user friendly representation
          def to_s
            '<Twilio.Pricing.V1.MessagingPage>'
          end
        end
      
        class MessagingInstance < InstanceResource
          ##
          # Initialize the MessagingInstance
          # @param [Version] version Version that contains the resource
          # @param [Hash] payload payload that contains response from Twilio
          
          # @return [MessagingInstance] MessagingInstance
          def initialize(version, payload)
            super(version)
            
            # Marshaled Properties
            @properties = {
                'name' => payload['name'],
                'url' => payload['url'],
                'links' => payload['links'],
            }
          end
          
          def name
            @properties['name']
          end
          
          def url
            @properties['url']
          end
          
          def links
            @properties['links']
          end
          
          ##
          # Provide a user friendly representation
          def to_s
            "<Twilio.Pricing.V1.MessagingInstance>"
          end
        end
      end
    end
  end
end