Sha256: e30db66af3ddb54da500736164e5c0a28e8ffa1d8b76d3f7f1d28fc884b9f69a

Contents?: true

Size: 435 Bytes

Versions: 4

Compression:

Stored size: 435 Bytes

Contents

module StatusCat
  module Checkers
    class Twilio < Base

      cattr_accessor :sid
      cattr_accessor :auth_token

      def initialize
        return if gem_missing?('twilio-ruby', defined?(::Twilio))

        @value = sid
        @status = fail_on_exception do
          twilio = ::Twilio::REST::Client.new(sid, auth_token)
          twilio.api.account.messages.list.count ? nil : 'fail'
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
status_cat-5.2.1 lib/status_cat/checkers/twilio.rb
status_cat-5.2.0 lib/status_cat/checkers/twilio.rb
status_cat-5.0.2 lib/status_cat/checkers/twilio.rb
status_cat-5.0.1 lib/status_cat/checkers/twilio.rb