Sha256: 7fbada874f2e4566b51f963559e6500caa9414ece3920017eeec2975582569c5

Contents?: true

Size: 590 Bytes

Versions: 8

Compression:

Stored size: 590 Bytes

Contents

require "paychex/connection"
require "paychex/request"
require "paychex/configuration"

module Paychex
  class API
    include Connection
    include Request

    attr_accessor *Paychex::Configuration::VALID_OPTIONS_KEYS

    # Creates a new API
    def initialize(options = {})
      options = Paychex.options.merge(options)
      Configuration::VALID_OPTIONS_KEYS.each do |key|
        send("#{key}=", options[key])
      end
    end

    def config
      conf = {}
      Configuration::VALID_OPTIONS_KEYS.each do |key|
        conf[key] = send key
      end
      conf
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
paychex-0.3.3 lib/paychex/api.rb
paychex-0.3.2 lib/paychex/api.rb
paychex-0.3.1 lib/paychex/api.rb
paychex-0.3.0 lib/paychex/api.rb
paychex-0.2.2 lib/paychex/api.rb
paychex-0.2.1 lib/paychex/api.rb
paychex-0.2.0 lib/paychex/api.rb
paychex-0.1.1 lib/paychex/api.rb