Class: DefraRubyMocks::GovpayGetPaymentService

Inherits:
BaseService
  • Object
show all
Includes:
CanUseAwsS3
Defined in:
app/services/defra_ruby_mocks/govpay_get_payment_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: Random.rand(100..1_000), created_at: Time.current) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
# File 'app/services/defra_ruby_mocks/govpay_get_payment_service.rb', line 10

def run(payment_id:, amount: Random.rand(100..1_000), created_at: Time.current)
  # This currently supports only success results:
  response_success.merge(
    {
      created_date: created_at,
      amount: amount,
      payment_id: payment_id,
      total_amount: amount
    }
  )
end