Class: OSTSdk::Saas::Users
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create(params = {}) ⇒ Object
Create a User.
-
#get(params = {}) ⇒ Object
Get user details.
-
#get_list(params = {}) ⇒ Object
List Users.
-
#initialize(params) ⇒ Users
constructor
Initialize.
Methods included from Util::ServicesHelper
#current_time, #current_timestamp, #perform_and_handle_exceptions
Constructor Details
#initialize(params) ⇒ Users
Initialize
Arguments:
api_base_url: (String)
api_key: (String)
api_secret: (String)
api_spec: (Boolean)
config: (Hash)
16 17 18 19 |
# File 'lib/ost-sdk-ruby/saas/users.rb', line 16 def initialize(params) super @url_prefix = '/users' end |
Instance Method Details
#create(params = {}) ⇒ Object
Create a User
Returns:
response: (Hash)
26 27 28 |
# File 'lib/ost-sdk-ruby/saas/users.rb', line 26 def create(params = {}) http_helper.send_post_request("#{@url_prefix}/", params) end |
#get(params = {}) ⇒ Object
Get user details
Returns:
response: (Hash)
44 45 46 |
# File 'lib/ost-sdk-ruby/saas/users.rb', line 44 def get(params = {}) http_helper.send_get_request("#{@url_prefix}/#{get_user_id!(params)}", params) end |
#get_list(params = {}) ⇒ Object
List Users
Returns:
response: (Hash)
35 36 37 |
# File 'lib/ost-sdk-ruby/saas/users.rb', line 35 def get_list(params = {}) http_helper.send_get_request("#{@url_prefix}/", params) end |