class Twilio::REST::Serverless::V1::ServiceContext::EnvironmentContext::LogContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Public Class Methods
new(version, service_sid, environment_sid, sid)
click to toggle source
Initialize the LogContext
@param [Version] version Version
that contains the resource @param [String] service_sid The SID of the Service to fetch the Log resource
from.
@param [String] environment_sid The SID of the environment with the Log resource
to fetch.
@param [String] sid The SID of the Log resource to fetch. @return [LogContext] LogContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb 201 def initialize(version, service_sid, environment_sid, sid) 202 super(version) 203 204 # Path Solution 205 @solution = {service_sid: service_sid, environment_sid: environment_sid, sid: sid, } 206 @uri = "/Services/#{@solution[:service_sid]}/Environments/#{@solution[:environment_sid]}/Logs/#{@solution[:sid]}" 207 end
Public Instance Methods
fetch()
click to toggle source
Fetch the LogInstance
@return [LogInstance] Fetched LogInstance
# File lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb 212 def fetch 213 payload = @version.fetch('GET', @uri) 214 215 LogInstance.new( 216 @version, 217 payload, 218 service_sid: @solution[:service_sid], 219 environment_sid: @solution[:environment_sid], 220 sid: @solution[:sid], 221 ) 222 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb 233 def inspect 234 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 235 "#<Twilio.Serverless.V1.LogContext #{context}>" 236 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/serverless/v1/service/environment/log.rb 226 def to_s 227 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 228 "#<Twilio.Serverless.V1.LogContext #{context}>" 229 end