Class: MasterCard::API::Spendcontrols::Amountdecline

Inherits:
Core::Model::BaseObject
  • Object
show all
Includes:
Core::Model
Defined in:
lib/mastercard/api/spendcontrols/amountdecline.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(mapObj) ⇒ Object



62
63
64
65
66
67
68
69
70
# 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("1c0bb42d-bc22-40e2-a8a7-77d1da152315", Amountdecline.new(mapObj))
end

.deleteById(id, map = nil) ⇒ Object



81
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/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("2be2ab31-4947-40ba-8694-badea99c0032", mapObj)
end

.query(criteria) ⇒ Object



126
127
128
129
130
131
132
133
134
135
# 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("372f6f25-a3b7-4d45-b72d-27c4fd352b06",Amountdecline.new(criteria))
end

Instance Method Details

#deleteObject



106
107
108
109
110
111
112
113
114
115
116
# 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("2be2ab31-4947-40ba-8694-badea99c0032", self)
end