Class: MasterCard::API::Spendcontrols::Card

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(mapObj) ⇒ Object



63
64
65
66
67
68
69
70
71
# File 'lib/mastercard/api/spendcontrols/card.rb', line 63

def self.create(mapObj)
  #
  #Creates object of type Card
  #
  #@param Dict mapObj, containing the required parameters to create a new object
  #@return [Card] of the response of created instance.
  #@raise [APIException] an exception from the response status
  return self.execute("8766533b-a891-40ce-ac0b-286976ec9a9f", Card.new(mapObj))
end

.deleteById(id, map = nil) ⇒ Object



98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# File 'lib/mastercard/api/spendcontrols/card.rb', line 98

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

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


  mapObj = Card.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("40223e8b-346b-4797-83ca-31e0c16ae6b6", mapObj)
end

.read(mapObj) ⇒ Object



79
80
81
82
83
84
85
86
87
# File 'lib/mastercard/api/spendcontrols/card.rb', line 79

def self.read(mapObj)
  #
  #Creates object of type Card
  #
  #@param Dict mapObj, containing the required parameters to create a new object
  #@return [Card] of the response of created instance.
  #@raise [APIException] an exception from the response status
  return self.execute("89f6737a-642a-4705-9d15-3c8285fac3c5", Card.new(mapObj))
end

.update(mapObj) ⇒ Object



138
139
140
141
142
143
144
145
146
# File 'lib/mastercard/api/spendcontrols/card.rb', line 138

def self.update(mapObj)
  #
  #Creates object of type Card
  #
  #@param Dict mapObj, containing the required parameters to create a new object
  #@return [Card] of the response of created instance.
  #@raise [APIException] an exception from the response status
  return self.execute("d0fb3550-785f-4222-869f-1b83f2318772", Card.new(mapObj))
end

Instance Method Details

#deleteObject



123
124
125
126
127
128
129
130
131
132
133
# File 'lib/mastercard/api/spendcontrols/card.rb', line 123

def delete
  #
  #Delete object of type Card

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

  return self.class.execute("40223e8b-346b-4797-83ca-31e0c16ae6b6", self)
end