class MasterCard::API::Blockchain::Node

Public Class Methods

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

    return self.execute("66f36b7d-526f-4276-9e3a-f7f4bb0e5d99",Node.new(criteria))
end
read(id, criteria = nil) click to toggle source
# File lib/mastercard/api/blockchain/node.rb, line 65
def self.read(id, criteria = nil)
    #
    #Returns objects of type Node by id and optional criteria
    #@param [String] id
    #@param [Dict] criteria
    #@return [Node] object representing the response
    #@raise [APIException] an exception from the response status

    mapObj = Node.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("d2676155-1d17-447c-a74e-3be8eea961eb",Node.new(mapObj))
end

Protected Class Methods

getOperationConfig(operationUUID) click to toggle source
# File lib/mastercard/api/blockchain/node.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/blockchain/node.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