Class: BenefitsDocuments::Form526::DocumentsStatusPollingService

Inherits:
Common::Client::Base show all
Defined in:
lib/lighthouse/benefits_documents/form526/documents_status_polling_service.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Common::Client::Base

#config, configuration, #connection, #delete, #get, #perform, #post, #put, #raise_backend_exception, #raise_not_authenticated, #request, #sanitize_headers!, #service_name

Methods included from SentryLogging

#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger, #set_sentry_metadata

Constructor Details

#initialize(document_request_ids) ⇒ DocumentsStatusPollingService

Returns a new instance of DocumentsStatusPollingService.



15
16
17
18
# File 'lib/lighthouse/benefits_documents/form526/documents_status_polling_service.rb', line 15

def initialize(document_request_ids)
  @document_request_ids = document_request_ids
  super()
end

Class Method Details

.call(args) ⇒ Object



11
12
13
# File 'lib/lighthouse/benefits_documents/form526/documents_status_polling_service.rb', line 11

def self.call(args)
  new(args).check_documents_status
end

Instance Method Details

#check_documents_statusObject



20
21
22
# File 'lib/lighthouse/benefits_documents/form526/documents_status_polling_service.rb', line 20

def check_documents_status
  fetch_documents_status
end

#fetch_documents_statusObject (private)



26
27
28
# File 'lib/lighthouse/benefits_documents/form526/documents_status_polling_service.rb', line 26

def fetch_documents_status
  config.get_documents_status(@document_request_ids)
end