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("2ad250b8-15df-42ca-905a-5c7142bfaa20",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("7676927d-9a1a-4517-963d-4290b4fead4c",Merchant.new(mapObj))
end