class MasterCard::API::Spendalerts::Channel

Public Class Methods

create(mapObj) click to toggle source
# File lib/mastercard/api/spendalerts/channel.rb, line 122
def self.create(mapObj)
        #
        #Creates object of type Channel
        #
        #@param Dict mapObj, containing the required parameters to create a new object
        #@return [Channel] of the response of created instance.
        #@raise [APIException] an exception from the response status
        return self.execute("3d421b09-bc89-48c9-973e-85e6f806caec", Channel.new(mapObj))
end
deleteById(id, map = nil) click to toggle source
# File lib/mastercard/api/spendalerts/channel.rb, line 65
def self.deleteById(id, map = nil)
        #Delete object of type Channel by id

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


        mapObj = Channel.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("50145155-4931-4083-955b-81020478d7c6", mapObj)
end
query(criteria) click to toggle source
# File lib/mastercard/api/spendalerts/channel.rb, line 110
def self.query(criteria)
        #
        #Query objects of type Channel by id and optional criteria
        #@param [Dict] criteria
        #@return [Channel] object representing the response.
        #@raise [APIException] an exception from the response status
        #

        return self.execute("6ae66fd1-53a5-40c7-8487-5aa957d6a4ca",Channel.new(criteria))
end

Protected Class Methods

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

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

        return self.class.execute("50145155-4931-4083-955b-81020478d7c6", self)
end