class Twilio::REST::Api::V2010::AccountContext::OutgoingCallerIdInstance

Public Class Methods

new(version, payload, account_sid: nil, sid: nil) click to toggle source

Initialize the OutgoingCallerIdInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] account_sid The SID of the

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

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

OutgoingCallerId resource to fetch.

@return [OutgoingCallerIdInstance] OutgoingCallerIdInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
252 def initialize(version, payload, account_sid: nil, sid: nil)
253   super(version)
254 
255   # Marshaled Properties
256   @properties = {
257       'sid' => payload['sid'],
258       'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
259       'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
260       'friendly_name' => payload['friendly_name'],
261       'account_sid' => payload['account_sid'],
262       'phone_number' => payload['phone_number'],
263       'uri' => payload['uri'],
264   }
265 
266   # Context
267   @instance_context = nil
268   @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], }
269 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
308 def account_sid
309   @properties['account_sid']
310 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [OutgoingCallerIdContext] OutgoingCallerIdContext for this OutgoingCallerIdInstance

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
275 def context
276   unless @instance_context
277     @instance_context = OutgoingCallerIdContext.new(@version, @params['account_sid'], @params['sid'], )
278   end
279   @instance_context
280 end
date_created() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was created

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
290 def date_created
291   @properties['date_created']
292 end
date_updated() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was last updated

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
296 def date_updated
297   @properties['date_updated']
298 end
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
343 def delete
344   context.delete
345 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
327 def fetch
328   context.fetch
329 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the resource

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
302 def friendly_name
303   @properties['friendly_name']
304 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
356 def inspect
357   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
358   "<Twilio.Api.V2010.OutgoingCallerIdInstance #{values}>"
359 end
phone_number() click to toggle source

@return [String] The phone number in E.164 format

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
314 def phone_number
315   @properties['phone_number']
316 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
284 def sid
285   @properties['sid']
286 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
349 def to_s
350   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
351   "<Twilio.Api.V2010.OutgoingCallerIdInstance #{values}>"
352 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
336 def update(friendly_name: :unset)
337   context.update(friendly_name: friendly_name, )
338 end
uri() click to toggle source

@return [String] The URI of the resource, relative to `api.twilio.com`

    # File lib/twilio-ruby/rest/api/v2010/account/outgoing_caller_id.rb
320 def uri
321   @properties['uri']
322 end