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.



251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 251

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_sidString

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

Returns:



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

def 
    @properties['account_sid']
end

#approval_requestsHash

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.



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

def approval_requests
    @properties['approval_requests']
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:



272
273
274
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 272

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:



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

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.



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

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



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

def inspect
    "<Twilio.Content.V1.ContentAndApprovalsInstance>"
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.



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

def language
    @properties['language']
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.



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

def sid
    @properties['sid']
end

#to_sObject

Provide a user friendly representation



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

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

#typesHash

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

Returns:



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

def types
    @properties['types']
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".



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

def variables
    @properties['variables']
end