Class: Updox::Models::User
Constant Summary
collapse
- SAVE_ENDPOINT =
'/UserSave'.freeze
- QUERY_ENDPOINT =
'/UserList'.freeze
- FIND_ENDPOINT =
'/UserGet'.freeze
- LIST_TYPE =
'userList'.freeze
- LIST_NAME =
'users'
- ITEM_TYPE =
'user'
Instance Attribute Summary
Attributes inherited from Model
#updox_status
Class Method Summary
collapse
Instance Method Summary
collapse
exists?
Methods inherited from Model
#as_json, #error_message, from_response, request, #response_code, #response_message, #successful?
Class Method Details
.find(user_id, account_id:) ⇒ Object
49
50
51
52
53
54
55
56
57
|
# File 'lib/updox/models/user.rb', line 49
def self.find(user_id, account_id: )
response = request(endpoint: FIND_ENDPOINT, account_id: account_id, body: { userId: user_id}, required_auths: Updox::Models::Auth::AUTH_ACCT)
if response.successful?
response
else
nil
end
end
|
Instance Method Details
#create(account_id:) ⇒ Object
45
46
47
|
# File 'lib/updox/models/user.rb', line 45
def create(account_id: )
self.class.request(endpoint: SAVE_ENDPOINT, body: self.to_h, auth: {accountId: account_id}, required_auths: Updox::Models::Auth::AUTH_ACCT)
end
|