Class: MasterCard::API::Qkr::Country

Inherits:
Core::Model::BaseObject
  • Object
show all
Includes:
Core::Model
Defined in:
lib/mastercard/api/qkr/country.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/country.rb', line 66

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

  return self.execute("103fcb26-f116-4c0c-b494-4dc209806fd7",Country.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/country.rb', line 82

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

  mapObj = Country.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("da49a4b7-75b3-4e5d-953f-9e62bf1c2d08",Country.new(mapObj))
end