class Klarna::Configuration

Attributes

api_key[RW]
api_secret[RW]
country[RW]
debugger[RW]
environment[RW]
user_agent[RW]
version[RW]

Public Class Methods

new() click to toggle source
# File lib/klarna/configuration.rb, line 5
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

Public Instance Methods

endpoint() click to toggle source
# File lib/klarna/configuration.rb, line 21
def endpoint
  @endpoints[@country.to_sym][@environment.to_sym]
end