Class: BenefitsDocuments::WorkerService
- Inherits:
-
Common::Client::Base
- Object
- Common::Client::Base
- BenefitsDocuments::WorkerService
- Defined in:
- lib/lighthouse/benefits_documents/worker_service.rb
Constant Summary collapse
- STATSD_KEY_PREFIX =
'api.benefits_documents'
- STATSD_UPLOAD_LATENCY =
'lighthouse.api.benefits.documents.latency'
Instance Method Summary collapse
-
#initialize(icn) ⇒ WorkerService
constructor
A new instance of WorkerService.
- #upload_document(file_body, lighthouse_document) ⇒ Object
Methods inherited from Common::Client::Base
configuration, #raise_backend_exception
Methods included from SentryLogging
#log_exception_to_sentry, #log_message_to_sentry, #non_nil_hash?, #normalize_level, #rails_logger
Constructor Details
#initialize(icn) ⇒ WorkerService
Returns a new instance of WorkerService.
13 14 15 16 17 18 |
# File 'lib/lighthouse/benefits_documents/worker_service.rb', line 13 def initialize(icn) @icn = icn raise ArgumentError, 'no ICN passed in for LH API request.' if icn.blank? super() end |
Instance Method Details
#upload_document(file_body, lighthouse_document) ⇒ Object
20 21 22 |
# File 'lib/lighthouse/benefits_documents/worker_service.rb', line 20 def upload_document(file_body, lighthouse_document) config.post(file_body, lighthouse_document) end |