Class: MasterCard::API::Spendcontrols::Declineall

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(mapObj) ⇒ Object



122
123
124
125
126
127
128
129
130
# File 'lib/mastercard/api/spendcontrols/declineall.rb', line 122

def self.create(mapObj)
  #
  #Creates object of type Declineall
  #
  #@param Dict mapObj, containing the required parameters to create a new object
  #@return [Declineall] of the response of created instance.
  #@raise [APIException] an exception from the response status
  return self.execute("6cd51690-8633-4141-ae70-3d5bcb19f286", Declineall.new(mapObj))
end

.deleteById(id, map = nil) ⇒ Object



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/mastercard/api/spendcontrols/declineall.rb', line 65

def self.deleteById(id, map = nil)
  #Delete object of type Declineall by id

  #@param [String] id
  #@param [Dict] map, containing additional parameters
  #@return [Declineall] of the response of the deleted instance.
  #@raise [APIException] an exception from the response status


  mapObj = Declineall.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("a366f86f-f6f1-4c22-9e56-75961019c445", mapObj)
end

.query(criteria) ⇒ Object



110
111
112
113
114
115
116
117
118
119
# File 'lib/mastercard/api/spendcontrols/declineall.rb', line 110

def self.query(criteria)
  #
  #Query objects of type Declineall by id and optional criteria
  #@param [Dict] criteria
  #@return [Declineall] object representing the response.
  #@raise [APIException] an exception from the response status
  #

  return self.execute("b6966793-c547-4857-b483-62642fe3d994",Declineall.new(criteria))
end

Instance Method Details

#deleteObject



90
91
92
93
94
95
96
97
98
99
100
# File 'lib/mastercard/api/spendcontrols/declineall.rb', line 90

def delete
  #
  #Delete object of type Declineall

  #@param [String] id
  #@return [Declineall] of the response of the deleted instance.
  #@raise [APIException] an exception from the response status
  #

  return self.class.execute("a366f86f-f6f1-4c22-9e56-75961019c445", self)
end