# frozen_string_literal: true module WellsFargo module Endpoints class ACH < Base SCOPE = 'ACH-Payments ACH-Payments-Status' def create_payment(payload) client.execute( :post, 'ach/v1/payments', headers: headers.merge('Content-Type' => 'application/json'), body: payload ) end def check_status(payment_id) client.execute( :get, "ach/v1/payments/#{payment_id}", headers: headers ) end private def headers { 'Authorization' => "Bearer #{client.token.generate(SCOPE)}", 'request-id' => SecureRandom.uuid } end end end end