Class: MasterCard::API::BlockchainB2bxb::Batches

Inherits:
Core::Model::BaseObject
  • Object
show all
Includes:
Core::Model
Defined in:
lib/mastercard/api/blockchainb2bxb/batches.rb

Class Method Summary collapse

Class Method Details

.read(id, criteria = nil) ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# File 'lib/mastercard/api/blockchainb2bxb/batches.rb', line 64

def self.read(id, criteria = nil)
	#
	#Returns objects of type Batches by id and optional criteria
	#@param [String] id
	#@param [Dict] criteria
	#@return [Batches] object representing the response
	#@raise [APIException] an exception from the response status

	mapObj = Batches.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("a668fb01-11ad-4e31-b067-8cd6df541905",Batches.new(mapObj))
end