Class: DecisionReview::NodSendEmailJob
- Inherits:
-
Object
- Object
- DecisionReview::NodSendEmailJob
- Includes:
- DecisionReviewV1::Appeals::LoggingUtils, Sidekiq::Job
- Defined in:
- app/sidekiq/decision_review/nod_send_email_job.rb
Constant Summary collapse
- LOG_PARAMS =
{ key: :nod_send_email_job, form_id: '10182', user_uuid: nil }.freeze
Instance Method Summary collapse
Methods included from DecisionReviewV1::Appeals::LoggingUtils
#benchmark?, #benchmark_to_log_data_hash, #extract_uuid_from_central_mail_message, #log_formatted, #parse_form412_response_to_log_msg, #parse_lighthouse_response_to_log_msg, #run_and_benchmark_if_enabled
Instance Method Details
#perform(email_address, template_id, personalisation, line_num) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'app/sidekiq/decision_review/nod_send_email_job.rb', line 18 def perform(email_address, template_id, personalisation, line_num) notify_client = VaNotify::Service.new(Settings.vanotify.services.benefits_decision_review.api_key) notify_client.send_email({ email_address:, template_id:, personalisation: }) log_formatted(**LOG_PARAMS, is_success: true, params: { line_num: }) rescue => e log_formatted(**LOG_PARAMS, is_success: false, params: { exception_message: e., line_num: }) end |