class MasterCard::API::Qkr::CartItem
Public Class Methods
create(mapObj)
click to toggle source
# File lib/mastercard/api/qkr/cartitem.rb, line 62 def self.create(mapObj) # #Creates object of type CartItem # #@param Dict mapObj, containing the required parameters to create a new object #@return [CartItem] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("f98b3516-1820-43d2-ad11-976d44fa5c5e", CartItem.new(mapObj)) end
deleteById(id, map = nil)
click to toggle source
# File lib/mastercard/api/qkr/cartitem.rb, line 81 def self.deleteById(id, map = nil) #Delete object of type CartItem by id #@param [String] id #@param [Dict] map, containing additional parameters #@return [CartItem] of the response of the deleted instance. #@raise [APIException] an exception from the response status mapObj = CartItem.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("f25e2ddc-e6f1-40cf-b78e-3d058b536eeb", mapObj) end
Protected Class Methods
getOperationConfig(operationUUID)
click to toggle source
# File lib/mastercard/api/qkr/cartitem.rb, line 48 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/cartitem.rb, line 55 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/cartitem.rb, line 106 def delete # #Delete object of type CartItem #@param [String] id #@return [CartItem] of the response of the deleted instance. #@raise [APIException] an exception from the response status # return self.class.execute("f25e2ddc-e6f1-40cf-b78e-3d058b536eeb", self) end
update()
click to toggle source
# File lib/mastercard/api/qkr/cartitem.rb, line 122 def update # #Updates an object of type CartItem # #@return [CartItem] object representing the response. #@raise [APIException] an exception from the response status # return self.class.execute("0eb2c860-7396-409e-a0da-65808fb44b96",self) end