Sha256: 5e6afc698233f993e198b6a3f0c32c7951c1f450b8928b61915c8aacfa07a03d

Contents?: true

Size: 832 Bytes

Versions: 42

Compression:

Stored size: 832 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

42 entries across 42 versions & 1 rubygems

Version Path
twilio-ruby-4.13.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.12.1 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.11.1 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.11.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.10.0.edge lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.10.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.9.1 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.9.1.edge lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.9.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.9.0.edge lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.8.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.7.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.8.3.edge lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.8.2.edge lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.8.1.edge lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.8.0.edge lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.6.2 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.6.1 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.6.0 lib/twilio-ruby/rest/outgoing_caller_ids.rb
twilio-ruby-4.7.0.edge lib/twilio-ruby/rest/outgoing_caller_ids.rb