Sha256: 190455fac5dba57f8bf54377473506ae0a4ffd35a463eb403941809e0c349f54

Contents?: true

Size: 414 Bytes

Versions: 6

Compression:

Stored size: 414 Bytes

Contents

module Sappy
  module Responses
    class AccountInfo < Response
      attr_reader :available_monitors, :setup_monitors, :sms_alerts

      def success(hash)
        accountinfo = hash["accountinfo"].first
        @available_monitors = accountinfo["availablemonitors"].to_i
        @setup_monitors = accountinfo["setupmonitors"].to_i
        @sms_alerts = accountinfo["smsalerts"].to_i
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
abcde-sappy-0.1.0 lib/sappy/responses/account_info.rb
abcde-sappy-0.1.1 lib/sappy/responses/account_info.rb
sappy-0.1.4 lib/sappy/responses/account_info.rb
sappy-0.1.3 lib/sappy/responses/account_info.rb
sappy-0.1.2 lib/sappy/responses/account_info.rb
sappy-0.1.1 lib/sappy/responses/account_info.rb