class MasterCard::API::Spendalerts::Declines

Public Class Methods

create(mapObj) click to toggle source
# File lib/mastercard/api/spendalerts/declines.rb, line 122
def self.create(mapObj)
        #
        #Creates object of type Declines
        #
        #@param Dict mapObj, containing the required parameters to create a new object
        #@return [Declines] of the response of created instance.
        #@raise [APIException] an exception from the response status
        return self.execute("a80f5332-dac3-4e69-b781-58cdb66a3f8e", Declines.new(mapObj))
end
deleteById(id, map = nil) click to toggle source
# File lib/mastercard/api/spendalerts/declines.rb, line 65
def self.deleteById(id, map = nil)
        #Delete object of type Declines by id

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


        mapObj = Declines.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("be4609a8-8457-4f7b-b16a-99977946a103", mapObj)
end
query(criteria) click to toggle source
# File lib/mastercard/api/spendalerts/declines.rb, line 110
def self.query(criteria)
        #
        #Query objects of type Declines by id and optional criteria
        #@param [Dict] criteria
        #@return [Declines] object representing the response.
        #@raise [APIException] an exception from the response status
        #

        return self.execute("2e760936-8f97-4739-96f8-59209f1d8cf0",Declines.new(criteria))
end

Protected Class Methods

getOperationConfig(operationUUID) click to toggle source
# File lib/mastercard/api/spendalerts/declines.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/spendalerts/declines.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/spendalerts/declines.rb, line 90
def delete
        #
        #Delete object of type Declines

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

        return self.class.execute("be4609a8-8457-4f7b-b16a-99977946a103", self)
end