module PortalConnectors class SaviClient < BaseClient def sync_user_level(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/remi_users/sync_user_level" res = post_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 201] rescue => e return_error e end def sync(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/remi_users/sync" res = post_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 201] rescue => e return_error e end def unlink_account(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/remi_users/unlink_account" res = post_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 201] rescue => e return_error e end def is_valid_savi_user_ref(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/remi_users/is_valid_savi_user_ref" res = get_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 200] rescue => e return_error e end def check_valid_user_ref(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/remi_users/check_valid_user_ref" res = get_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 200] rescue => e return_error e end def handle_fund_transfer(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/remi_users/handle_fund_transfer" res = post_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 201] rescue => e return_error e end def fund_transfer_data(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/remi_users/fund_transfer_data" res = get_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 200] rescue => e return_error e end def get_address(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/deposit_service/get_deposit_address" res = post_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 201] rescue => e return_error e end def fetch_deposit(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/deposit_service/get_deposit" res = get_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 200] rescue => e return_error e end def resync_missing_deposits(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/deposit_service/resync_missing_deposits" res = get_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 200] rescue => e return_error e end def perform_onoff_ramp_pool_mission(**kwargs) params = { nonce: next_nonce, }.merge(kwargs) url = "#{host}/api/v1/remi_users/perform_onoff_ramp_pool_missions" res = post_with_signature(url, params) [JSON.parse(res.body_str), res.response_code == 201] rescue => e return_error e end end end