Class: Twilio::REST::Content::V1::ContentContext::ApprovalCreateInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, content_sid: nil) ⇒ ApprovalCreateInstance

Initialize the ApprovalCreateInstance

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 ApprovalCreate resource.

  • sid (String)

    The SID of the Call resource to fetch.



212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 212

def initialize(version, payload , content_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'name' => payload['name'],
        'category' => payload['category'],
        'content_type' => payload['content_type'],
        'status' => payload['status'],
        'rejection_reason' => payload['rejection_reason'],
        'allow_category_change' => payload['allow_category_change'],
        'send_ttl_seconds' => payload['send_ttl_seconds'],
    }
end

Instance Method Details

#allow_category_changeBoolean

Returns:

  • (Boolean)


261
262
263
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 261

def allow_category_change
    @properties['allow_category_change']
end

#categoryString

Returns:

  • (String)


237
238
239
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 237

def category
    @properties['category']
end

#content_typeString

Returns:

  • (String)


243
244
245
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 243

def content_type
    @properties['content_type']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#nameString

Returns:

  • (String)


231
232
233
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 231

def name
    @properties['name']
end

#rejection_reasonString

Returns:

  • (String)


255
256
257
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 255

def rejection_reason
    @properties['rejection_reason']
end

#send_ttl_secondsString

Returns Time-to-live in seconds for attempting to send a message with this Content.

Returns:

  • (String)

    Time-to-live in seconds for attempting to send a message with this Content



267
268
269
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 267

def send_ttl_seconds
    @properties['send_ttl_seconds']
end

#statusString

Returns:

  • (String)


249
250
251
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 249

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



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

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