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.



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 153

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_change ⇒ Boolean

Returns:

  • (Boolean)


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

def allow_category_change
    @properties['allow_category_change']
end

#category ⇒ String

Returns:

  • (String)


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

def category
    @properties['category']
end

#content_type ⇒ String

Returns:

  • (String)


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

def content_type
    @properties['content_type']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



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

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

#name ⇒ String

Returns:

  • (String)


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

def name
    @properties['name']
end

#rejection_reason ⇒ String

Returns:

  • (String)


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

def rejection_reason
    @properties['rejection_reason']
end

#send_ttl_seconds ⇒ String

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



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

def send_ttl_seconds
    @properties['send_ttl_seconds']
end

#status ⇒ String

Returns:

  • (String)


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

def status
    @properties['status']
end

#to_s ⇒ Object

Provide a user friendly representation



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

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