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

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

Overview

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].

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



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 154

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 that created the resource.

Returns:

  • (String)

    The SID of the Account that created the resource



193
194
195
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 193

def 
  @properties['account_sid']
end

#date_createdTime

Returns The RFC 2822 date and time in GMT that the resource was created.

Returns:

  • (Time)

    The RFC 2822 date and time in GMT that the resource was created



175
176
177
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 175

def date_created
  @properties['date_created']
end

#date_updatedTime

Returns The RFC 2822 date and time in GMT that the resource was last updated.

Returns:

  • (Time)

    The RFC 2822 date and time in GMT that the resource was last updated



181
182
183
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 181

def date_updated
  @properties['date_updated']
end

#friendly_nameString

Returns A string name used to describe the Content resource.

Returns:

  • (String)

    A string name used to describe the Content resource



199
200
201
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 199

def friendly_name
  @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



247
248
249
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 247

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

#languageString

Returns Two-letter language code identifying the language the Content resource is in.

Returns:

  • (String)

    Two-letter language code identifying the language the Content resource is in.



205
206
207
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 205

def language
  @properties['language']
end

#legacy_bodyString

Returns The string body of this legacy content template.

Returns:

  • (String)

    The string body of this legacy content template



229
230
231
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 229

def legacy_body
  @properties['legacy_body']
end

#legacy_template_nameString

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

Returns:

  • (String)

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



223
224
225
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 223

def legacy_template_name
  @properties['legacy_template_name']
end

#sidString

Returns The unique string that identifies the resource.

Returns:

  • (String)

    The unique string that identifies the resource



187
188
189
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 187

def sid
  @properties['sid']
end

#to_sObject

Provide a user friendly representation



241
242
243
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 241

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

#typesHash

Returns The Content types (e.g. twilio/text) for this Content resource.

Returns:

  • (Hash)

    The Content types (e.g. twilio/text) for this Content resource



217
218
219
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 217

def types
  @properties['types']
end

#urlString

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

Returns:



235
236
237
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 235

def url
  @properties['url']
end

#variablesHash

Returns Defines the default placeholder values for variables included in the Content resource.

Returns:

  • (Hash)

    Defines the default placeholder values for variables included in the Content resource



211
212
213
# File 'lib/twilio-ruby/rest/content/v1/legacy_content.rb', line 211

def variables
  @properties['variables']
end