Class: OstKycSdkRuby::Saas::Users
- Defined in:
- lib/ost-kyc-sdk-ruby/saas/users.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create(params = {}) ⇒ Object
Create a new user.
-
#get(params) ⇒ Object
Get an existing user.
-
#initialize(params) ⇒ Users
constructor
Initialize.
-
#list(params = {}) ⇒ Object
Fetches the list of an existing users.
Methods included from Util::ServicesHelper
#error_with_data, #exception_with_data, #perform_and_handle_exceptions, #success, #success_with_data
Constructor Details
#initialize(params) ⇒ Users
Initialize
Arguments:
api_base_url: (String)
api_key: (String)
api_secret: (String)
api_spec: (Boolean)
15 16 17 18 |
# File 'lib/ost-kyc-sdk-ruby/saas/users.rb', line 15 def initialize(params) super @url_prefix = '/api/v2/users' end |
Instance Method Details
#create(params = {}) ⇒ Object
Create a new user
Returns:
response: (OstKycSdkRuby::Util::Result)
25 26 27 |
# File 'lib/ost-kyc-sdk-ruby/saas/users.rb', line 25 def create(params = {}) http_helper.send_post_request("#{@url_prefix}", params) end |
#get(params) ⇒ Object
Get an existing user
Returns:
response: (OstKycSdkRuby::Util::Result)
34 35 36 |
# File 'lib/ost-kyc-sdk-ruby/saas/users.rb', line 34 def get(params) http_helper.send_get_request("#{@url_prefix}/#{get_id!(params)}", params) end |
#list(params = {}) ⇒ Object
Fetches the list of an existing users
Returns:
response: (OstKycSdkRuby::Util::Result)
43 44 45 |
# File 'lib/ost-kyc-sdk-ruby/saas/users.rb', line 43 def list(params = {}) http_helper.send_get_request("#{@url_prefix}", params) end |