Sha256: c3c1ab966ca8c54a4344297edb761e63157757681f2ef7aa60f6a87dc6986871

Contents?: true

Size: 394 Bytes

Versions: 3

Compression:

Stored size: 394 Bytes

Contents

module IqSMS
  class Response
    class Balance < Response
      def balance_hash
        @hash[:balance].first
      end

      def balance
        @balance ||= balance_hash[:balance].to_s.to_d
        @balance
      end

      def currency
        balance_hash[:type]
      end

      def credit
        @credit ||= balance_hash[:credit].to_s.to_d
        @credit
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
iqsms-0.2.2 lib/iqsms/response/balance.rb
iqsms-0.2.1 lib/iqsms/response/balance.rb
iqsms-0.2.0 lib/iqsms/response/balance.rb