Class: MasterCard::API::Qkr::Merchant

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

Class Method Summary collapse

Class Method Details

.query(criteria) ⇒ Object



66
67
68
69
70
71
72
73
74
75
# File 'lib/mastercard/api/qkr/merchant.rb', line 66

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

    return self.execute("1c6fd078-8352-4868-a966-6c9d2bd5d177",Merchant.new(criteria))
end

.read(id, criteria = nil) ⇒ Object



82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'lib/mastercard/api/qkr/merchant.rb', line 82

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

    mapObj = Merchant.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("2c0311a9-6022-413c-8cd4-7bb50a8d0f85",Merchant.new(mapObj))
end