Class: MasterCard::API::Qkr::Trans

Inherits:
Core::Model::BaseObject
  • Object
show all
Includes:
Core::Model
Defined in:
lib/mastercard/api/qkr/trans.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/qkr/trans.rb', line 63

def self.create(mapObj)
  #
  #Creates object of type Trans
  #
  #@param Dict mapObj, containing the required parameters to create a new object
  #@return [Trans] of the response of created instance.
  #@raise [APIException] an exception from the response status
  return self.execute("0efac433-938b-40f1-95a4-b19453b6ad18", Trans.new(mapObj))
end

.query(criteria) ⇒ Object



84
85
86
87
88
89
90
91
92
93
# File 'lib/mastercard/api/qkr/trans.rb', line 84

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

  return self.execute("f0f21349-4cc1-4c32-b955-86ba1cd074ba",Trans.new(criteria))
end

.read(id, criteria = nil) ⇒ Object



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

def self.read(id, criteria = nil)
  #
  #Returns objects of type Trans by id and optional criteria
  #@param [String] id
  #@param [Dict] criteria
  #@return [Trans] object representing the response
  #@raise [APIException] an exception from the response status

  mapObj = Trans.new
  if !(id.nil? || id.to_s.empty?)
    mapObj.set("id", id)
  end
  if !criteria.nil?
    if criteria.instance_of? RequestMap
      mapObj.setAll(criteria.getObject())
    else
      mapObj.setAll(criteria)
    end
  end

  return self.execute("5d17010f-fe51-4cf1-9067-b046f33f96b2",Trans.new(mapObj))
end

Instance Method Details

#updateObject



126
127
128
129
130
131
132
133
134
# File 'lib/mastercard/api/qkr/trans.rb', line 126

def update
  #
  #Updates an object of type Trans
  #
  #@return [Trans] object representing the response.
  #@raise [APIException] an exception from the response status
  #
  return self.class.execute("57ada896-d763-4969-aac6-bb7d82b7c92e",self)
end