Class: Twilio::REST::FlexApi::V1::PluginReleaseInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, sid: nil) ⇒ PluginReleaseInstance

Initialize the PluginReleaseInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this PluginRelease resource.

  • sid (String) (defaults to: nil)

    The SID of the Call resource to fetch.



254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 254

def initialize(version, payload , sid: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'configuration_sid' => payload['configuration_sid'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'url' => payload['url'],
    }

    # Context
    @instance_context = nil
    @params = { 'sid' => sid  || @properties['sid']  , }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Plugin Release resource and owns this resource.

Returns:



290
291
292
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 290

def 
    @properties['account_sid']
end

#configuration_sidString

Returns The SID of the Plugin Configuration resource to release.

Returns:

  • (String)

    The SID of the Plugin Configuration resource to release.



296
297
298
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 296

def configuration_sid
    @properties['configuration_sid']
end

#contextPluginReleaseContext

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context

Returns:



275
276
277
278
279
280
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 275

def context
    unless @instance_context
        @instance_context = PluginReleaseContext.new(@version , @params['sid'])
    end
    @instance_context
end

#date_createdTime

Returns The date and time in GMT when the Flex Plugin Release was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



302
303
304
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 302

def date_created
    @properties['date_created']
end

#fetch(flex_metadata: :unset) ⇒ PluginReleaseInstance

Fetch the PluginReleaseInstance

Parameters:

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

    The Flex-Metadata HTTP request header

Returns:



316
317
318
319
320
321
322
323
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 316

def fetch(
    flex_metadata: :unset
)

    context.fetch(
        flex_metadata: , 
    )
end

#inspectObject

Provide a detailed, user friendly representation



334
335
336
337
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 334

def inspect
    values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.FlexApi.V1.PluginReleaseInstance #{values}>"
end

#sidString

Returns The unique string that we created to identify the Plugin Release resource.

Returns:

  • (String)

    The unique string that we created to identify the Plugin Release resource.



284
285
286
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 284

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



327
328
329
330
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 327

def to_s
    values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
    "<Twilio.FlexApi.V1.PluginReleaseInstance #{values}>"
end

#urlString

Returns The absolute URL of the Plugin Release resource.

Returns:

  • (String)

    The absolute URL of the Plugin Release resource.



308
309
310
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_release.rb', line 308

def url
    @properties['url']
end