Class: MasterCard::API::Stp::Provider

Inherits:
Core::Model::BaseObject
  • Object
show all
Includes:
Core::Model
Defined in:
lib/mastercard/api/stp/provider.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/stp/provider.rb', line 64

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

	mapObj = Provider.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("fccfabaa-b989-4e83-87c4-7033025f2060",Provider.new(mapObj))
end