Sha256: f33df5825a02508920826b33769e1bba06bc7778e614b5ad747856f305c3e375

Contents?: true

Size: 686 Bytes

Versions: 3

Compression:

Stored size: 686 Bytes

Contents

# frozen_string_literal: true

module FractalApi
  class Configuration
    BASE_URLS = {
      production: 'https://apis.askfractal.com',
      sandbox: 'https://apis.julia-laces.co.uk'
    }.freeze
    AUTH_URLS = {
      production: 'https://auth.askfractal.com',
      sandbox: 'https://auth.julia-laces.co.uk'
    }.freeze

    attr_accessor :api_key, :partner_id, :environment, :debug

    def initialize
      @api_key = ''
      @partner_id = ''
      @environment = :sandbox # can be either :sandbox or :production
      @debug = false
    end

    def base_url
      BASE_URLS[environment.to_sym]
    end

    def auth_url
      AUTH_URLS[environment.to_sym]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fractal_api-0.1.3 lib/fractal_api/configuration.rb
fractal_api-0.1.2 lib/fractal_api/configuration.rb
fractal_api-0.1.1 lib/fractal_api/configuration.rb