Class: Economic::Credentials

Inherits:
Object
  • Object
show all
Defined in:
lib/economic/credentials.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.fetch!Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/economic/credentials.rb', line 4

def fetch!
  credentials = new(
    app_secret_token: Economic::Configuration.app_secret_token,
    agreement_grant_token: Economic::Configuration.agreement_grant_token
  )

  raise MissingCredentialsError if credentials.missing?

  credentials
end

Instance Method Details

#missing?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/economic/credentials.rb', line 16

def missing?
  app_secret_token.nil? || agreement_grant_token.nil?
end