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("cb5be22f-cd94-4c35-9d1f-15ed9bd57742",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("19f56957-43e4-4569-a116-b770cbce6d20",RetrievePayment.new(criteria))
end