class MasterCard::API::Spendcontrols::Card
Public Class Methods
create(mapObj)
click to toggle source
# File lib/mastercard/api/spendcontrols/card.rb, line 64 def self.create(mapObj) # #Creates object of type Card # #@param Dict mapObj, containing the required parameters to create a new object #@return [Card] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("100b2b84-4ee1-4e22-9927-7baad788eb36", Card.new(mapObj)) end
deleteById(id, map = nil)
click to toggle source
# File lib/mastercard/api/spendcontrols/card.rb, line 128 def self.deleteById(id, map = nil) #Delete object of type Card by id #@param [String] id #@param [Dict] map, containing additional parameters #@return [Card] of the response of the deleted instance. #@raise [APIException] an exception from the response status mapObj = Card.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("2ee8dec7-7a7e-4533-aa73-80d716f8aaba", mapObj) end
read(mapObj)
click to toggle source
# File lib/mastercard/api/spendcontrols/card.rb, line 109 def self.read(mapObj) # #Creates object of type Card # #@param Dict mapObj, containing the required parameters to create a new object #@return [Card] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("7b2f5fb5-3b8c-4dcb-b18f-108e0953e090", Card.new(mapObj)) end
retrievePan(id, criteria = nil)
click to toggle source
# File lib/mastercard/api/spendcontrols/card.rb, line 84 def self.retrievePan(id, criteria = nil) # #Returns objects of type Card by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Card] object representing the response #@raise [APIException] an exception from the response status mapObj = Card.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("0d453728-973c-486b-86d9-0b08386725ba",Card.new(mapObj)) end
update(mapObj)
click to toggle source
# File lib/mastercard/api/spendcontrols/card.rb, line 168 def self.update(mapObj) # #Creates object of type Card # #@param Dict mapObj, containing the required parameters to create a new object #@return [Card] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("92dccd41-bec2-45ee-a449-93d0230796b8", Card.new(mapObj)) end
Protected Class Methods
getOperationConfig(operationUUID)
click to toggle source
# File lib/mastercard/api/spendcontrols/card.rb, line 50 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/spendcontrols/card.rb, line 57 def self.getOperationMetadata() return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride()) end
Public Instance Methods
delete()
click to toggle source
# File lib/mastercard/api/spendcontrols/card.rb, line 153 def delete # #Delete object of type Card #@param [String] id #@return [Card] of the response of the deleted instance. #@raise [APIException] an exception from the response status # return self.class.execute("2ee8dec7-7a7e-4533-aa73-80d716f8aaba", self) end