Class: Twilio::REST::FlexApi::V1::PluginConfigurationContext::ConfiguredPluginContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::FlexApi::V1::PluginConfigurationContext::ConfiguredPluginContext
- Defined in:
- lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb
Instance Method Summary collapse
-
#fetch(flex_metadata: :unset) ⇒ ConfiguredPluginInstance
Fetch the ConfiguredPluginInstance.
-
#initialize(version, configuration_sid, plugin_sid) ⇒ ConfiguredPluginContext
constructor
Initialize the ConfiguredPluginContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, configuration_sid, plugin_sid) ⇒ ConfiguredPluginContext
Initialize the ConfiguredPluginContext
145 146 147 148 149 150 151 152 153 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 145 def initialize(version, configuration_sid, plugin_sid) super(version) # Path Solution @solution = { configuration_sid: configuration_sid, plugin_sid: plugin_sid, } @uri = "/PluginService/Configurations/#{@solution[:configuration_sid]}/Plugins/#{@solution[:plugin_sid]}" end |
Instance Method Details
#fetch(flex_metadata: :unset) ⇒ ConfiguredPluginInstance
Fetch the ConfiguredPluginInstance
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 158 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) ConfiguredPluginInstance.new( @version, payload, configuration_sid: @solution[:configuration_sid], plugin_sid: @solution[:plugin_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
187 188 189 190 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 187 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.ConfiguredPluginContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
180 181 182 183 |
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration/configured_plugin.rb', line 180 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.FlexApi.V1.ConfiguredPluginContext #{context}>" end |