Class: DefraRubyMocks::GovpayRequestRefundService

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

Instance Method Summary collapse

Methods inherited from BaseService

run

Instance Method Details

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

rubocop:disable Lint/UnusedMethodArgument



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

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

  # This currently supports only "submitted" status:
  {
    amount: amount,
    created_date: "2019-09-19T16:53:03.213Z",
    refund_id: SecureRandom.hex(22),
    status: "submitted"
  }
end