class Twilio::REST::Serverless::V1::ServiceContext::FunctionContext::FunctionVersionContext::FunctionVersionContentInstance

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 FunctionVersionContentInstance @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 that is the parent of the

Function Version.

@param [String] sid The unique string that we created to identify the Function

Version resource.

@return [FunctionVersionContentInstance] FunctionVersionContentInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb
144 def initialize(version, payload, service_sid: nil, function_sid: nil, sid: nil)
145   super(version)
146 
147   # Marshaled Properties
148   @properties = {
149       'sid' => payload['sid'],
150       'account_sid' => payload['account_sid'],
151       'service_sid' => payload['service_sid'],
152       'function_sid' => payload['function_sid'],
153       'content' => payload['content'],
154       'url' => payload['url'],
155   }
156 
157   # Context
158   @instance_context = nil
159   @params = {'service_sid' => service_sid, 'function_sid' => function_sid, 'sid' => sid, }
160 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/function_version_content.rb
186 def account_sid
187   @properties['account_sid']
188 end
content() click to toggle source

@return [String] The content of the Function Version resource

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb
204 def content
205   @properties['content']
206 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 [FunctionVersionContentContext] FunctionVersionContentContext for this FunctionVersionContentInstance

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb
166 def context
167   unless @instance_context
168     @instance_context = FunctionVersionContentContext.new(
169         @version,
170         @params['service_sid'],
171         @params['function_sid'],
172         @params['sid'],
173     )
174   end
175   @instance_context
176 end
fetch() click to toggle source

Fetch the FunctionVersionContentInstance @return [FunctionVersionContentInstance] Fetched FunctionVersionContentInstance

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb
217 def fetch
218   context.fetch
219 end
function_sid() click to toggle source

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

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

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb
230 def inspect
231   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
232   "<Twilio.Serverless.V1.FunctionVersionContentInstance #{values}>"
233 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/function_version_content.rb
192 def service_sid
193   @properties['service_sid']
194 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/function_version_content.rb
180 def sid
181   @properties['sid']
182 end
to_s() click to toggle source

Provide a user friendly representation

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

@return [String] The url

    # File lib/twilio-ruby/rest/serverless/v1/service/function/function_version/function_version_content.rb
210 def url
211   @properties['url']
212 end