class MasterCard::API::Qkr::Order
Public Class Methods
create(mapObj)
click to toggle source
# File lib/mastercard/api/qkr/order.rb, line 63 def self.create(mapObj) # #Creates object of type Order # #@param Dict mapObj, containing the required parameters to create a new object #@return [Order] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("e0a0b4a1-1805-4a52-a731-8bf7ab448fc9", Order.new(mapObj)) end
deleteById(id, map = nil)
click to toggle source
# File lib/mastercard/api/qkr/order.rb, line 82 def self.deleteById(id, map = nil) #Delete object of type Order by id #@param [String] id #@param [Dict] map, containing additional parameters #@return [Order] of the response of the deleted instance. #@raise [APIException] an exception from the response status mapObj = Order.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("e4d30151-a10f-43d8-b803-42ef41881237", mapObj) end
read(id, criteria = nil)
click to toggle source
# File lib/mastercard/api/qkr/order.rb, line 126 def self.read(id, criteria = nil) # #Returns objects of type Order by id and optional criteria #@param [String] id #@param [Dict] criteria #@return [Order] object representing the response #@raise [APIException] an exception from the response status mapObj = Order.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("6062912f-d4d3-4c28-9c50-f7ec56b29df6",Order.new(mapObj)) end
Protected Class Methods
getOperationConfig(operationUUID)
click to toggle source
# File lib/mastercard/api/qkr/order.rb, line 49 def self.getOperationConfig(operationUUID) if @__store.key?(operationUUID) return @__store[operationUUID] end raise NotImplementedError.new("Invalid operationUUID supplied:"+ operationUUID) end
getOperationMetadata()
click to toggle source
# File lib/mastercard/api/qkr/order.rb, line 56 def self.getOperationMetadata() return OperationMetadata.new(ResourceConfig.instance.getVersion(), ResourceConfig.instance.getHost(), ResourceConfig.instance.getContext(), ResourceConfig.instance.getJsonNative(), ResourceConfig.instance.getContentTypeOverride()) end
Public Instance Methods
delete()
click to toggle source
# File lib/mastercard/api/qkr/order.rb, line 107 def delete # #Delete object of type Order #@param [String] id #@return [Order] of the response of the deleted instance. #@raise [APIException] an exception from the response status # return self.class.execute("e4d30151-a10f-43d8-b803-42ef41881237", self) end
update()
click to toggle source
# File lib/mastercard/api/qkr/order.rb, line 152 def update # #Updates an object of type Order # #@return [Order] object representing the response. #@raise [APIException] an exception from the response status # return self.class.execute("ca1fe4a4-7139-4f00-bf3d-a78e68facd32",self) end