Sha256: bad2ee6513309ef603769a6b46026b53cb653bc2576a938cbd593be1e40302fa

Contents?: true

Size: 835 Bytes

Versions: 22

Compression:

Stored size: 835 Bytes

Contents

module Twilio
  module REST
    class OutgoingCallerIds < ListResource
      def add(phone_number)
        create :phone_number => phone_number
      end
      alias :verify :add

      ##
      # Override ListResource#create to instantiate the proper instance class.
      # This doesn't actually matter since all properties are lazily loaded into
      # whatever object is instantiated. But it might matter in the future.
      def create(params={}) # :nodoc:
        old_instance_class = @instance_class
        @instance_class = Twilio::REST::PhoneNumberVerificationRequest
        verification_request = super
        @instance_class = old_instance_class
        verification_request
      end
    end

    class OutgoingCallerId < InstanceResource; end
    class PhoneNumberVerificationRequest < InstanceResource; end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
twilio-ruby-3.12.3 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.12.2 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.12.1 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.12.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.11.6 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.11.5 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.11.4 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.11.3 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.11.1 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.11.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.10.1 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.10.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.9.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.8.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.7.1 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.7.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.6.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.5.1 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.5.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-3.4.2 lib/twilio-ruby/rest/outgoing_caller_ids.rb