Class: Moov::SDKHooks::MoovVersionHook

Inherits:
AbstractSDKHook show all
Extended by:
T::Sig
Defined in:
lib/moov/sdk_hooks/moov_version.rb

Instance Method Summary collapse

Methods included from AbstractAfterErrorHook

#after_error

Methods included from AbstractAfterSuccessHook

#after_success

Methods included from AbstractSDKInitHook

#sdk_init

Instance Method Details

#before_request(hook_ctx:, request:) ⇒ Object



18
19
20
21
# File 'lib/moov/sdk_hooks/moov_version.rb', line 18

def before_request(hook_ctx:, request:)
  request.headers['X-Moov-Version'] = hook_ctx.config.openapi_doc_version
  request
end