Class: Twilio::REST::FlexApi::V1::PluginContext::PluginVersionsContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::PluginContext::PluginVersionsContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb
Instance Method Summary collapse
-
#fetch(flex_metadata: :unset) ⇒ PluginVersionsInstance
Fetch the PluginVersionsInstance.
-
#initialize(version, plugin_sid, sid) ⇒ PluginVersionsContext
constructor
Initialize the PluginVersionsContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, plugin_sid, sid) ⇒ PluginVersionsContext
Initialize the PluginVersionsContext
188 189 190 191 192 193 194 195 196 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb', line 188 def initialize(version, plugin_sid, sid) super(version) # Path Solution @solution = { plugin_sid: plugin_sid, sid: sid, } @uri = "/PluginService/Plugins/#{@solution[:plugin_sid]}/Versions/#{@solution[:sid]}" end |
Instance Method Details
#fetch(flex_metadata: :unset) ⇒ PluginVersionsInstance
Fetch the PluginVersionsInstance
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb', line 201 def fetch( flex_metadata: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', 'Flex-Metadata' => , }) payload = @version.fetch('GET', @uri, headers: headers) PluginVersionsInstance.new( @version, payload, plugin_sid: @solution[:plugin_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
230 231 232 233 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb', line 230 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.PluginVersionsContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
223 224 225 226 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin/plugin_versions.rb', line 223 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.PluginVersionsContext #{context}>" end |