class Mpayer::MpayerSms
Public Class Methods
new(user_no, token)
click to toggle source
# File lib/mpayer/mpayer_sms.rb, line 9 def initialize(user_no, token) @user_no = user_no @token = token @auth = WSSE::header(@user_no, @token) @header = {'Content-Type'=> 'application/json', 'Accept' => 'application/json', 'X-WSSE' => "#{@auth}" } end
Public Instance Methods
send_message(json_msg)
click to toggle source
# File lib/mpayer/mpayer_sms.rb, line 16 def send_message(json_msg) @send_message_link = "#{@@base_uri}/messages" HTTParty.post(@send_message_link.to_str, body: json_msg.to_json, headers: @header) end