class Afterpay::API::Payment::Capture

Attributes

payment[R]

Public Class Methods

new(params = {}) click to toggle source
# File lib/afterpay/api/payment/capture.rb, line 7
def initialize(params = {})
  @payment = params[:payment]
end

Private Instance Methods

endpoint() click to toggle source
# File lib/afterpay/api/payment/capture.rb, line 23
def endpoint
  "#{URL}/capture"
end
payload() click to toggle source
# File lib/afterpay/api/payment/capture.rb, line 15
def payload
  {
    action: :post,
    body: payment.as_json,
    endpoint: endpoint
  }
end