class MasterCard::API::Spendcontrols::Merchantcategorycodealert

Public Class Methods

create(mapObj) click to toggle source
# File lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb, line 122
def self.create(mapObj)
        #
        #Creates object of type Merchantcategorycodealert
        #
        #@param Dict mapObj, containing the required parameters to create a new object
        #@return [Merchantcategorycodealert] of the response of created instance.
        #@raise [APIException] an exception from the response status
        return self.execute("34297af6-1b81-441e-8da1-07f37ae2d647", Merchantcategorycodealert.new(mapObj))
end
deleteById(id, map = nil) click to toggle source
# File lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb, line 65
def self.deleteById(id, map = nil)
        #Delete object of type Merchantcategorycodealert by id

        #@param [String] id
        #@param [Dict] map, containing additional parameters
        #@return [Merchantcategorycodealert] of the response of the deleted instance.
        #@raise [APIException] an exception from the response status


        mapObj = Merchantcategorycodealert.new
        if !(id.nil? || id.to_s.empty?)
          mapObj.set("id", id)
        end
        if !map.nil?
                if map.instance_of? RequestMap
                  mapObj.setAll(map.getObject())
                else
                  mapObj.setAll(map)
                end
        end

        return self.execute("48ca7fcf-6d5b-488a-8c6b-4b8893c3a822", mapObj)
end
query(criteria) click to toggle source
# File lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb, line 110
def self.query(criteria)
        #
        #Query objects of type Merchantcategorycodealert by id and optional criteria
        #@param [Dict] criteria
        #@return [Merchantcategorycodealert] object representing the response.
        #@raise [APIException] an exception from the response status
        #

        return self.execute("69aee9f4-ff1b-45ce-ab19-10ca8f072da3",Merchantcategorycodealert.new(criteria))
end

Protected Class Methods

getOperationConfig(operationUUID) click to toggle source
# File lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb, line 48
def self.getOperationConfig(operationUUID)
        if @__store.key?(operationUUID)
                return @__store[operationUUID]
        end
        raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID)
end
getOperationMetadata() click to toggle source
# File lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb, line 55
def self.getOperationMetadata()
        return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
end

Public Instance Methods

delete() click to toggle source
# File lib/mastercard/api/spendcontrols/merchantcategorycodealert.rb, line 90
def delete
        #
        #Delete object of type Merchantcategorycodealert

        #@param [String] id
        #@return [Merchantcategorycodealert] of the response of the deleted instance.
        #@raise [APIException] an exception from the response status
        #

        return self.class.execute("48ca7fcf-6d5b-488a-8c6b-4b8893c3a822", self)
end