Class: Preauth

Inherits:
Base
  • Object
show all
Defined in:
lib/flutterwave_sdk/flutterwave_objects/preauthorise.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

#capture_preauth(flw_ref, data) ⇒ Object



6
7
8
9
10
11
# File 'lib/flutterwave_sdk/flutterwave_objects/preauthorise.rb', line 6

def capture_preauth(flw_ref, data)
    base_url = flutterwave_object.base_url 
    payload = data.to_json
    response = post_request("#{base_url}/charges/#{flw_ref}/capture", payload) 
    return response
end

#refund_preauth(flw_ref, data) ⇒ Object



20
21
22
23
24
25
# File 'lib/flutterwave_sdk/flutterwave_objects/preauthorise.rb', line 20

def refund_preauth(flw_ref, data)
    base_url = flutterwave_object.base_url 
    payload = data.to_json
    response = post_request("#{base_url}/charges/#{flw_ref}/refund", payload) 
    return response
end

#void_preauth(flw_ref) ⇒ Object



13
14
15
16
17
18
# File 'lib/flutterwave_sdk/flutterwave_objects/preauthorise.rb', line 13

def void_preauth(flw_ref)
    base_url = flutterwave_object.base_url 
    payload = payload.to_json
    response = post_request("#{base_url}/charges/#{flw_ref}/void", payload) 
    return response
end