Class: MasterCard::API::Qkr::Cart
- Inherits:
-
Core::Model::BaseObject
- Object
- Core::Model::BaseObject
- MasterCard::API::Qkr::Cart
- Includes:
- Core::Model
- Defined in:
- lib/mastercard/api/qkr/cart.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/cart.rb', line 66 def self.query(criteria) # #Query objects of type Cart by id and optional criteria #@param [Dict] criteria #@return [Cart] object representing the response. #@raise [APIException] an exception from the response status # return self.execute("32eb27b1-7705-4a96-9fd6-11d3bbfd90fe",Cart.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/cart.rb', line 82 def self.read(id, criteria = nil) # #Returns objects of type Cart by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Cart] object representing the response #@raise [APIException] an exception from the response status mapObj = Cart.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("5716c8bb-ec52-4425-bd15-53f4f014e4fe",Cart.new(mapObj)) end |