class MasterCard::API::StpApiSdk::Payment

Public Class Methods

query(criteria) click to toggle source
# File lib/mastercard/api/stpapisdk/payment.rb, line 95
def self.query(criteria)
        #
        #Query objects of type Payment by id and optional criteria
        #@param [Dict] criteria
        #@return [Payment] object representing the response.
        #@raise [APIException] an exception from the response status
        #

        return self.execute("a110060f-8fca-4a79-bdee-4770c966e423",Payment.new(criteria))
end
read(id, criteria = nil) click to toggle source
# File lib/mastercard/api/stpapisdk/payment.rb, line 65
def self.read(id, criteria = nil)
        #
        #Returns objects of type Payment by id and optional criteria
        #@param [String] id
        #@param [Dict] criteria
        #@return [Payment] object representing the response
        #@raise [APIException] an exception from the response status

        mapObj = Payment.new
        if !(id.nil? || id.to_s.empty?)
          mapObj.set("id", id)
        end
        if !criteria.nil?
                if criteria.instance_of? RequestMap
                  mapObj.setAll(criteria.getObject())
                else
                  mapObj.setAll(criteria)
                end
        end

        return self.execute("72aba162-a8b4-4f62-902a-62d155831da4",Payment.new(mapObj))
end

Protected Class Methods

getOperationConfig(operationUUID) click to toggle source
# File lib/mastercard/api/stpapisdk/payment.rb, line 47
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/stpapisdk/payment.rb, line 54
def self.getOperationMetadata()
        return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride())
end