Class: Transactions
- Inherits:
-
Base
show all
- Defined in:
- lib/flutterwave_sdk/flutterwave_objects/transactions.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_transactions ⇒ Object
13
14
15
16
17
18
|
# File 'lib/flutterwave_sdk/flutterwave_objects/transactions.rb', line 13
def get_transactions
base_url = flutterwave_object.base_url
response = get_request("#{base_url}/transactions")
return response
end
|
#initiate_a_refund(data, id) ⇒ Object
32
33
34
35
36
37
|
# File 'lib/flutterwave_sdk/flutterwave_objects/transactions.rb', line 32
def initiate_a_refund(data, id)
base_url = flutterwave_object.base_url
payload = data.to_json
response = post_request("#{base_url}/transactions/#{id}/refund", payload)
return response
end
|
#resend_transaction_webhook(payload) ⇒ Object
resend transaction webhook
40
41
42
43
44
|
# File 'lib/flutterwave_sdk/flutterwave_objects/transactions.rb', line 40
def resend_transaction_webhook(payload)
base_url = flutterwave_object.base_url
response = post_request("#{base_url}/transactions/resend-hook", payload.to_json)
return response
end
|
#transaction_fee(currency, amount) ⇒ Object
5
6
7
8
9
10
11
|
# File 'lib/flutterwave_sdk/flutterwave_objects/transactions.rb', line 5
def transaction_fee(currency, amount)
base_url = flutterwave_object.base_url
response = get_request("#{base_url}/transactions/fee?amount=#{amount}¤cy=#{currency}")
return response
end
|
#transactions_events(id) ⇒ Object
26
27
28
29
30
|
# File 'lib/flutterwave_sdk/flutterwave_objects/transactions.rb', line 26
def transactions_events(id)
base_url = flutterwave_object.base_url
response = get_request("#{base_url}/transactions/#{id}/events")
return response
end
|
#verify_transaction(id) ⇒ Object
20
21
22
23
24
|
# File 'lib/flutterwave_sdk/flutterwave_objects/transactions.rb', line 20
def verify_transaction(id)
base_url = flutterwave_object.base_url
response = get_request("#{base_url}/transactions/#{id}/verify")
return response
end
|