Sha256: d0b1ffe5f96a7bf638e49972294d073f49cb6ac778039dc229e65c7c6e3d58b9

Contents?: true

Size: 651 Bytes

Versions: 2

Compression:

Stored size: 651 Bytes

Contents

module SantanderChile
  module ApiClient
    class Client
      class Configuration
        ATTRIBUTES = %i[
          client_id
          canal_id
          canal_fisico
          canal_logico
          faraday
        ].freeze
        attr_accessor(*ATTRIBUTES)

        def initialize
          self.canal_id = "078"
          self.canal_fisico = "78"
          self.canal_logico = "74"
          self.faraday = ->(faraday) { }
        end

        def validate!
          ATTRIBUTES.each do |key|
            raise "Missing config value for `#{key}`!" if instance_variable_get("@#{key}").nil?
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
santander_chile-api_client-1.1.1 lib/santander_chile/api_client/client/configuration.rb
santander_chile-api_client-1.1.0 lib/santander_chile/api_client/client/configuration.rb