class Twilio::REST::Api::V2010::AccountContext::SigningKeyInstance

Public Class Methods

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

Initialize the SigningKeyInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] account_sid A 34 character string that uniquely identifies this

resource.

@param [String] sid The sid @return [SigningKeyInstance] SigningKeyInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
222 def initialize(version, payload, account_sid: nil, sid: nil)
223   super(version)
224 
225   # Marshaled Properties
226   @properties = {
227       'sid' => payload['sid'],
228       'friendly_name' => payload['friendly_name'],
229       'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
230       'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
231   }
232 
233   # Context
234   @instance_context = nil
235   @params = {'account_sid' => account_sid, 'sid' => sid || @properties['sid'], }
236 end

Public Instance Methods

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 [SigningKeyContext] SigningKeyContext for this SigningKeyInstance

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
242 def context
243   unless @instance_context
244     @instance_context = SigningKeyContext.new(@version, @params['account_sid'], @params['sid'], )
245   end
246   @instance_context
247 end
date_created() click to toggle source

@return [Time] The date_created

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
263 def date_created
264   @properties['date_created']
265 end
date_updated() click to toggle source

@return [Time] The date_updated

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
269 def date_updated
270   @properties['date_updated']
271 end
delete() click to toggle source

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

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
291 def delete
292   context.delete
293 end
fetch() click to toggle source

Fetch the SigningKeyInstance @return [SigningKeyInstance] Fetched SigningKeyInstance

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
276 def fetch
277   context.fetch
278 end
friendly_name() click to toggle source

@return [String] The friendly_name

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
257 def friendly_name
258   @properties['friendly_name']
259 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
304 def inspect
305   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
306   "<Twilio.Api.V2010.SigningKeyInstance #{values}>"
307 end
sid() click to toggle source

@return [String] The sid

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
251 def sid
252   @properties['sid']
253 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
297 def to_s
298   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
299   "<Twilio.Api.V2010.SigningKeyInstance #{values}>"
300 end
update(friendly_name: :unset) click to toggle source

Update the SigningKeyInstance @param [String] friendly_name The friendly_name @return [SigningKeyInstance] Updated SigningKeyInstance

    # File lib/twilio-ruby/rest/api/v2010/account/signing_key.rb
284 def update(friendly_name: :unset)
285   context.update(friendly_name: friendly_name, )
286 end