Class: Synapsis::User

Inherits:
APIResource show all
Extended by:
APIOperations::Create
Defined in:
lib/synapsis_v3/user.rb

Defined Under Namespace

Modules: DocumentStatus

Class Method Summary collapse

Methods included from APIOperations::Create

create_request, create_url

Methods inherited from APIResource

#class_name, class_name, client_credentials, parse_as_synapse_resource, request, return_response

Class Method Details

.add_document(params) ⇒ Object



51
52
53
54
55
56
57
# File 'lib/synapsis_v3/user.rb', line 51

def self.add_document(params)
  add_document_url = "#{API_V3_PATH}user/doc/attachments/add"

  response = request(:post, add_document_url, convert_attachment_to_base_64(params))

  return_response(response)
end

.add_kyc(params) ⇒ Object



37
38
39
40
41
42
# File 'lib/synapsis_v3/user.rb', line 37

def self.add_kyc(params)
  add_kyc_url = "#{API_V3_PATH}#{class_name}/doc/add"

  response = request(:post, add_kyc_url, params)
  return_response(response)
end

.create(params) ⇒ Object



17
18
19
20
21
22
# File 'lib/synapsis_v3/user.rb', line 17

def self.create(params)
  payload = params.merge(client_credentials)

  response = create_request(payload)
  return_response(response)
end

.refresh(params) ⇒ Object



33
34
35
# File 'lib/synapsis_v3/user.rb', line 33

def self.refresh(params)
  return (params)
end

.search(params) ⇒ Object



75
76
77
78
79
80
81
# File 'lib/synapsis_v3/user.rb', line 75

def self.search(params)
  search_user_url = "#{API_V3_PATH}#{class_name}/search"

  response = request(:post, search_user_url, params.merge(client_credentials))

  return_response(response)
end

.show(params) ⇒ Object



59
60
61
62
63
64
65
# File 'lib/synapsis_v3/user.rb', line 59

def self.show(params)
  show_user_url = "#{API_V3_PATH}#{class_name}/client/users"

  response = request(:post, show_user_url, params.merge(client_credentials))

  return_response(response)
end

.show_kyc(params) ⇒ Object



67
68
69
70
71
72
73
# File 'lib/synapsis_v3/user.rb', line 67

def self.show_kyc(params)
  show_kyc_url = "#{API_V3_PATH}#{class_name}/kyc/show"

  response = request(:post, show_kyc_url, params.merge(client_credentials))

  return_response(response)
end

.sign_in(params) ⇒ Object



24
25
26
27
28
29
30
31
# File 'lib/synapsis_v3/user.rb', line 24

def self.(params)
   = "#{API_V3_PATH}#{class_name}/signin"

  payload = params.merge(client_credentials)

  response = request(:post, , payload)
  return_response(response)
end

.verify_kyc(params) ⇒ Object



44
45
46
47
48
49
# File 'lib/synapsis_v3/user.rb', line 44

def self.verify_kyc(params)
  verify_kyc_url = "#{API_V3_PATH}#{class_name}/doc/verify"

  response = request(:post, verify_kyc_url, params)
  return_response(response)
end