class Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdContext

Public Class Methods

new(version, account_sid, sid) click to toggle source

Initialize the OutgoingCallerIdContext @param [Version] version Version that contains the resource @param [String] account_sid The SID of the

{Account}[https://www.twilio.com/docs/iam/api/account] that created the
OutgoingCallerId resource to fetch.

@param [String] sid The Twilio-provided string that uniquely identifies the

OutgoingCallerId resource to fetch.

@return [OutgoingCallerIdContext] OutgoingCallerIdContext

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
179 def initialize(version, account_sid, sid)
180   super(version)
181 
182   # Path Solution
183   @solution = {account_sid: account_sid, sid: sid, }
184   @uri = "/Accounts/#{@solution[:account_sid]}/OutgoingCallerIds/#{@solution[:sid]}.json"
185 end

Public Instance Methods

delete() click to toggle source

Delete the OutgoingCallerIdInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
222 def delete
223    @version.delete('DELETE', @uri)
224 end
fetch() click to toggle source

Fetch the OutgoingCallerIdInstance @return [OutgoingCallerIdInstance] Fetched OutgoingCallerIdInstance

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
190 def fetch
191   payload = @version.fetch('GET', @uri)
192 
193   OutgoingCallerIdInstance.new(
194       @version,
195       payload,
196       account_sid: @solution[:account_sid],
197       sid: @solution[:sid],
198   )
199 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
235 def inspect
236   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
237   "#<Twilio.Api.V2010.OutgoingCallerIdContext #{context}>"
238 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
228 def to_s
229   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
230   "#<Twilio.Api.V2010.OutgoingCallerIdContext #{context}>"
231 end
update(friendly_name: :unset) click to toggle source

Update the OutgoingCallerIdInstance @param [String] friendly_name A descriptive string that you create to describe

the resource. It can be up to 64 characters long.

@return [OutgoingCallerIdInstance] Updated OutgoingCallerIdInstance

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
206 def update(friendly_name: :unset)
207   data = Twilio::Values.of({'FriendlyName' => friendly_name, })
208 
209   payload = @version.update('POST', @uri, data: data)
210 
211   OutgoingCallerIdInstance.new(
212       @version,
213       payload,
214       account_sid: @solution[:account_sid],
215       sid: @solution[:sid],
216   )
217 end