Sha256: 9d6a85db21e0e0f7da447c9927c481314f5ce05c424aecb6c601927b1468bfb4

Contents?: true

Size: 995 Bytes

Versions: 1

Compression:

Stored size: 995 Bytes

Contents

require 'App42Response.rb'

module App42
  module AppTab
    #
    # An enum that contains the Time Unit to be mentioned in the Bill.
    #
    class TimeUnit < App42Response
      unless (const_defined?(:SECONDS))
        SECONDS = "SECONDS"
      end
      unless (const_defined?(:MINUTES))
        MINUTES = "MINUTES"
      end
      unless (const_defined?(:HOURS))
        HOURS = "HOURS"
      end

      #
      # Sets the value of the TimeUnit.
      #
      # @param string
      #      - the string of TimeUnit
      #
      def enum(string)
        return TimeUnit.const_get(string)
      end

      #
      # Returns the value of the TimeUnit.
      #
      # @return the value of TimeUnit.
      #

      def isAvailable(string)
        if(string == "SECONDS")
          return "SECONDS"
        elsif(string == "MINUTES")
          return "MINUTES"
        elsif(string == "HOURS")
          return "HOURS";
        else
          return nil
        end
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
App42_RUBY_SDK-0.8.3 lib/appTab/TimeUnit.rb