Class: Twilio::REST::Events::V1::SchemaContext::SchemaVersionContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Events::V1::SchemaContext::SchemaVersionContext
- Defined in:
- lib/twilio-ruby/rest/events/v1/schema/schema_version.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#fetch ⇒ SchemaVersionInstance
Fetch the SchemaVersionInstance.
-
#initialize(version, id, schema_version) ⇒ SchemaVersionContext
constructor
Initialize the SchemaVersionContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, id, schema_version) ⇒ SchemaVersionContext
Initialize the SchemaVersionContext
137 138 139 140 141 142 143 144 145 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 137 def initialize(version, id, schema_version) super(version) # Path Solution @solution = { id: id, schema_version: schema_version, } @uri = "/Schemas/#{@solution[:id]}/Versions/#{@solution[:schema_version]}" end |
Instance Method Details
#fetch ⇒ SchemaVersionInstance
Fetch the SchemaVersionInstance
149 150 151 152 153 154 155 156 157 158 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 149 def fetch payload = @version.fetch('GET', @uri) SchemaVersionInstance.new( @version, payload, id: @solution[:id], schema_version: @solution[:schema_version], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
170 171 172 173 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 170 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Events.V1.SchemaVersionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
163 164 165 166 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 163 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Events.V1.SchemaVersionContext #{context}>" end |