Class: Twilio::REST::FlexApi::V1::PluginConfigurationArchiveInstance

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

Instance Method Summary collapse

Constructor Details

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

Initialize the PluginConfigurationArchiveInstance

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 PluginConfigurationArchive resource.

  • sid (String) (defaults to: nil) —

    The SID of the Call resource to fetch.



213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 213

def initialize(version, payload , sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'name' => payload['name'],
        'description' => payload['description'],
        'archived' => payload['archived'],
        '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_sid ⇒ String

Returns The SID of the Account that created the Flex Plugin Configuration resource and owns this resource.

Returns:

  • (String) —

    The SID of the Account that created the Flex Plugin Configuration resource and owns this resource.



252
253
254
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 252

def 
    @properties['account_sid']
end

#archived ⇒ Boolean

Returns Whether the Flex Plugin Configuration is archived. The default value is false.

Returns:

  • (Boolean) —

    Whether the Flex Plugin Configuration is archived. The default value is false.



270
271
272
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 270

def archived
    @properties['archived']
end

#context ⇒ PluginConfigurationArchiveContext

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

Returns:



237
238
239
240
241
242
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 237

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

#date_created ⇒ Time

Returns The date and time in GMT when the Flex Plugin Configuration was created specified in ISO 8601 format.

Returns:

  • (Time) —

    The date and time in GMT when the Flex Plugin Configuration was created specified in ISO 8601 format.



276
277
278
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 276

def date_created
    @properties['date_created']
end

#description ⇒ String

Returns The description of the Flex Plugin Configuration resource.

Returns:

  • (String) —

    The description of the Flex Plugin Configuration resource.



264
265
266
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 264

def description
    @properties['description']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



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

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

#name ⇒ String

Returns The name of this Flex Plugin Configuration.

Returns:

  • (String) —

    The name of this Flex Plugin Configuration.



258
259
260
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 258

def name
    @properties['name']
end

#sid ⇒ String

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

Returns:

  • (String) —

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



246
247
248
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 246

def sid
    @properties['sid']
end

#to_s ⇒ Object

Provide a user friendly representation



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

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

#update(flex_metadata: :unset) ⇒ PluginConfigurationArchiveInstance

Update the PluginConfigurationArchiveInstance

Parameters:

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

    The Flex-Metadata HTTP request header

Returns:



290
291
292
293
294
295
296
297
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 290

def update(
  flex_metadata: :unset
)

    context.update(
        flex_metadata: , 
    )
end

#url ⇒ String

Returns The absolute URL of the Flex Plugin Configuration resource.

Returns:

  • (String) —

    The absolute URL of the Flex Plugin Configuration resource.



282
283
284
# File 'lib/twilio-ruby/rest/flex_api/v1/plugin_configuration_archive.rb', line 282

def url
    @properties['url']
end