Class: Misc

Inherits:
Base show all
Defined in:
lib/flutterwave_sdk/flutterwave_objects/misc.rb

Instance Attribute Summary

Attributes inherited from Base

#flutterwave_object

Instance Method Summary collapse

Methods inherited from Base

#check_passed_parameters, #delete_request, #get_request, #initialize, #post_request, #put_request

Constructor Details

This class inherits a constructor from Base

Instance Method Details

#get_all_wallet_balanceObject



5
6
7
8
9
# File 'lib/flutterwave_sdk/flutterwave_objects/misc.rb', line 5

def get_all_wallet_balance()
    base_url = flutterwave_object.base_url
    response = get_request("#{base_url}/balances")
    return response
end

#get_balance_per_currency(currency) ⇒ Object



11
12
13
14
15
# File 'lib/flutterwave_sdk/flutterwave_objects/misc.rb', line 11

def get_balance_per_currency(currency)
    base_url = flutterwave_object.base_url
    response = get_request("#{base_url}/balances/#{currency}")
    return response
end

#resolve_account(data) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/flutterwave_sdk/flutterwave_objects/misc.rb', line 17

def (data)
    base_url = flutterwave_object.base_url
    required_parameters = ["account_bank", "account_number"]
    check_passed_parameters(required_parameters, data)
    payload = data.to_json
    response = post_request("#{base_url}/accounts/resolve", payload)
    return response
end

#resolve_bvn(bvn) ⇒ Object



26
27
28
29
30
# File 'lib/flutterwave_sdk/flutterwave_objects/misc.rb', line 26

def resolve_bvn(bvn)
    base_url = flutterwave_object.base_url
    response = get_request("#{base_url}/kyc/bvns/#{bvn}")
    return response
end

#resolve_card_bin(bin) ⇒ Object



32
33
34
35
36
# File 'lib/flutterwave_sdk/flutterwave_objects/misc.rb', line 32

def resolve_card_bin(bin)
    base_url = flutterwave_object.base_url
    response = get_request("#{base_url}/card-bins/#{bin}")
    return response
end