class MasterCard::API::Spendcontrols::Channel

Public Class Methods

create(mapObj) click to toggle source
# File lib/mastercard/api/spendcontrols/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("9339799c-f25d-4da6-b138-bfcccde6a521", Channel.new(mapObj))
end
deleteById(id, map = nil) click to toggle source
# File lib/mastercard/api/spendcontrols/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("d06f1b1a-a494-4d55-bdbe-26cfbc803108", mapObj)
end
query(criteria) click to toggle source
# File lib/mastercard/api/spendcontrols/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("23f7599a-3a5d-4dbc-b9f4-698501d3e958",Channel.new(criteria))
end

Protected Class Methods

getOperationConfig(operationUUID) click to toggle source
# File lib/mastercard/api/spendcontrols/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/spendcontrols/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/spendcontrols/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("d06f1b1a-a494-4d55-bdbe-26cfbc803108", self)
end