Class: Twilio::REST::Content::V1::LegacyContentInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ LegacyContentInstance

Initialize the LegacyContentInstance

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

  • sid (String)

    The SID of the Call resource to fetch.



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 259

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
        'sid' => payload['sid'],
        'account_sid' => payload['account_sid'],
        'friendly_name' => payload['friendly_name'],
        'language' => payload['language'],
        'variables' => payload['variables'],
        'types' => payload['types'],
        'legacy_template_name' => payload['legacy_template_name'],
        'legacy_body' => payload['legacy_body'],
        'url' => payload['url'],
    }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/usage/api/account) that created Content resource.

Returns:



300
301
302
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 300

def 
    @properties['account_sid']
end

#date_createdTime

Returns The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.

Returns:



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

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.

Returns:



288
289
290
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 288

def date_updated
    @properties['date_updated']
end

#friendly_nameString

Returns A string name used to describe the Content resource. Not visible to the end recipient.

Returns:

  • (String)

    A string name used to describe the Content resource. Not visible to the end recipient.



306
307
308
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 306

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



354
355
356
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 354

def inspect
    "<Twilio.Content.V1.LegacyContentInstance>"
end

#languageString

Returns Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.

Returns:

  • (String)

    Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.



312
313
314
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 312

def language
    @properties['language']
end

#legacy_bodyString

Returns The string body field of the legacy content template associated with this Content resource.

Returns:

  • (String)

    The string body field of the legacy content template associated with this Content resource



336
337
338
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 336

def legacy_body
    @properties['legacy_body']
end

#legacy_template_nameString

Returns The string name of the legacy content template associated with this Content resource, unique across all template names for its account. Only lowercase letters, numbers and underscores are allowed.

Returns:

  • (String)

    The string name of the legacy content template associated with this Content resource, unique across all template names for its account. Only lowercase letters, numbers and underscores are allowed



330
331
332
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 330

def legacy_template_name
    @properties['legacy_template_name']
end

#sidString

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

Returns:

  • (String)

    The unique string that that we created to identify the Content resource.



294
295
296
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 294

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



348
349
350
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 348

def to_s
    "<Twilio.Content.V1.LegacyContentInstance>"
end

#typesHash

Returns The [Content types](www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.

Returns:



324
325
326
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 324

def types
    @properties['types']
end

#urlString

Returns The URL of the resource, relative to ‘content.twilio.com`.

Returns:



342
343
344
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 342

def url
    @properties['url']
end

#variablesHash

Returns Defines the default placeholder values for variables included in the Content resource. e.g. "Customer_Name".

Returns:

  • (Hash)

    Defines the default placeholder values for variables included in the Content resource. e.g. "Customer_Name".



318
319
320
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 318

def variables
    @properties['variables']
end