class Skuby::Gateway

Public Class Methods

build_params(text, recipients, custom_params) click to toggle source
# File lib/skuby/gateway.rb, line 11
def self.build_params(text, recipients, custom_params)
  if custom_params && custom_params.is_a?(Hash)
    custom_params.merge('text' => text, 'recipients[]' => recipients)
  else
    Skuby.config.to_hash.merge('text' => text, 'recipients[]' => recipients)
  end
end
send_sms(text = '', recipients = '', custom_params = nil) click to toggle source
# File lib/skuby/gateway.rb, line 6
def self.send_sms(text = '', recipients = '', custom_params = nil)
  params = build_params(text, recipients, custom_params)
  SMSResponse.new(post('', body: params, verify: false), text, recipients)
end