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("54abc7c8-0e2d-4881-afa1-4f793555621d",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("ea5078cf-ff60-4383-b80b-95edc20a3601",Country.new(mapObj))
end