class MasterCard::API::Spendalerts::Amount

Public Class Methods

create(mapObj) click to toggle source
# File lib/mastercard/api/spendalerts/amount.rb, line 122
def self.create(mapObj)
        #
        #Creates object of type Amount
        #
        #@param Dict mapObj, containing the required parameters to create a new object
        #@return [Amount] of the response of created instance.
        #@raise [APIException] an exception from the response status
        return self.execute("0ec5559c-ba8d-4aa8-8777-f9dfdf60f4e7", Amount.new(mapObj))
end
deleteById(id, map = nil) click to toggle source
# File lib/mastercard/api/spendalerts/amount.rb, line 65
def self.deleteById(id, map = nil)
        #Delete object of type Amount by id

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


        mapObj = Amount.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("818c7af3-237c-4e5a-9f6d-1201743b9ca3", mapObj)
end
query(criteria) click to toggle source
# File lib/mastercard/api/spendalerts/amount.rb, line 110
def self.query(criteria)
        #
        #Query objects of type Amount by id and optional criteria
        #@param [Dict] criteria
        #@return [Amount] object representing the response.
        #@raise [APIException] an exception from the response status
        #

        return self.execute("8e1e4676-d0b7-4309-afa9-bcb18bed7950",Amount.new(criteria))
end

Protected Class Methods

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

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

        return self.class.execute("818c7af3-237c-4e5a-9f6d-1201743b9ca3", self)
end