class MasterCard::API::Disbursements::Disbursement
Public Class Methods
create(mapObj)
click to toggle source
# File lib/mastercard/api/disbursements/disbursement.rb, line 108 def self.create(mapObj) # #Creates object of type Disbursement # #@param Dict mapObj, containing the required parameters to create a new object #@return [Disbursement] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("f12ff652-6ede-43e6-bce5-d3f973b474dc", Disbursement.new(mapObj)) end
readByID(id, criteria = nil)
click to toggle source
# File lib/mastercard/api/disbursements/disbursement.rb, line 66 def self.readByID(id, criteria = nil) # #Returns objects of type Disbursement by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Disbursement] object representing the response #@raise [APIException] an exception from the response status mapObj = Disbursement.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("d018ef6c-ee84-488f-bec5-92bf2958ce1a",Disbursement.new(mapObj)) end
readByReference(criteria)
click to toggle source
# File lib/mastercard/api/disbursements/disbursement.rb, line 96 def self.readByReference(criteria) # #Query objects of type Disbursement by id and optional criteria #@param [Dict] criteria #@return [Disbursement] object representing the response. #@raise [APIException] an exception from the response status # return self.execute("35a14322-0aba-4976-bbd3-9652b9f77c31",Disbursement.new(criteria)) end
Protected Class Methods
getOperationConfig(operationUUID)
click to toggle source
# File lib/mastercard/api/disbursements/disbursement.rb, line 48 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/disbursements/disbursement.rb, line 55 def self.getOperationMetadata() return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride()) end