Class: Twilio::REST::OutgoingCallerIds

Inherits:
ListResource show all
Defined in:
lib/twilio-ruby/rest/outgoing_caller_ids.rb

Instance Method Summary collapse

Methods inherited from ListResource

#get, #initialize, #inspect, #list

Methods included from Utils

#detwilify, #twilify

Constructor Details

This class inherits a constructor from Twilio::REST::ListResource

Instance Method Details

#add(phone_number) ⇒ Object Also known as: verify



4
5
6
# File 'lib/twilio-ruby/rest/outgoing_caller_ids.rb', line 4

def add(phone_number)
  create phone_number: phone_number
end

#create(params = {}) ⇒ Object

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.



13
14
15
16
17
18
19
# File 'lib/twilio-ruby/rest/outgoing_caller_ids.rb', line 13

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