Sha256: 52f20a34e5b127a760dfb219838f36f295851c4895b21db60f663231caf0dd61

Contents?: true

Size: 583 Bytes

Versions: 3

Compression:

Stored size: 583 Bytes

Contents

# frozen_string_literal: true
module Correios
  module CEP
    module Config
      WEB_SERVICE_URL = 'https://apps.correios.com.br/SigepMasterJPA/AtendeClienteService/AtendeCliente'
      DEFAULT_REQUEST_TIMEOUT = 5 # seconds

      attr_accessor :logger, :proxy_url
      attr_writer :request_timeout, :web_service_url

      def request_timeout
        (@request_timeout ||= DEFAULT_REQUEST_TIMEOUT).to_i
      end

      def web_service_url
        @web_service_url ||= WEB_SERVICE_URL
      end

      def configure
        yield self if block_given?
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
correios-cep-0.8.0 lib/correios/cep/config.rb
correios-cep-0.7.1 lib/correios/cep/config.rb
correios-cep-0.7.0 lib/correios/cep/config.rb