Class: Paystack::Resources::Refund

Inherits:
BaseResource show all
Defined in:
lib/paystack/resources/refund.rb

Instance Method Summary collapse

Methods inherited from BaseResource

new

Instance Method Details

#create(body = {}) ⇒ Object

Create Refund POST /refund



10
11
12
# File 'lib/paystack/resources/refund.rb', line 10

def create(body = {})
  @transport.post("/refund", body: body)
end

#fetch(id) ⇒ Object

Fetch Refund GET /refund/id



17
18
19
# File 'lib/paystack/resources/refund.rb', line 17

def fetch(id)
  @transport.get("/refund/#{id}")
end

#list(query = {}) ⇒ Object

List Refunds GET /refund



24
25
26
# File 'lib/paystack/resources/refund.rb', line 24

def list(query = {})
  @transport.get("/refund", query: query)
end

#retry_(id, body = {}) ⇒ Object

Retry Refund POST /refund/retry_with_customer_details/id



31
32
33
# File 'lib/paystack/resources/refund.rb', line 31

def retry_(id, body = {})
  @transport.post("/refund/retry_with_customer_details/#{id}", body: body)
end