class Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionInstance

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

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

Initialize the FunctionVersionInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] service_sid The SID of the Service that the Function Version

resource is associated with.

@param [String] function_sid The SID of the Function resource that is the parent

of the Function Version resource.

@param [String] sid The SID of the Function Version resource to fetch. @return [FunctionVersionInstance] FunctionVersionInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
236 def initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil)
237   super(version)
238 
239   # Marshaled Properties
240   @properties = {
241       'sid' => payload['sid'],
242       'account_sid' => payload['account_sid'],
243       'service_sid' => payload['service_sid'],
244       'function_sid' => payload['function_sid'],
245       'path' => payload['path'],
246       'visibility' => payload['visibility'],
247       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
248       'url' => payload['url'],
249       'links' => payload['links'],
250   }
251 
252   # Context
253   @instance_context = nil
254   @params = {
255       'service_sid' => service_sid,
256       'function_sid' => function_sid,
257       'sid' => sid || @properties['sid'],
258   }
259 end

Public Instance Methods

account_sid() click to toggle source

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

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
285 def account_sid
286   @properties['account_sid']
287 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 [FunctionVersionContext] FunctionVersionContext for this FunctionVersionInstance

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
265 def context
266   unless @instance_context
267     @instance_context = FunctionVersionContext.new(
268         @version,
269         @params['service_sid'],
270         @params['function_sid'],
271         @params['sid'],
272     )
273   end
274   @instance_context
275 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the Function Version resource was created

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
315 def date_created
316   @properties['date_created']
317 end
fetch() click to toggle source

Fetch the FunctionVersionInstance @return [FunctionVersionInstance] Fetched FunctionVersionInstance

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
334 def fetch
335   context.fetch
336 end
function_sid() click to toggle source

@return [String] The SID of the Function resource that is the parent of the Function Version resource

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
297 def function_sid
298   @properties['function_sid']
299 end
function_version_content() click to toggle source

Access the function_version_content @return [function_version_content] function_version_content

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
341 def function_version_content
342   context.function_version_content
343 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
354 def inspect
355   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
356   "<Twilio.Serverless.V1.FunctionVersionInstance #{values}>"
357 end
path() click to toggle source

@return [String] The URL-friendly string by which the Function Version resource can be referenced

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
303 def path
304   @properties['path']
305 end
service_sid() click to toggle source

@return [String] The SID of the Service that the Function Version resource is associated with

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
291 def service_sid
292   @properties['service_sid']
293 end
sid() click to toggle source

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

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
279 def sid
280   @properties['sid']
281 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
347 def to_s
348   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
349   "<Twilio.Serverless.V1.FunctionVersionInstance #{values}>"
350 end
url() click to toggle source

@return [String] The absolute URL of the Function Version resource

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
321 def url
322   @properties['url']
323 end
visibility() click to toggle source

@return [function_version.Visibility] The access control that determines how the Function Version resource can be accessed

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version.rb
309 def visibility
310   @properties['visibility']
311 end