Class: MasterCard::API::TravelRecommender::Consumer
- Inherits:
-
Core::Model::BaseObject
- Object
- Core::Model::BaseObject
- MasterCard::API::TravelRecommender::Consumer
- Includes:
- Core::Model
- Defined in:
- lib/mastercard/api/travelrecommender/consumer.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
63 64 65 66 67 68 69 70 71 |
# File 'lib/mastercard/api/travelrecommender/consumer.rb', line 63 def self.create(mapObj) # #Creates object of type Consumer # #@param Dict mapObj, containing the required parameters to create a new object #@return [Consumer] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("38e31285-a0dc-4034-a49a-f80bb3847789", Consumer.new(mapObj)) end |
.deleteById(id, map = nil) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/mastercard/api/travelrecommender/consumer.rb', line 82 def self.deleteById(id, map = nil) #Delete object of type Consumer by id #@param [String] id #@param [Dict] map, containing additional parameters #@return [Consumer] of the response of the deleted instance. #@raise [APIException] an exception from the response status mapObj = Consumer.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("688bd6d0-4653-42ab-be19-bf5b2a24df26", mapObj) end |
.query(criteria) ⇒ Object
156 157 158 159 160 161 162 163 164 165 |
# File 'lib/mastercard/api/travelrecommender/consumer.rb', line 156 def self.query(criteria) # #Query objects of type Consumer by id and optional criteria #@param [Dict] criteria #@return [Consumer] object representing the response. #@raise [APIException] an exception from the response status # return self.execute("cb2db372-be91-4363-93f8-b7e39f19af84",Consumer.new(criteria)) end |
.read(id, criteria = nil) ⇒ Object
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/mastercard/api/travelrecommender/consumer.rb', line 126 def self.read(id, criteria = nil) # #Returns objects of type Consumer by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Consumer] object representing the response #@raise [APIException] an exception from the response status mapObj = Consumer.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("65af1b6c-c5ad-4c7e-84b4-8693a5a16cf7",Consumer.new(mapObj)) end |
Instance Method Details
#delete ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/mastercard/api/travelrecommender/consumer.rb', line 107 def delete # #Delete object of type Consumer #@param [String] id #@return [Consumer] of the response of the deleted instance. #@raise [APIException] an exception from the response status # return self.class.execute("688bd6d0-4653-42ab-be19-bf5b2a24df26", self) end |