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.



209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 209

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'],
    }
end

Instance Method Details

#allow_category_changeBoolean

Returns:

  • (Boolean)


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

def allow_category_change
    @properties['allow_category_change']
end

#categoryString

Returns:

  • (String)


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

def category
    @properties['category']
end

#content_typeString

Returns:

  • (String)


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

def content_type
    @properties['content_type']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#nameString

Returns:

  • (String)


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

def name
    @properties['name']
end

#rejection_reasonString

Returns:

  • (String)


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

def rejection_reason
    @properties['rejection_reason']
end

#statusString

Returns:

  • (String)


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

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



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

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