Class: Twilio::REST::FlexApi::V1::PluginReleaseContext

Inherits:
InstanceContext show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, sid) ⇒ PluginReleaseContext

Initialize the PluginReleaseContext

Parameters:

  • version (Version)

    Version that contains the resource

  • sid (String)

    The SID of the Flex Plugin Release resource to fetch.



169
170
171
172
173
174
175
176
177
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 169

def initialize(version, sid)
    super(version)

    # Path Solution
    @solution = { sid: sid,  }
    @uri = "/PluginService/Releases/#{@solution[:sid]}"

    
end

Instance Method Details

#fetch(flex_metadata: :unset) ⇒ PluginReleaseInstance

Fetch the PluginReleaseInstance

Parameters:

  • flex_metadata (String) (defaults to: :unset)

    The Flex-Metadata HTTP request header

Returns:



182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 182

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)
    PluginReleaseInstance.new(
        @version,
        payload,
        sid: @solution[:sid],
    )
end

#inspectObject

Provide a detailed, user friendly representation



210
211
212
213
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 210

def inspect
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.FlexApi.V1.PluginReleaseContext #{context}>"
end

#to_sObject

Provide a user friendly representation



203
204
205
206
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 203

def to_s
    context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
    "#<Twilio.FlexApi.V1.PluginReleaseContext #{context}>"
end