Sha256: e801324787a86b9668975823dc1347df2a46304d9c160b83e012e8bb59a35eb1

Contents?: true

Size: 471 Bytes

Versions: 1

Compression:

Stored size: 471 Bytes

Contents

module SmsPortal
  class Message
    include HTTParty
    base_uri "http://www.mymobileapi.com"

    def initialize(number, message)
      @options = {
        query: {
          numto:     number,
          data1:     message,
          type:     'sendparam',
          username:  ENV['SMS_PORTAL_USERNAME'],
          password:  ENV['SMS_PORTAL_PASSWORD']
        }
      }
    end

    def deliver!
      self.class.get('/api5/http5.aspx', @options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sms_portal-0.0.1 lib/sms_portal/message.rb