class MasterCard::API::Spendcontrols::Batch
Public Class Methods
create(mapObj)
click to toggle source
# File lib/mastercard/api/spendcontrols/batch.rb, line 61 def self.create(mapObj) # #Creates object of type Batch # #@param Dict mapObj, containing the required parameters to create a new object #@return [Batch] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("59460de1-9c35-4de0-bfec-83d22aa181c9", Batch.new(mapObj)) end
read(id, criteria = nil)
click to toggle source
# File lib/mastercard/api/spendcontrols/batch.rb, line 81 def self.read(id, criteria = nil) # #Returns objects of type Batch by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Batch] object representing the response #@raise [APIException] an exception from the response status mapObj = Batch.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("e8c5c08f-1ea8-41e0-b65a-b2828f9c4d7c",Batch.new(mapObj)) end
Protected Class Methods
getOperationConfig(operationUUID)
click to toggle source
# File lib/mastercard/api/spendcontrols/batch.rb, line 47 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/batch.rb, line 54 def self.getOperationMetadata() return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride()) end