class MasterCard::API::Spendcontrols::Amountdecline
Public Class Methods
create(mapObj)
click to toggle source
# File lib/mastercard/api/spendcontrols/amountdecline.rb, line 62 def self.create(mapObj) # #Creates object of type Amountdecline # #@param Dict mapObj, containing the required parameters to create a new object #@return [Amountdecline] of the response of created instance. #@raise [APIException] an exception from the response status return self.execute("a396688a-ade6-41bd-8cee-bb06c45956a4", Amountdecline.new(mapObj)) end
deleteById(id, map = nil)
click to toggle source
# File lib/mastercard/api/spendcontrols/amountdecline.rb, line 81 def self.deleteById(id, map = nil) #Delete object of type Amountdecline by id #@param [String] id #@param [Dict] map, containing additional parameters #@return [Amountdecline] of the response of the deleted instance. #@raise [APIException] an exception from the response status mapObj = Amountdecline.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("8535f26d-04dd-4cc2-a1ed-42dfc7ea7ee3", mapObj) end
query(criteria)
click to toggle source
# File lib/mastercard/api/spendcontrols/amountdecline.rb, line 126 def self.query(criteria) # #Query objects of type Amountdecline by id and optional criteria #@param [Dict] criteria #@return [Amountdecline] object representing the response. #@raise [APIException] an exception from the response status # return self.execute("bc8a7e59-c8f0-483a-8ad1-5986f08b28fc",Amountdecline.new(criteria)) end
Protected Class Methods
getOperationConfig(operationUUID)
click to toggle source
# File lib/mastercard/api/spendcontrols/amountdecline.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/spendcontrols/amountdecline.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/spendcontrols/amountdecline.rb, line 106 def delete # #Delete object of type Amountdecline #@param [String] id #@return [Amountdecline] of the response of the deleted instance. #@raise [APIException] an exception from the response status # return self.class.execute("8535f26d-04dd-4cc2-a1ed-42dfc7ea7ee3", self) end