Class: Twilio::REST::Content::V2::ContentInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Content::V2::ContentInstance
- Defined in:
- lib/twilio-ruby/rest/content/v2/content.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/usage/api/account) that created Content resource.
-
#date_created ⇒ Time
The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#friendly_name ⇒ String
A string name used to describe the Content resource.
-
#initialize(version, payload) ⇒ ContentInstance
constructor
Initialize the ContentInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#language ⇒ String
Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.
-
#links ⇒ Hash
A list of links related to the Content resource, such as approval_fetch and approval_create.
-
#sid ⇒ String
The unique string that that we created to identify the Content resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#types ⇒ Hash
The [Content types](www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
-
#url ⇒ String
The URL of the resource, relative to ‘content.twilio.com`.
-
#variables ⇒ Hash
Defines the default placeholder values for variables included in the Content resource.
Constructor Details
#initialize(version, payload) ⇒ ContentInstance
Initialize the ContentInstance
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 221 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'], 'url' => payload['url'], 'links' => payload['links'], } end |
Instance Method Details
#account_sid ⇒ String
260 261 262 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 260 def account_sid @properties['account_sid'] end |
#date_created ⇒ Time
242 243 244 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 242 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
248 249 250 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 248 def date_updated @properties['date_updated'] end |
#friendly_name ⇒ String
266 267 268 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 266 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
308 309 310 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 308 def inspect "<Twilio.Content.V2.ContentInstance>" end |
#language ⇒ String
272 273 274 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 272 def language @properties['language'] end |
#links ⇒ Hash
296 297 298 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 296 def links @properties['links'] end |
#sid ⇒ String
254 255 256 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 254 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
302 303 304 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 302 def to_s "<Twilio.Content.V2.ContentInstance>" end |
#types ⇒ Hash
284 285 286 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 284 def types @properties['types'] end |
#url ⇒ String
290 291 292 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 290 def url @properties['url'] end |
#variables ⇒ Hash
278 279 280 |
# File 'lib/twilio-ruby/rest/content/v2/content.rb', line 278 def variables @properties['variables'] end |