Class: SendRefundWebhookJob

Inherits:
BaseSendWebhookJob show all
Defined in:
app/jobs/send_refund_webhook_job.rb

Instance Attribute Summary collapse

Attributes inherited from BaseSendWebhookJob

#callback_url, #govpay_payment_id, #signing_secret

Instance Method Summary collapse

Methods inherited from BaseSendWebhookJob

#post_callback

Instance Attribute Details

#govpay_refund_idObject

Returns the value of attribute govpay_refund_id.



4
5
6
# File 'app/jobs/send_refund_webhook_job.rb', line 4

def govpay_refund_id
  @govpay_refund_id
end

#govpay_refund_statusObject

Returns the value of attribute govpay_refund_status.



4
5
6
# File 'app/jobs/send_refund_webhook_job.rb', line 4

def govpay_refund_status
  @govpay_refund_status
end

Instance Method Details

#perform(govpay_payment_id:, govpay_refund_id:, govpay_refund_status:, callback_url:, signing_secret:) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'app/jobs/send_refund_webhook_job.rb', line 6

def perform(govpay_payment_id:, govpay_refund_id:, govpay_refund_status:, callback_url:, signing_secret:)
  @govpay_payment_id = govpay_payment_id
  @govpay_refund_status = govpay_refund_status
  @govpay_refund_id = govpay_refund_id
  @callback_url = callback_url
  @signing_secret = signing_secret

  Rails.logger.warn "[DefraRubyMocks] [SendRefundWebhookJob] sending #{webhook_type} webhook " \
                    "for payment #{govpay_payment_id}, refund #{govpay_refund_id}, status  " \
                    "\"#{govpay_refund_status}\" to #{callback_url}"

  post_callback
end