Sha256: e68bb4c0f6055df55ce5284d05f72112e73cc587c2d07a996c0bdceff14c239e
Contents?: true
Size: 956 Bytes
Versions: 1
Compression:
Stored size: 956 Bytes
Contents
module Fortnox module API module EnvironmentValidation private def get_base_url base_url = ENV['FORTNOX_API_BASE_URL'] fail ArgumentError, 'You have to provide a base url.' unless base_url base_url end def get_client_secret client_secret = ENV['FORTNOX_API_CLIENT_SECRET'] fail ArgumentError, 'You have to provide your client secret.' unless client_secret client_secret end def get_access_token access_token = ENV['FORTNOX_API_ACCESS_TOKEN'] fail ArgumentError, 'You have to provide your access token.' unless access_token access_token end def get_authorization_code authorization_code = ENV['FORTNOX_API_AUTHORIZATION_CODE'] fail ArgumentError, 'You have to provide your access token.' unless authorization_code authorization_code end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fortnox-api-0.1.0 | lib/fortnox/api/environment_validation.rb |