Class: MasterCard::API::Qkr::ExternalTrans

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

Class Method Summary collapse

Class Method Details

.create(mapObj) ⇒ Object



62
63
64
65
66
67
68
69
70
# File 'lib/mastercard/api/qkr/externaltrans.rb', line 62

def self.create(mapObj)
	#
	#Creates object of type ExternalTrans
	#
	#@param Dict mapObj, containing the required parameters to create a new object
	#@return [ExternalTrans] of the response of created instance.
	#@raise [APIException] an exception from the response status
	return self.execute("b8c6be19-3b49-461e-82f7-fa65f9c2cc9f", ExternalTrans.new(mapObj))
end

.query(criteria) ⇒ Object



83
84
85
86
87
88
89
90
91
92
# File 'lib/mastercard/api/qkr/externaltrans.rb', line 83

def self.query(criteria)
	#
	#Query objects of type ExternalTrans by id and optional criteria
	#@param [Dict] criteria
	#@return [ExternalTrans] object representing the response.
	#@raise [APIException] an exception from the response status
	#

	return self.execute("27c0dc15-b295-4fc7-8a34-d42c9d840936",ExternalTrans.new(criteria))
end

.read(id, criteria = nil) ⇒ Object



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/mastercard/api/qkr/externaltrans.rb', line 99

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

	mapObj = ExternalTrans.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("50e2ce57-da9a-4406-aceb-e7f38593f251",ExternalTrans.new(mapObj))
end