Class: NoyoApi::Configuration
- Inherits:
-
Object
- Object
- NoyoApi::Configuration
- Defined in:
- lib/noyo_api/configuration.rb
Constant Summary collapse
- CONFIG_SETTERS =
[ :client_id, :client_secret, :access_token, :accounts_base_uri, :fulfillment_base_uri, :verbose, ].freeze
- REQUIRED_SETTERS =
[ :client_id, :client_secret ].freeze
Instance Method Summary collapse
Instance Method Details
#accounts_base_uri ⇒ Object
10 11 12 |
# File 'lib/noyo_api/configuration.rb', line 10 def accounts_base_uri @accounts_base_uri || 'https://accounts.development.noyoconnect.com' end |
#fulfillment_base_uri ⇒ Object
14 15 16 |
# File 'lib/noyo_api/configuration.rb', line 14 def fulfillment_base_uri @fulfillment_base_uri || 'https://fulfillment.development.noyoconnect.com' end |
#unconfigured? ⇒ Boolean
18 19 20 21 22 23 24 25 26 |
# File 'lib/noyo_api/configuration.rb', line 18 def unconfigured? unconfigured_setters = REQUIRED_SETTERS.map do |setter| value = send(setter) value.nil? || (value != true && value != false && (!value.respond_to?(:empty?) || value.empty?)) end unconfigured_setters.any? end |