Sha256: 80dfae8dabc8e1e80861b0e82ab15e021d57ec98675d41203766f7e4b18903cc

Contents?: true

Size: 445 Bytes

Versions: 3

Compression:

Stored size: 445 Bytes

Contents

module Skuby
  class Gateway
    include HTTParty
    base_uri 'https://gateway.skebby.it/api/send/smseasy/advanced/http.php'

    def self.send_sms(text = '', recipients = '')
      params = build_params(text, recipients)
      SMSResponse.new(self.post('', body: params), text, recipients)
    end

    def self.build_params(text, recipients)
      Skuby.config.to_hash.merge({'text' => text, 'recipients[]' => recipients})
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
skuby-0.0.5 lib/skuby/gateway.rb
skuby-0.0.4 lib/skuby/gateway.rb
skuby-0.0.3 lib/skuby/gateway.rb