Class: CopayNotifications::NewStatementNotificationJob

Inherits:
Object
  • Object
show all
Includes:
SentryLogging, Sidekiq::Job
Defined in:
app/sidekiq/copay_notifications/new_statement_notification_job.rb

Constant Summary collapse

MCP_NOTIFICATION_TEMPLATE =
Settings.vanotify.services.dmc.template_id.vha_new_copay_statement_email
STATSD_KEY_PREFIX =
'api.copay_notifications.new_statement'

Instance Method Summary collapse

Methods included from SentryLogging

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

Instance Method Details

#perform(statement) ⇒ Object



32
33
34
35
36
37
# File 'app/sidekiq/copay_notifications/new_statement_notification_job.rb', line 32

def perform(statement)
  StatsD.increment("#{STATSD_KEY_PREFIX}.total")
  statement_service = DebtManagementCenter::StatementIdentifierService.new(statement)
  icn = statement_service.get_icn
  DebtManagementCenter::VANotifyEmailJob.perform_async(icn, MCP_NOTIFICATION_TEMPLATE, nil, 'icn')
end