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

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/content/v1/content_and_approvals.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) ⇒ ContentAndApprovalsInstance

Initialize the ContentAndApprovalsInstance

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



191
192
193
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 191

def 
  @properties['account_sid']
end

#approval_requestsHash

Returns The approval status of the Content resource.

Returns:

  • (Hash)

    The approval status of the Content resource.



221
222
223
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 221

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



173
174
175
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 173

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



179
180
181
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 179

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



197
198
199
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 197

def friendly_name
  @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



233
234
235
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 233

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



203
204
205
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 203

def language
  @properties['language']
end

#sidString

Returns The unique string that identifies the resource.

Returns:

  • (String)

    The unique string that identifies the resource



185
186
187
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 185

def sid
  @properties['sid']
end

#to_sObject

Provide a user friendly representation



227
228
229
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 227

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



215
216
217
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 215

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



209
210
211
# File 'lib/twilio-ruby/rest/content/v1/content_and_approvals.rb', line 209

def variables
  @properties['variables']
end