Class: MasterCard::API::Spendcontrols::TravelmarkeralertwithtravelId

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(mapObj) ⇒ Object



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

def self.create(mapObj)
	#
	#Creates object of type TravelmarkeralertwithtravelId
	#
	#@param Dict mapObj, containing the required parameters to create a new object
	#@return [TravelmarkeralertwithtravelId] of the response of created instance.
	#@raise [APIException] an exception from the response status
	return self.execute("f69bb085-ba4b-4cc0-8de2-4efd9e36aef2", TravelmarkeralertwithtravelId.new(mapObj))
end

.deleteById(id, map = nil) ⇒ Object



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/mastercard/api/spendcontrols/travelmarkeralertwithtravelid.rb', line 81

def self.deleteById(id, map = nil)
	#Delete object of type TravelmarkeralertwithtravelId by id

	#@param [String] id
	#@param [Dict] map, containing additional parameters
	#@return [TravelmarkeralertwithtravelId] of the response of the deleted instance.
	#@raise [APIException] an exception from the response status


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

	return self.execute("50437cf1-9a28-42db-91c1-c78e4ee4f36a", mapObj)
end

.read(id, criteria = nil) ⇒ Object



125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/mastercard/api/spendcontrols/travelmarkeralertwithtravelid.rb', line 125

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

	mapObj = TravelmarkeralertwithtravelId.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("6cc77a70-0771-4d5c-a818-9df213e9d574",TravelmarkeralertwithtravelId.new(mapObj))
end

Instance Method Details

#deleteObject



106
107
108
109
110
111
112
113
114
115
116
# File 'lib/mastercard/api/spendcontrols/travelmarkeralertwithtravelid.rb', line 106

def delete
	#
	#Delete object of type TravelmarkeralertwithtravelId

	#@param [String] id
	#@return [TravelmarkeralertwithtravelId] of the response of the deleted instance.
	#@raise [APIException] an exception from the response status
	#

	return self.class.execute("50437cf1-9a28-42db-91c1-c78e4ee4f36a", self)
end