Class: MasterCard::API::Disbursements::Disbursement
- Inherits:
-
Core::Model::BaseObject
- Object
- Core::Model::BaseObject
- MasterCard::API::Disbursements::Disbursement
- Includes:
- Core::Model
- Defined in:
- lib/mastercard/api/disbursements/disbursement.rb
Class Method Summary collapse
Class Method Details
.create(mapObj) ⇒ Object
108 109 110 111 112 113 114 115 116 |
# 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) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# 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) ⇒ Object
96 97 98 99 100 101 102 103 104 105 |
# 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 |