Sha256: 830ca103dc7a7a66a565583fbafaf5e660eede23f4a45e7873ec40a8ee0c15a1

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 KB

Contents

require 'App42Response.rb'

module App42
  module AppTab
    #
    # An enum that contains the months to be mentioned in the Bill.
    #
    class DiscountType < App42Response
      unless (const_defined?(:PACKAGETYPE))
        PACKAGETYPE = "PACKAGETYPE"
      end
      unless (const_defined?(:STORAGETYPE))
        STORAGETYPE = "STORAGETYPE"
      end
      unless (const_defined?(:BANDWIDTHTYPE))
        BANDWIDTHTYPE = "BANDWIDTHTYPE"
      end
      unless (const_defined?(:FEATURETYPE))
        FEATURETYPE = "FEATURETYPE"
      end

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

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

      def isAvailable(string)
        if(string == "PACKAGETYPE")
          return "PACKAGETYPE"
        elsif(string == "STORAGETYPE")
          return "STORAGETYPE"
        elsif(string == "BANDWIDTHTYPE")
          return "BANDWIDTHTYPE"
        elsif(string == "FEATURETYPE")
          return "FEATURETYPE";
        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/DiscountType.rb