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.



120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 120

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)


167
168
169
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 167

def allow_category_change
    @properties['allow_category_change']
end

#categoryString

Returns:

  • (String)


143
144
145
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 143

def category
    @properties['category']
end

#content_typeString

Returns:

  • (String)


149
150
151
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 149

def content_type
    @properties['content_type']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#nameString

Returns:

  • (String)


137
138
139
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 137

def name
    @properties['name']
end

#rejection_reasonString

Returns:

  • (String)


161
162
163
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 161

def rejection_reason
    @properties['rejection_reason']
end

#statusString

Returns:

  • (String)


155
156
157
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 155

def status
    @properties['status']
end

#to_sObject

Provide a user friendly representation



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

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