class Afterpay::API::Payment::Void

Attributes

order_id[R]
payment[R]

Public Class Methods

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

Private Instance Methods

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