Class: MasterCard::API::McOn::User

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.createUser(mapObj) ⇒ Object



64
65
66
67
68
69
70
71
72
# File 'lib/mastercard/api/mcon/user.rb', line 64

def self.createUser(mapObj)
    #
    #Creates object of type User
    #
    #@param Dict mapObj, containing the required parameters to create a new object
    #@return [User] of the response of created instance.
    #@raise [APIException] an exception from the response status
    return self.execute("d9b5fdb7-867a-448d-862d-6b97f7085234", User.new(mapObj))
end

.deleteUserById(id, map = nil) ⇒ Object



83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/mastercard/api/mcon/user.rb', line 83

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

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


    mapObj = User.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("7e411710-0e8c-494a-9b67-3b98a0ae3b5b", mapObj)
end

.patchUser(mapObj) ⇒ Object



123
124
125
126
127
128
129
130
131
# File 'lib/mastercard/api/mcon/user.rb', line 123

def self.patchUser(mapObj)
    #
    #Creates object of type User
    #
    #@param Dict mapObj, containing the required parameters to create a new object
    #@return [User] of the response of created instance.
    #@raise [APIException] an exception from the response status
    return self.execute("b6cbc0db-e771-4d3b-b617-10836319ad63", User.new(mapObj))
end

.readUser(id, criteria = nil) ⇒ Object



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# File 'lib/mastercard/api/mcon/user.rb', line 143

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

    mapObj = User.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("fb2e9244-5266-4157-8fb6-1ce1bd7a8872",User.new(mapObj))
end

Instance Method Details

#deleteUserObject



108
109
110
111
112
113
114
115
116
117
118
# File 'lib/mastercard/api/mcon/user.rb', line 108

def deleteUser
    #
    #Delete object of type User

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

    return self.class.execute("7e411710-0e8c-494a-9b67-3b98a0ae3b5b", self)
end

#updateUserObject



169
170
171
172
173
174
175
176
177
# File 'lib/mastercard/api/mcon/user.rb', line 169

def updateUser
    #
    #Updates an object of type User
    #
    #@return [User] object representing the response.
    #@raise [APIException] an exception from the response status
    #
    return self.class.execute("0fc1de80-da09-4178-b6fc-00b029354744",self)
end