Module: InPostUKAPI

Defined in:
lib/inpost_uk_api.rb,
lib/inpost_uk_api/version.rb,
lib/inpost_uk_api/configuration.rb,
lib/inpost_uk_api/resources/base.rb,
lib/inpost_uk_api/resources/return.rb,
lib/inpost_uk_api/resources/tracking.rb,
lib/inpost_uk_api/resources/return_label.rb

Defined Under Namespace

Classes: Base, Configuration, Return, ReturnLabel, Tracking

Constant Summary collapse

VERSION =
'0.2.5'

Class Method Summary collapse

Class Method Details

.after_configureObject



16
17
18
19
# File 'lib/inpost_uk_api/configuration.rb', line 16

def after_configure
  InPostUKAPI::Base.site = config.site
  InPostUKAPI::Base.connection.bearer_token = config.api_token
end

.configObject



7
8
9
# File 'lib/inpost_uk_api/configuration.rb', line 7

def config
  @config ||= Configuration.new
end

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

Yields:



11
12
13
14
# File 'lib/inpost_uk_api/configuration.rb', line 11

def configure
  yield config
  after_configure
end