class Plivo::Interactive

Attributes

action[RW]
body[RW]
header[RW]
type[RW]

Public Class Methods

new(type: nil, header: nil, body: nil, footer: nil, action: nil) click to toggle source
# File lib/plivo/interactive.rb, line 7
def initialize(type: nil, header: nil, body: nil, footer: nil, action: nil)
  @type = type
  @header = header
  @body = body
  @footer = footer
  @action = action
end

Public Instance Methods

to_hash() click to toggle source
# File lib/plivo/interactive.rb, line 15
def to_hash
  {
    type: @type,
    header: @header&.to_hash,
    body: @body&.to_hash,
    footer: @footer&.to_hash,
    action: @action&.to_hash
  }.reject { |_, v| v.nil? }
end