Class: OstKycSdkRuby::Saas::UsersKyc

Inherits:
Base
  • Object
show all
Defined in:
lib/ost-kyc-sdk-ruby/saas/users_kyc.rb

Constant Summary

Constants inherited from Base

Base::REGEX_VALUE

Instance Attribute Summary

Attributes inherited from Base

#http_helper

Instance Method Summary collapse

Methods included from Util::ServicesHelper

#error_with_data, #exception_with_data, #perform_and_handle_exceptions, #success, #success_with_data

Constructor Details

#initialize(params) ⇒ UsersKyc

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_kyc.rb', line 15

def initialize(params)
  super
  @url_prefix = '/api/v2/users-kyc'
end

Instance Method Details

#email_approve(params) ⇒ Object

Send Approve Email to User

Arguments:

params: (Hash)

Returns:

response: (OstKycSdkRuby::Util::Result)


49
50
51
# File 'lib/ost-kyc-sdk-ruby/saas/users_kyc.rb', line 49

def email_approve(params)
  http_helper.send_post_request("#{@url_prefix}/#{get_user_id!(params)}/email/approve", params)
end

#email_deny(params) ⇒ Object

Send Deny Email to User

Arguments:

params: (Hash)

Returns:

response: (OstKycSdkRuby::Util::Result)


61
62
63
# File 'lib/ost-kyc-sdk-ruby/saas/users_kyc.rb', line 61

def email_deny(params)
  http_helper.send_post_request("#{@url_prefix}/#{get_user_id!(params)}/email/deny", params)
end

#email_report_issue(params) ⇒ Object

Send Report Issue Email to User

Arguments:

params: (Hash)

Returns:

response: (OstKycSdkRuby::Util::Result)


73
74
75
# File 'lib/ost-kyc-sdk-ruby/saas/users_kyc.rb', line 73

def email_report_issue(params)
  http_helper.send_post_request("#{@url_prefix}/#{get_user_id!(params)}/email/report-issue", params)
end

#get(params) ⇒ Object

Get an existing User Kyc

Arguments:

params: (Hash)

Returns:

response: (OstKycSdkRuby::Util::Result)


85
86
87
# File 'lib/ost-kyc-sdk-ruby/saas/users_kyc.rb', line 85

def get(params)
  http_helper.send_get_request("#{@url_prefix}/#{get_user_id!(params)}", params)
end

#get_presigned_url_post(params = {}) ⇒ Object

Get an existing Presigned URL via POST call

Arguments:

params: (Hash)

Returns:

response: (OstKycSdkRuby::Util::Result)


97
98
99
# File 'lib/ost-kyc-sdk-ruby/saas/users_kyc.rb', line 97

def get_presigned_url_post(params = {})
  http_helper.send_get_request("#{@url_prefix}/pre-signed-urls/for-post", params)
end

#get_presigned_url_put(params = {}) ⇒ Object

Get an existing Presigned URL via PUT call

Arguments:

params: (Hash)

Returns:

response: (OstKycSdkRuby::Util::Result)


109
110
111
# File 'lib/ost-kyc-sdk-ruby/saas/users_kyc.rb', line 109

def get_presigned_url_put(params = {})
  http_helper.send_get_request("#{@url_prefix}/pre-signed-urls/for-put", params)
end

#list(params = {}) ⇒ Object

Fetches the list of an existing Users Kyc

Returns:

response: (OstKycSdkRuby::Util::Result)


25
26
27
# File 'lib/ost-kyc-sdk-ruby/saas/users_kyc.rb', line 25

def list(params = {})
  http_helper.send_get_request("#{@url_prefix}", params)
end

#submit_kyc(params) ⇒ Object

Creates/Updates a new User Kyc

Arguments:

params: (Hash)

Returns:

response: (OstKycSdkRuby::Util::Result)


37
38
39
# File 'lib/ost-kyc-sdk-ruby/saas/users_kyc.rb', line 37

def submit_kyc(params)
  http_helper.send_post_request("#{@url_prefix}/#{get_user_id!(params)}", params)
end