Sha256: 8630c535b6ce88d796b3d23c7de0e6809518496cf5307edf1c8ea2adaa8231e4

Contents?: true

Size: 933 Bytes

Versions: 7

Compression:

Stored size: 933 Bytes

Contents

# frozen_string_literal: true

module BrregGrunndata
  # Contains configuration for the web service client
  class Configuration
    # WSDL is located at this URL
    WSDL_URL = 'https://ws.brreg.no/grunndata/ErFr?WSDL'

    # We have a saved WSDL at this location on disk
    WSDL_PATH = "#{__dir__}/wsdl/grunndata.xml"

    attr_reader :userid, :password,
                :open_timeout, :read_timeout,
                :logger, :log_level,
                :wsdl

    # rubocop:disable Metrics/ParameterLists
    def initialize(
      userid:,
      password:,
      open_timeout: 15,
      read_timeout: 15,
      logger: nil,
      log_level: :info,
      wsdl: WSDL_PATH
    )
      @userid = userid
      @password = password
      @open_timeout = open_timeout
      @read_timeout = read_timeout
      @logger = logger
      @log_level = log_level
      @wsdl = wsdl
    end
    # rubocop:enable Metrics/ParameterLists
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
brreg_grunndata-0.1.6 lib/brreg_grunndata/configuration.rb
brreg_grunndata-0.1.5 lib/brreg_grunndata/configuration.rb
brreg_grunndata-0.1.4 lib/brreg_grunndata/configuration.rb
brreg_grunndata-0.1.3 lib/brreg_grunndata/configuration.rb
brreg_grunndata-0.1.2 lib/brreg_grunndata/configuration.rb
brreg_grunndata-0.1.1 lib/brreg_grunndata/configuration.rb
brreg_grunndata-0.1.0 lib/brreg_grunndata/configuration.rb