Sha256: 8ed71022d635ff581742bbfa755b872c8387f7b97fc2fe4f9e5a346cb1135b0f

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

module Klarna
  class Configuration
    attr_accessor :environment, :country, :api_key, :api_secret, :version, :debugger, :user_agent

    def initialize
      @country = :us
      @environment = :production
      @endpoints = Hash.new(
        test: "https://api.playground.klarna.com",
        production: "https://api.klarna.com"
      )
      # US has a different host
      @endpoints[:us] = {
        test: "https://api-na.playground.klarna.com",
        production: "https://api-na.klarna.com"
      }
      @version = :v1
      @debugger = false #$stdout
    end

    def endpoint
      @endpoints[@country.to_sym][@environment.to_sym]
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
klarna_client-0.9.1 lib/klarna/configuration.rb