Sha256: 9f3450090cb98b037e8be0cbe8cb25dbfd151a3f7f071c1b658bc7d8de24ec7c

Contents?: true

Size: 817 Bytes

Versions: 3

Compression:

Stored size: 817 Bytes

Contents

# frozen_string_literal: true

module CreditGateway
  class Configuration
    BASE_URLS = {
      production: 'https://api.connector.crifrealtime.com',
      sandbox: 'https://api-sandbox.connector.crifrealtime.com'
    }.freeze
    AUTH_URLS = {
      production: 'https://api.connector.crifrealtime.com',
      sandbox: 'https://api-sandbox.connector.crifrealtime.com'
    }.freeze

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

    def initialize
      @client_id = ''
      @client_secret = ''
      @country = nil
      @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

3 entries across 3 versions & 1 rubygems

Version Path
credit_gateway-0.3.2 lib/credit_gateway/configuration.rb
credit_gateway-0.3.1 lib/credit_gateway/configuration.rb
credit_gateway-0.3.0 lib/credit_gateway/configuration.rb