Class: QuidaxUser
Overview
Object for user related operations
Instance Attribute Summary
#quidax
Class Method Summary
collapse
Instance Method Summary
collapse
get_request, #initialize, post_request, put_request, url
Class Method Details
.create_sub_account(q_object:, body:) ⇒ Object
26
27
28
29
30
31
|
# File 'lib/quidax/objects/user.rb', line 26
def self.create_sub_account(q_object:, body:)
body.stringify_keys!
Utils.check_missing_keys(required_keys: %w[email first_name last_name phone_number], keys: body.keys,
field: "body")
post_request(q_object, API::USER_PATH, body)
end
|
.edit_account(q_object:, user_id:, body:) ⇒ Object
37
38
39
40
|
# File 'lib/quidax/objects/user.rb', line 37
def self.edit_account(q_object:, user_id:, body:)
path = "#{API::USER_PATH}/#{user_id}"
put_request(q_object, path, body)
end
|
.get_account_details(q_object:, user_id:) ⇒ Object
21
22
23
24
|
# File 'lib/quidax/objects/user.rb', line 21
def self.get_account_details(q_object:, user_id:)
path = "#{API::USER_PATH}/#{user_id}"
get_request(q_object, path)
end
|
.get_all_sub_accounts(q_object:) ⇒ Object
33
34
35
|
# File 'lib/quidax/objects/user.rb', line 33
def self.get_all_sub_accounts(q_object:)
get_request(q_object, API::USER_PATH)
end
|
Instance Method Details
#create_sub_account(body:) ⇒ Object
9
10
11
|
# File 'lib/quidax/objects/user.rb', line 9
def create_sub_account(body:)
QuidaxUser.create_sub_account(q_object: @quidax, body: body)
end
|
#edit_account(user_id:, body:) ⇒ Object
17
18
19
|
# File 'lib/quidax/objects/user.rb', line 17
def edit_account(user_id:, body:)
QuidaxUser.edit_account(q_object: @quidax, user_id: user_id, body: body)
end
|
#get_account_details(user_id:) ⇒ Object
5
6
7
|
# File 'lib/quidax/objects/user.rb', line 5
def get_account_details(user_id:)
QuidaxUser.get_account_details(q_object: @quidax, user_id: user_id)
end
|
#get_all_sub_accounts ⇒ Object