class MasterCard::API::Spendalerts::Card
Public Class Methods
create(mapObj)
click to toggle source
# File lib/mastercard/api/spendalerts/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("2b404797-1c49-454c-84c5-685ff356c407", Card.new(mapObj)) end
deleteById(id, map = nil)
click to toggle source
# File lib/mastercard/api/spendalerts/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("61f7941f-c48e-4190-8ccc-90873bb231d4", mapObj) end
read(mapObj)
click to toggle source
# File lib/mastercard/api/spendalerts/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("cf7c62bb-42e5-4278-8df1-353be4b73aca", Card.new(mapObj)) end
retrievePan(id, criteria = nil)
click to toggle source
# File lib/mastercard/api/spendalerts/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("b4e11c2a-076c-420f-be39-eddc8106f4bb",Card.new(mapObj)) end
update(mapObj)
click to toggle source
# File lib/mastercard/api/spendalerts/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("77b2ac15-cfc0-4b7e-8ae3-8d7ad464e691", Card.new(mapObj)) end
Protected Class Methods
getOperationConfig(operationUUID)
click to toggle source
# File lib/mastercard/api/spendalerts/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/spendalerts/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/spendalerts/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("61f7941f-c48e-4190-8ccc-90873bb231d4", self) end