class Twilio::REST::Events::V1::SchemaContext::SchemaVersionContext
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Public Class Methods
new(version, id, schema_version)
click to toggle source
Initialize the SchemaVersionContext
@param [Version] version Version
that contains the resource @param [String] id The unique identifier of the schema. Each schema can have
multiple versions, that share the same id.
@param [String] schema_version The version of the schema @return [SchemaVersionContext] SchemaVersionContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/events/v1/schema/version.rb 159 def initialize(version, id, schema_version) 160 super(version) 161 162 # Path Solution 163 @solution = {id: id, schema_version: schema_version, } 164 @uri = "/Schemas/#{@solution[:id]}/Versions/#{@solution[:schema_version]}" 165 end
Public Instance Methods
fetch()
click to toggle source
Fetch the SchemaVersionInstance
@return [SchemaVersionInstance] Fetched SchemaVersionInstance
# File lib/twilio-ruby/rest/events/v1/schema/version.rb 170 def fetch 171 payload = @version.fetch('GET', @uri) 172 173 SchemaVersionInstance.new( 174 @version, 175 payload, 176 id: @solution[:id], 177 schema_version: @solution[:schema_version], 178 ) 179 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/events/v1/schema/version.rb 190 def inspect 191 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 192 "#<Twilio.Events.V1.SchemaVersionContext #{context}>" 193 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/events/v1/schema/version.rb 183 def to_s 184 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 185 "#<Twilio.Events.V1.SchemaVersionContext #{context}>" 186 end