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,
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.



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

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

Instance Attribute Details

#bid_amount ⇒ Object

Parameters:

  • : (name) —

    [String] Name of the template.

  • : (category) —

    [String] A WhatsApp recognized template category.

  • : (send_ttl_seconds) —

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

  • : (bid_amount) —

    [String] Maximum price per 1,000 message deliveries, expressed in the WABA currency's smallest unit (cents for USD). Only valid for MARKETING templates onboarded to Max Pricing.



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

def bid_amount
  @bid_amount
end

#category ⇒ Object

Parameters:

  • : (name) —

    [String] Name of the template.

  • : (category) —

    [String] A WhatsApp recognized template category.

  • : (send_ttl_seconds) —

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

  • : (bid_amount) —

    [String] Maximum price per 1,000 message deliveries, expressed in the WABA currency's smallest unit (cents for USD). Only valid for MARKETING templates onboarded to Max Pricing.



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

def category
  @category
end

#name ⇒ Object

Parameters:

  • : (name) —

    [String] Name of the template.

  • : (category) —

    [String] A WhatsApp recognized template category.

  • : (send_ttl_seconds) —

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

  • : (bid_amount) —

    [String] Maximum price per 1,000 message deliveries, expressed in the WABA currency's smallest unit (cents for USD). Only valid for MARKETING templates onboarded to Max Pricing.



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

def name
  @name
end

#send_ttl_seconds ⇒ Object

Parameters:

  • : (name) —

    [String] Name of the template.

  • : (category) —

    [String] A WhatsApp recognized template category.

  • : (send_ttl_seconds) —

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

  • : (bid_amount) —

    [String] Maximum price per 1,000 message deliveries, expressed in the WABA currency's smallest unit (cents for USD). Only valid for MARKETING templates onboarded to Max Pricing.



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

def send_ttl_seconds
  @send_ttl_seconds
end

Instance Method Details

#to_json(options = {}) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/twilio-ruby/rest/content/v1/content/approval_create.rb', line 36

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