Skip to content

Commit

Permalink
Add config file with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
loveapoex committed Aug 24, 2016
1 parent 456213f commit 630b343
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lib/postnord/config.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module Postnord
class Config

def self.api_key
(defined? POSTNORD_API_KEY) ? POSTNORD_API_KEY : ''
end

def self.api_version
(defined? POSTNORD_API_VERSION) ? POSTNORD_API_VERSION : 'v1'
end

def self.api_endpoint
(defined? POSTNORD_API_ENDPOINT) ? POSTNORD_API_ENDPOINT : 'https://api2.postnord.com/rest'
end

def self.locale
(defined? POSTNORD_LOCALE) ? POSTNORD_LOCALE : 'en'
end

def self.return_type
(defined? POSTNORD_RETURN_TYPE) ? POSTNORD_RETURN_TYPE : 'json'
end

end
end

0 comments on commit 630b343

Please sign in to comment.