Class: Plaid::PlaidSecret

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

Overview

Utility class for custom header authorization.

Instance Method Summary collapse

Constructor Details

#initialize(plaid_secret_credentials) ⇒ PlaidSecret

Initialization constructor.



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

def initialize(plaid_secret_credentials)
  auth_params = {}
  auth_params['PLAID-SECRET'] = plaid_secret_credentials.plaid_secret unless
    plaid_secret_credentials.nil? || plaid_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/plaid/http/auth/plaid_secret.rb', line 11

def error_message
  'PlaidSecret: plaid_secret is undefined.'
end