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
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
139 140 141 142 143 144 145 146 147 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 139 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
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 151 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) SchemaVersionInstance.new( @version, payload, id: @solution[:id], schema_version: @solution[:schema_version], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
178 179 180 181 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 178 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Events.V1.SchemaVersionContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
171 172 173 174 |
# File 'lib/twilio-ruby/rest/events/v1/schema/schema_version.rb', line 171 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Events.V1.SchemaVersionContext #{context}>" end |