Module: Allorails

Defined in:
lib/allorails.rb,
lib/allorails/core.rb,
lib/allorails/rails.rb,
lib/allorails/api/api.rb,
lib/allorails/errors/errors.rb,
lib/allorails/response/model.rb,
lib/allorails/request/request.rb,
lib/allorails/response/api_response.rb,
lib/allorails/response/api_mapping_response.rb

Defined Under Namespace

Modules: Core, Rails, Request, Response Classes: AllopassApikitError, Api, ApiConfAccountNotFoundError, ApiConfFileCorruptedError, ApiConfFileMissingError, ApiConfFileMissingSectionError, ApiFalseResponseSignatureError, ApiMissingHashFeatureError, ApiRemoteErrorError, ApiUnavailableResourceError, ApiWrongFormatResponseError, Base, Code, Country, Keyword, Market, Partner, Payout, PhoneNumber, Price, Pricepoint, Railtie, Region, Website

Constant Summary collapse

@@config =
nil

Class Method Summary collapse

Class Method Details

.config(options = {}) ⇒ Object

The global configuration for Allorails generally you would set your configuration options once, after loading the allorails gem.

Allorails.config({
  :accounts => {
    :your@email.com => {
      :api_key => 'API_KEY',
      :private_key => 'PRIVATE_KEY'
    }
  },
  :network_port => PORT
})


139
140
141
142
143
# File 'lib/allorails/core.rb', line 139

def config options = {}
  @@config ||= Core::Configuration.new
  @@config = @@config.with(options) unless options.empty?
  @@config
end