Sha256: 4d43b9c3aacf460b89978e626b75b9be6441afa39cb6f81e1f561b5e7a6ea809

Contents?: true

Size: 603 Bytes

Versions: 1

Compression:

Stored size: 603 Bytes

Contents

module DpdApi
  class << self
    attr_accessor :configuration
  end

  def self.configure
    self.configuration ||= Configuration.new
    yield(configuration)
  end

  class Configuration
    attr_accessor :client_key,
                  :client_number,
                  :base_url

    attr_reader :auth_params

    def initialize
      @client_key    = '123'
      @client_number = '234'
      @base_url      = 'http://wstest.dpd.ru'
    end

    def auth_params
      {
        auth: {
          client_number: client_number,
          client_key:    client_key,
        }
      }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dpd_api-0.0.1 lib/dpd_api/configuration.rb