Class: RubyWsOne::User
Instance Attribute Summary
Attributes inherited from Request
#aw_tenant_code, #client_id, #client_secret, #domain, #system
Instance Method Summary
collapse
Methods inherited from Request
#http_method, #token, #transform
Constructor Details
#initialize(json = {}) ⇒ User
Returns a new instance of User.
185
186
187
188
|
# File 'lib/ruby_ws_one.rb', line 185
def initialize(json = {})
super(json)
@system ||= :system
end
|
Instance Method Details
#activate(args = {}) ⇒ Object
202
203
204
|
# File 'lib/ruby_ws_one.rb', line 202
def activate(args = {})
transform(http_method(args.merge!(method: :post, action: __method__, id: id&.value, element: :users)), args)
end
|
#adduser(args = {}) ⇒ Object
190
191
192
|
# File 'lib/ruby_ws_one.rb', line 190
def adduser(args = {})
transform(http_method(args.merge!(method: :post, action: __method__, element: :users)), args)
end
|
#deactivate(args = {}) ⇒ Object
198
199
200
|
# File 'lib/ruby_ws_one.rb', line 198
def deactivate(args = {})
transform(http_method(args.merge!(method: :post, action: __method__, id: id&.value, element: :users)), args)
end
|
#delete(confirm) ⇒ Object
206
207
208
209
210
|
# File 'lib/ruby_ws_one.rb', line 206
def delete(confirm)
return unless confirm
transform(http_method(method: :delete, action: __method__, id: id&.value, element: :users), {})
end
|
#search(args = {}) ⇒ Object
194
195
196
|
# File 'lib/ruby_ws_one.rb', line 194
def search(args = {})
transform(http_method(args.merge!(action: __method__, element: :users)), args)
end
|