Class: DefraRubyMocks::GovpayGetPaymentService

Inherits:
BaseService
  • Object
show all
Defined in:
app/services/defra_ruby_mocks/govpay_get_payment_service.rb

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



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

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