Class: AchClient::Sftp::AchStatusChecker

Inherits:
Abstract::AchStatusChecker show all
Defined in:
lib/ach_client/providers/sftp/ach_status_checker.rb

Overview

Poll SFTP provider for Inbox files

Class Method Summary collapse

Class Method Details

.in_range(start_date:, end_date:) ⇒ Hash{String => [AchClient::AchResponse]}

Gets the status of ach transactions between the given dates

Parameters:

  • start_date (String)

    lower bound of date ranged status query

  • end_date (String)

    upper bound of date ranged status query

Returns:

  • (Hash{String => [AchClient::AchResponse]})

    Hash with individual_id_number values as keys, list of AchResponse objects as values



23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/ach_client/providers/sftp/ach_status_checker.rb', line 23

def self.in_range(start_date:, end_date:)
  in_range = {}
  self.module_parent.with_sftp_connection do |connection|
    in_range = process_files(
      files_in_range(
        connection: connection,
        start_date: start_date,
        end_date: end_date
      )
    )
  end
  in_range
end

.most_recentHash{String => [AchClient::AchResponse]}

Gets the status of ach transactions since the last time we ran this method

Returns:

  • (Hash{String => [AchClient::AchResponse]})

    Hash with individual_id_number values as keys, list of AchResponse objects as values



12
13
14
# File 'lib/ach_client/providers/sftp/ach_status_checker.rb', line 12

def self.most_recent
  process_files(most_recent_files)
end