Sha256: 71f6e87cb91c04284d0fffa8cec9461ed98b3e74296e878a8557506058e57bac

Contents?: true

Size: 468 Bytes

Versions: 6

Compression:

Stored size: 468 Bytes

Contents

# frozen_string_literal: true

module Bckbn
  API_VERSION = "0.1.0"
  CONFIG_OPTIONS = %i[
    access_token
    api_version
    api_base
    log_level
    merchant_id
    source_ip_address
    idempotency_key
  ].freeze

  Configuration = Struct.new(*CONFIG_OPTIONS, keyword_init: true) do
    def self.setup
      new
    end

    def initialize(**opts)
      opts[:api_version] ||= API_VERSION
      opts[:log_level] ||= :error
      super(**opts)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bckbn-2.2.1 lib/bckbn/configuration.rb
bckbn-2.1.1 lib/bckbn/configuration.rb
bckbn-2.1.0 lib/bckbn/configuration.rb
bckbn-2.0.0 lib/bckbn/configuration.rb
bckbn-1.1.0 lib/bckbn/configuration.rb
bckbn-1.0.0 lib/bckbn/configuration.rb