class MasterCard::API::Spendalerts::ResourceConfig

Public Class Methods

instance() click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 51
def self.instance
        return @@instance
end

Private Class Methods

new() click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 39
def initialize
        @override = nil
        @host = nil
        @context = nil

        Config.registerResourceConfig(self)
        currentEnvironment = Config.getEnvironment()
        self.setEnvironment(currentEnvironment)

end

Public Instance Methods

getContentTypeOverride() click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 81
def getContentTypeOverride
        return nil
end
getContext() click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 69
def getContext
        return @context
end
getHost() click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 61
def getHost
        unless @override.nil? || @override == 0
                return @override
        else
                return @host
        end
end
getJsonNative() click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 77
def getJsonNative
        return false
end
getName() click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 56
def getName
        return "spendalerts"
end
getVersion() click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 73
def getVersion
        return "spendalerts:1.0.5"
end
setCustomEnvironment(host,context) click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 93
def setCustomEnvironment(host,context)
        @host = host
        @context = context
end
setEnvironment(environmet) click to toggle source
# File lib/mastercard/api/spendalerts/resourceconfig.rb, line 85
def setEnvironment(environmet)
        if Environment::MAPPING.key?(environmet)
                tuple = Environment::MAPPING[environmet]
                @host = tuple[0]
                @context = tuple[1]
        end
end