Class: MasterCard::API::Qkr::Card
- Inherits:
-
Core::Model::BaseObject
- Object
- Core::Model::BaseObject
- MasterCard::API::Qkr::Card
- Includes:
- Core::Model
- Defined in:
- lib/mastercard/api/qkr/card.rb
Class Method Summary collapse
- .create(mapObj) ⇒ Object
- .deleteById(id, map = nil) ⇒ Object
- .query(criteria) ⇒ Object
- .read(id, criteria = nil) ⇒ Object
Instance Method Summary collapse
Class Method Details
.create(mapObj) ⇒ Object
64 65 66 67 68 69 70 71 72 |
# File 'lib/mastercard/api/qkr/card.rb', line 64 def self.create(mapObj) # #Creates object of type Card # #@param Dict mapObj, containing the required parameters to create a new object #@return [Card] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("97081133-3da3-412a-8f0e-a1adab5ca065", Card.new(mapObj)) end |
.deleteById(id, map = nil) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/mastercard/api/qkr/card.rb', line 83 def self.deleteById(id, map = nil) #Delete object of type Card by id #@param [String] id #@param [Dict] map, containing additional parameters #@return [Card] of the response of the deleted instance. #@raise [APIException] an exception from the response status mapObj = Card.new if !(id.nil? || id.to_s.empty?) mapObj.set("id", id) end if !map.nil? if map.instance_of? RequestMap mapObj.setAll(map.getObject()) else mapObj.setAll(map) end end return self.execute("b813d4ec-c0f3-4b3c-8bc4-dd133e45d482", mapObj) end |
.query(criteria) ⇒ Object
128 129 130 131 132 133 134 135 136 137 |
# File 'lib/mastercard/api/qkr/card.rb', line 128 def self.query(criteria) # #Query objects of type Card by id and optional criteria #@param [Dict] criteria #@return [Card] object representing the response. #@raise [APIException] an exception from the response status # return self.execute("b689bbe1-4277-49f5-89aa-3949ede2a460",Card.new(criteria)) end |
.read(id, criteria = nil) ⇒ Object
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/mastercard/api/qkr/card.rb', line 144 def self.read(id, criteria = nil) # #Returns objects of type Card by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Card] object representing the response #@raise [APIException] an exception from the response status mapObj = Card.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("3554909c-c21a-47d0-9bc6-8ace36bb89c2",Card.new(mapObj)) end |
Instance Method Details
#delete ⇒ Object
108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/mastercard/api/qkr/card.rb', line 108 def delete # #Delete object of type Card #@param [String] id #@return [Card] of the response of the deleted instance. #@raise [APIException] an exception from the response status # return self.class.execute("b813d4ec-c0f3-4b3c-8bc4-dd133e45d482", self) end |
#update ⇒ Object
170 171 172 173 174 175 176 177 178 |
# File 'lib/mastercard/api/qkr/card.rb', line 170 def update # #Updates an object of type Card # #@return [Card] object representing the response. #@raise [APIException] an exception from the response status # return self.class.execute("481f8d8a-1dbf-4d40-a515-8da72a558726",self) end |