Class: ThePlaidApi::Secret

Inherits:
CoreLibrary::HeaderAuth
  • Object
show all
Defined in:
lib/the_plaid_api/http/auth/secret.rb

Overview

Utility class for custom header authorization.

Instance Method Summary collapse

Constructor Details

#initialize(secret_credentials) ⇒ Secret

Initialization constructor.



16
17
18
19
20
21
22
# File 'lib/the_plaid_api/http/auth/secret.rb', line 16

def initialize(secret_credentials)
  auth_params = {}
  auth_params['PLAID-SECRET'] = secret_credentials.plaid_secret unless
    secret_credentials.nil? || secret_credentials.plaid_secret.nil?

  super auth_params
end

Instance Method Details

#error_messageObject

Display error message on occurrence of authentication failure.



11
12
13
# File 'lib/the_plaid_api/http/auth/secret.rb', line 11

def error_message
  'Secret: plaid_secret is undefined.'
end