Class: Twilio::REST::Content::V1::ContentAndApprovalsInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ ContentAndApprovalsInstance

Initialize the ContentAndApprovalsInstance

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 ContentAndApprovals 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
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.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'],
        'approval_requests' => payload['approval_requests'],
    }
end

Instance Method Details

#account_sid ⇒ String

Returns The SID of the Account that created Content resource.

Returns:

  • (String) —

    The SID of the Account that created Content resource.



298
299
300
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 298

def 
    @properties['account_sid']
end

#approval_requests ⇒ Hash

Returns The submitted information and approval request status of the Content resource.

Returns:

  • (Hash) —

    The submitted information and approval request status of the Content resource.



328
329
330
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 328

def approval_requests
    @properties['approval_requests']
end

#date_created ⇒ Time

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

Returns:

  • (Time) —

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



280
281
282
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 280

def date_created
    @properties['date_created']
end

#date_updated ⇒ Time

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

Returns:

  • (Time) —

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



286
287
288
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 286

def date_updated
    @properties['date_updated']
end

#friendly_name ⇒ String

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.



304
305
306
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 304

def friendly_name
    @properties['friendly_name']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



340
341
342
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 340

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

#language ⇒ String

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.



310
311
312
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 310

def language
    @properties['language']
end

#sid ⇒ String

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.



292
293
294
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 292

def sid
    @properties['sid']
end

#to_s ⇒ Object

Provide a user friendly representation



334
335
336
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 334

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

#types ⇒ Hash

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.



322
323
324
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 322

def types
    @properties['types']
end

#variables ⇒ Hash

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\".



316
317
318
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 316

def variables
    @properties['variables']
end