Class: DefraRubyMocks::GovpayRequestRefundService

Inherits:
BaseService
  • Object
show all
Includes:
CanUseAwsS3
Defined in:
app/services/defra_ruby_mocks/govpay_request_refund_service.rb

Constant Summary

Constants included from CanUseAwsS3

CanUseAwsS3::DEFAULT_LAST_REFUND_REQUEST_TIME

Instance Method Summary collapse

Methods inherited from BaseService

run

Instance Method Details

#run(payment_id:, amount:, refund_amount_available:) ⇒ Object

rubocop:disable Lint/UnusedMethodArgument



8
9
10
11
12
13
14
15
16
17
# File 'app/services/defra_ruby_mocks/govpay_request_refund_service.rb', line 8

def run(payment_id:, amount:, refund_amount_available:) # rubocop:disable Lint/UnusedMethodArgument
  write_refund_requested_timestamp(timestamp_file_name:)

  {
    amount: amount,
    created_date: "2019-09-19T16:53:03.213Z",
    refund_id: SecureRandom.hex(22),
    status: test_refund_response_status
  }
end