Class: MasterCard::API::Crossborder::RetrievePayment

Inherits:
Core::Model::BaseObject
  • Object
show all
Includes:
Core::Model
Defined in:
lib/mastercard/api/crossborder/retrievepayment.rb

Class Method Summary collapse

Class Method Details

.readByID(id, criteria = nil) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/mastercard/api/crossborder/retrievepayment.rb', line 65

def self.readByID(id, criteria = nil)
    #
    #Returns objects of type RetrievePayment by id and optional criteria
    #@param [String] id
    #@param [Dict] criteria
    #@return [RetrievePayment] object representing the response
    #@raise [APIException] an exception from the response status

    mapObj = RetrievePayment.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("ef5c034c-aeff-491b-b48d-12eeadccd94d",RetrievePayment.new(mapObj))
end

.readByReference(criteria) ⇒ Object



95
96
97
98
99
100
101
102
103
104
# File 'lib/mastercard/api/crossborder/retrievepayment.rb', line 95

def self.readByReference(criteria)
    #
    #Query objects of type RetrievePayment by id and optional criteria
    #@param [Dict] criteria
    #@return [RetrievePayment] object representing the response.
    #@raise [APIException] an exception from the response status
    #

    return self.execute("51d95fcb-34c8-405d-b294-09fa07e2d9de",RetrievePayment.new(criteria))
end