class Bitkassa::Config

Contains the global configuration for the library.

Attributes

base_uri[RW]

Base URI where all calls are redirected to. Defaults to https://www.bitkassa.nl/api/v1. Use when e.g. a proxy or self-hosted variant is used.

debug[R]

Gets the current debug mode.

merchant_id[RW]

The Merchant ID you received with your Bitkassa Account.

secret_api_key[RW]

The Secret API key you received with your Bitkassa Account.

Public Class Methods

new() click to toggle source

Sets defaults for the configuration.

# File lib/bitkassa/config.rb, line 18
def initialize
  @base_uri = "https://www.bitkassa.nl/api/v1"
  self.debug = false
end

Public Instance Methods

debug=(mode) click to toggle source

Enable or disable debug mode. Boolean.

# File lib/bitkassa/config.rb, line 24
def debug=(mode)
  @debug = mode

  if mode
    HTTPI.log = true
    HTTPI.log_level = :debug
  else
    HTTPI.log = false
  end
end