Sha256: ba534188abcedf77bfeb132dccee58331b16ace93a9218b1585aaf177dff6ad4
Contents?: true
Size: 1.25 KB
Versions: 7
Compression:
Stored size: 1.25 KB
Contents
module AchClient class ICheckGateway # Poll ICheckGateway for status of processed or processing Ach transactions. class AchStatusChecker < Abstract::AchStatusChecker ## # ICheckGateway does not support this def self.most_recent # In the future, this might just return the last 24 hours or something raise 'ICheckGateway does not have a most_recent bucket' end # Wrapper for the range response endpoint # @return [Hash{String => AchClient::AchResponse}] Hash with confirmation # number as the key, AchResponse objects as values def self.in_range(start_date:, end_date:) AchClient::ICheckGateway.wrap_request( method: :pull_transaction_report, message: AchClient::ICheckGateway::CompanyInfo.build.to_hash.merge({ startDate: start_date, endDate: end_date }) ).split("\n").select do |record| # Ignore credit card swipes if there are any record.start_with?('ICHECK') end.map do |record| { record.split('|')[3] => AchClient::ICheckGateway::ResponseRecordProcessor .process_response_record(record) } end.reduce(&:merge) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems