class Afterpay::API::Payment::Refund
Attributes
order_id[R]
refund[R]
Public Class Methods
new(params = {})
click to toggle source
# File lib/afterpay/api/payment/refund.rb, line 7 def initialize(params = {}) @order_id = params[:order_id] @refund = params[:refund] end
Private Instance Methods
endpoint()
click to toggle source
# File lib/afterpay/api/payment/refund.rb, line 24 def endpoint "#{URL}/#{order_id}/refund" end
payload()
click to toggle source
# File lib/afterpay/api/payment/refund.rb, line 16 def payload { action: :post, body: refund.as_json, endpoint: endpoint } end