module Twizo::Widget
Attributes
params[R]
Getter for params
Public Instance Methods
send()
click to toggle source
Send message to the server and return response
@return [Object]
# File lib/twizo/modules/widget.rb, line 39 def send post_params = @params.to_json response = send_api_call(Entity::ACTION_CREATE, location, post_params) raise response if response.kind_of?(TwizoError) response_to_array(response) end
set(recipient)
click to toggle source
@param [String] recipient
# File lib/twizo/modules/widget.rb, line 26 def set(recipient) @params = WidgetParams.new @params.recipient = recipient # set default allowed_types @params.allowed_types ||= %w(sms call) end
Private Instance Methods
location()
click to toggle source
@return [String]
# File lib/twizo/modules/widget.rb, line 53 def location 'widget/session' end