class MasterCard::API::Spendcontrols::Declineall

Public Class Methods

create(mapObj) click to toggle source
# File lib/mastercard/api/spendcontrols/declineall.rb, line 122
def self.create(mapObj)
        #
        #Creates object of type Declineall
        #
        #@param Dict mapObj, containing the required parameters to create a new object
        #@return [Declineall] of the response of created instance.
        #@raise [APIException] an exception from the response status
        return self.execute("2b325dc9-16ea-47f8-95d4-ef632aa5e40d", Declineall.new(mapObj))
end
deleteById(id, map = nil) click to toggle source
# File lib/mastercard/api/spendcontrols/declineall.rb, line 65
def self.deleteById(id, map = nil)
        #Delete object of type Declineall by id

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


        mapObj = Declineall.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("b4033e63-7263-4d81-a60d-7c3d9c3bffb1", mapObj)
end
query(criteria) click to toggle source
# File lib/mastercard/api/spendcontrols/declineall.rb, line 110
def self.query(criteria)
        #
        #Query objects of type Declineall by id and optional criteria
        #@param [Dict] criteria
        #@return [Declineall] object representing the response.
        #@raise [APIException] an exception from the response status
        #

        return self.execute("b12881eb-15db-455a-a983-05c5e53af3a1",Declineall.new(criteria))
end

Protected Class Methods

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

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

        return self.class.execute("b4033e63-7263-4d81-a60d-7c3d9c3bffb1", self)
end