Module: Paychex

Extended by:
Configuration
Defined in:
lib/paychex.rb,
lib/paychex/api.rb,
lib/paychex/error.rb,
lib/paychex/client.rb,
lib/paychex/request.rb,
lib/paychex/version.rb,
lib/paychex/connection.rb,
lib/paychex/client/auth.rb,
lib/paychex/client/jobs.rb,
lib/paychex/configuration.rb,
lib/paychex/client/workers.rb,
lib/paychex/client/companies.rb,
lib/paychex/client/locations.rb,
lib/paychex/client/pay_rates.rb,
lib/paychex/client/job_titles.rb,
lib/paychex/client/federal_tax.rb,
lib/paychex/client/organizations.rb,
lib/paychex/client/direct_deposit.rb,
lib/paychex/client/labor_assignments.rb

Defined Under Namespace

Modules: Configuration, Connection, Request Classes: API, BadGateway, BadRequest, Client, Error, GatewayTimeout, InternalServerError, MissingRequiredArgument, NoAccess, NotFound, ServiceUnavailable, Unauthorized

Constant Summary collapse

VERSION =
'0.3.5'

Constants included from Configuration

Configuration::DEFAULT_ACCESS_TOKEN, Configuration::DEFAULT_CONNECTION_OPTIONS, Configuration::DEFAULT_ENDPOINT, Configuration::DEFAULT_ENVIRONMENT, Configuration::DEFAULT_FORMAT, Configuration::DEFAULT_HOST, Configuration::DEFAULT_OPEN_TIMEOUT, Configuration::DEFAULT_PER_PAGE, Configuration::DEFAULT_PROXY, Configuration::DEFAULT_TIMEOUT, Configuration::DEFAULT_TOKEN_TIMEOUT, Configuration::DEFAULT_USER_AGENT, Configuration::VALID_FORMATS, Configuration::VALID_OPTIONS_KEYS

Class Method Summary collapse

Methods included from Configuration

configure, extended, options, reset

Class Method Details

.client(options = {}) ⇒ Paychex::Client

Alias for Paychex::Client.new

Returns:



12
13
14
# File 'lib/paychex.rb', line 12

def self.client(options = {})
  ::Paychex::Client.new(options)
end

.method_missing(method, *args, &block) ⇒ Object

Delegate to Paychex::Client



17
18
19
20
21
# File 'lib/paychex.rb', line 17

def self.method_missing(method, *args, &block)
  return super unless client.respond_to?(method)

  client.send(method, *args, &block)
end

.respond_to?(method, include_all = false) ⇒ Boolean

Delegate to Paychex::Client

Returns:

  • (Boolean)


24
25
26
# File 'lib/paychex.rb', line 24

def self.respond_to?(method, include_all = false)
  client.respond_to?(method, include_all) || super
end