class Twilio::REST::Serverless::V1::ServiceContext::AssetContext::AssetVersionContext

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

Public Class Methods

new(version, service_sid, asset_sid, sid) click to toggle source

Initialize the AssetVersionContext @param [Version] version Version that contains the resource @param [String] service_sid The SID of the Service to fetch the Asset Version

resource from.

@param [String] asset_sid The SID of the Asset resource that is the parent of

the Asset Version resource to fetch.

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

Calls superclass method Twilio::REST::InstanceContext::new
    # File lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb
169 def initialize(version, service_sid, asset_sid, sid)
170   super(version)
171 
172   # Path Solution
173   @solution = {service_sid: service_sid, asset_sid: asset_sid, sid: sid, }
174   @uri = "/Services/#{@solution[:service_sid]}/Assets/#{@solution[:asset_sid]}/Versions/#{@solution[:sid]}"
175 end

Public Instance Methods

fetch() click to toggle source

Fetch the AssetVersionInstance @return [AssetVersionInstance] Fetched AssetVersionInstance

    # File lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb
180 def fetch
181   payload = @version.fetch('GET', @uri)
182 
183   AssetVersionInstance.new(
184       @version,
185       payload,
186       service_sid: @solution[:service_sid],
187       asset_sid: @solution[:asset_sid],
188       sid: @solution[:sid],
189   )
190 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb
201 def inspect
202   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
203   "#<Twilio.Serverless.V1.AssetVersionContext #{context}>"
204 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/serverless/v1/service/asset/asset_version.rb
194 def to_s
195   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
196   "#<Twilio.Serverless.V1.AssetVersionContext #{context}>"
197 end