class Plivo::Parameter
Attributes
currency[RW]
date_time[RW]
location[RW]
media[RW]
payload[RW]
text[RW]
type[RW]
Public Class Methods
new(type: nil, text: nil, media: nil, payload: nil, currency: nil, date_time: nil, location: nil)
click to toggle source
# File lib/plivo/template.rb, line 47 def initialize(type: nil, text: nil, media: nil, payload: nil, currency: nil, date_time: nil, location: nil) @type = type @text = text @media = media @payload = payload @currency = currency @date_time = date_time @location = location end
Public Instance Methods
to_hash()
click to toggle source
# File lib/plivo/template.rb, line 57 def to_hash { type: @type, text: @text, media: @media, payload: @payload, currency: @currency&.to_hash, date_time: @date_time&.to_hash, location: @location&.to_hash }.reject { |_, v| v.nil? } end