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("a53bba31-7e98-49fc-9194-f555976a2cf3", 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("9efef3c7-6291-4680-b0d0-a156e6ab40ca", 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("84c87d8f-40a4-4217-b86c-294d2d871ab9", 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("28911b02-d33a-4e4e-81b1-e94cef8a660f",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("9efef3c7-6291-4680-b0d0-a156e6ab40ca", 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("5e9b7042-d0af-4a1a-a5f3-424308c528d3",self)
end