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