Class: Twilio::REST::Content::V1::ContentContext::ApprovalCreateList::ContentApprovalRequest

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ ContentApprovalRequest

Returns a new instance of ContentApprovalRequest.



28
29
30
31
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 28

def initialize(payload)
        @name = payload["name"]
        @category = payload["category"]
end

Instance Attribute Details

#categoryObject

Parameters:

  • : (name)
    String

    Name of the template.

  • : (category)
    String

    A WhatsApp recognized template category.



27
28
29
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 27

def category
  @category
end

#nameObject

Parameters:

  • : (name)
    String

    Name of the template.

  • : (category)
    String

    A WhatsApp recognized template category.



27
28
29
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 27

def name
  @name
end

Instance Method Details

#to_json(options = {}) ⇒ Object



32
33
34
35
36
37
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 32

def to_json(options = {})
{
        "name": @name,
        "category": @category,
}.to_json(options)
end