Module: NovaposhtaApi

Defined in:
lib/novaposhta_api.rb,
lib/novaposhta_api/model.rb,
lib/novaposhta_api/rails.rb,
lib/novaposhta_api/client.rb,
lib/novaposhta_api/version.rb,
lib/novaposhta_api/resource.rb,
lib/novaposhta_api/collection.rb,
lib/novaposhta_api/http_client.rb,
lib/novaposhta_api/models/city.rb,
lib/novaposhta_api/configuration.rb,
lib/novaposhta_api/models/warehouse.rb,
lib/novaposhta_api/models/settlement.rb,
lib/novaposhta_api/models/counterparty.rb,
lib/novaposhta_api/models/contact_person.rb,
lib/novaposhta_api/resources/city_resource.rb,
lib/novaposhta_api/models/internet_document.rb,
lib/novaposhta_api/models/tracking_document.rb,
lib/novaposhta_api/middlewares/error_handling.rb,
lib/novaposhta_api/models/counterparty_address.rb,
lib/novaposhta_api/resources/warehouse_resource.rb,
lib/novaposhta_api/resources/settlement_resource.rb,
lib/novaposhta_api/resources/counterparty_resource.rb,
lib/novaposhta_api/resources/internet_document_resource.rb,
lib/novaposhta_api/resources/tracking_document_resource.rb

Defined Under Namespace

Modules: Middlewares, Models, Resources Classes: Client, Collection, Configuration, Engine, HttpClient, Model, Resource

Constant Summary collapse

Error =
Class.new(StandardError)
ResourceError =
Class.new(Error)
ResponseError =
Class.new(Error)
VERSION =
'0.2.1'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject



45
46
47
# File 'lib/novaposhta_api.rb', line 45

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

Class Method Details

.resetObject



49
50
51
# File 'lib/novaposhta_api.rb', line 49

def self.reset
  @configuration = Configuration.new
end

.setup {|configuration| ... } ⇒ Object

Examples:

NovaposhtaApi.setup do |config|
  config.api_url = 'https://api.novaposhta.ua/v2.0/json/'
end

Yields:



58
59
60
# File 'lib/novaposhta_api.rb', line 58

def self.setup
  yield configuration
end