Sha256: a746957064d5b2df23a5df25a794b9c342762917d3c8751f18d639888af24527

Contents?: true

Size: 732 Bytes

Versions: 1

Compression:

Stored size: 732 Bytes

Contents

# frozen_string_literal: true

module Truelayer
  class Configuration
    BASE_URLS = {
      production: 'https://api.truelayer.com',
      sandbox: 'https://api.truelayer-sandbox.com'
    }.freeze
    AUTH_URLS = {
      production: 'https://auth.truelayer.com',
      sandbox: 'https://auth.truelayer-sandbox.com'
    }.freeze

    attr_accessor :client_id, :client_secret, :environment, :debug, :verbose

    def initialize
      @client_id = ''
      @client_secret = ''
      @environment = :sandbox # can be either :sandbox or :production
      @debug = false
      @verbose = 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

1 entries across 1 versions & 1 rubygems

Version Path
truelayer-0.1.4 lib/truelayer/configuration.rb