require 'App42Response.rb' module App42 module AppTab # # An enum that contains the Storage Unit to be mentioned in the Bill. # class StorageUnit < App42Response unless (const_defined?(:KB)) KB = "KB" end unless (const_defined?(:MB)) MB = "MB" end unless (const_defined?(:GB)) GB = "GB" end unless (const_defined?(:TB)) TB = "TB" end # # Sets the value of the StorageUnit. # # @param string # - the string of StorageUnit # def enum(string) return StorageUnit.const_get(string) end # # Returns the value of the StorageUnit. # # @return the value of StorageUnit. # def isAvailable(string) if(string == "KB") return "KB" elsif(string == "MB") return "MB"; elsif(string == "GB") return "GB"; elsif(string == "TB") return "TB"; else return nil end end end end end