Module: Fulfil

Defined in:
lib/fulfil.rb,
lib/fulfil/error.rb,
lib/fulfil/model.rb,
lib/fulfil/query.rb,
lib/fulfil/client.rb,
lib/fulfil/version.rb,
lib/fulfil/rate_limit.rb,
lib/fulfil/configuration.rb,
lib/fulfil/response_parser.rb,
lib/fulfil/response_handler.rb,
lib/fulfil/interactive_report.rb,
lib/fulfil/rate_limit_headers.rb

Defined Under Namespace

Modules: ResponseParser Classes: Client, Configuration, Error, HttpError, InteractiveReport, Model, Query, RateLimit, RateLimitExceeded, RateLimitHeaders, ResponseHandler

Constant Summary collapse

SUBDOMAIN =
ENV.fetch('FULFIL_SUBDOMAIN', nil)
API_KEY =
ENV.fetch('FULFIL_API_KEY', nil)
VERSION =
'0.8.1'

Class Method Summary collapse

Class Method Details

.configFulfil::Configuration

Returns Fulfil’s configuration.

Returns:



51
52
53
# File 'lib/fulfil/configuration.rb', line 51

def self.config
  @config ||= Configuration.new
end

.config=(configuration) ⇒ Fulfil::Configuration

Allows setting a new configuration for Fulfil.

Returns:



57
58
59
# File 'lib/fulfil/configuration.rb', line 57

def self.config=(configuration)
  @config = configuration
end

.configure {|config| ... } ⇒ Object

Allows modifying Fulfil’s configuration.

Example usage:

Fulfil.configure do |config|
  config.api_key = "..."
end

Yields:



69
70
71
# File 'lib/fulfil/configuration.rb', line 69

def self.configure
  yield(config)
end

.rate_limitObject



17
18
19
# File 'lib/fulfil.rb', line 17

def self.rate_limit
  @rate_limit ||= RateLimit.new
end