Module: Fortnox::API
- Extended by:
- Dry::Configurable
- Defined in:
- lib/fortnox/api.rb,
lib/fortnox/api/types.rb,
lib/fortnox/api/version.rb,
lib/fortnox/api/models/base.rb,
lib/fortnox/api/models/unit.rb,
lib/fortnox/api/types/enums.rb,
lib/fortnox/api/types/model.rb,
lib/fortnox/api/types/sized.rb,
lib/fortnox/api/mappers/base.rb,
lib/fortnox/api/mappers/unit.rb,
lib/fortnox/api/models/label.rb,
lib/fortnox/api/models/order.rb,
lib/fortnox/api/mappers/order.rb,
lib/fortnox/api/models/article.rb,
lib/fortnox/api/models/invoice.rb,
lib/fortnox/api/models/project.rb,
lib/fortnox/api/types/nullable.rb,
lib/fortnox/api/types/required.rb,
lib/fortnox/api/mappers/article.rb,
lib/fortnox/api/mappers/invoice.rb,
lib/fortnox/api/mappers/project.rb,
lib/fortnox/api/models/customer.rb,
lib/fortnox/api/models/document.rb,
lib/fortnox/api/types/defaulted.rb,
lib/fortnox/api/types/order_row.rb,
lib/fortnox/api/mappers/customer.rb,
lib/fortnox/api/request_handling.rb,
lib/fortnox/api/mappers/order_row.rb,
lib/fortnox/api/repositories/base.rb,
lib/fortnox/api/repositories/unit.rb,
lib/fortnox/api/types/invoice_row.rb,
lib/fortnox/api/mappers/value/date.rb,
lib/fortnox/api/mappers/value/hash.rb,
lib/fortnox/api/repositories/order.rb,
lib/fortnox/api/types/document_row.rb,
lib/fortnox/api/mappers/invoice_row.rb,
lib/fortnox/api/mappers/value/array.rb,
lib/fortnox/api/mappers/base/to_json.rb,
lib/fortnox/api/repositories/article.rb,
lib/fortnox/api/repositories/invoice.rb,
lib/fortnox/api/repositories/project.rb,
lib/fortnox/api/repositories/customer.rb,
lib/fortnox/api/types/edi_information.rb,
lib/fortnox/api/mappers/base/from_json.rb,
lib/fortnox/api/mappers/value/identity.rb,
lib/fortnox/api/mappers/edi_information.rb,
lib/fortnox/api/models/terms_of_payment.rb,
lib/fortnox/api/types/default_templates.rb,
lib/fortnox/api/types/email_information.rb,
lib/fortnox/api/mappers/terms_of_payment.rb,
lib/fortnox/api/repositories/base/savers.rb,
lib/fortnox/api/mappers/default_templates.rb,
lib/fortnox/api/mappers/email_information.rb,
lib/fortnox/api/repositories/base/loaders.rb,
lib/fortnox/api/types/shim/country_string.rb,
lib/fortnox/api/repositories/authentication.rb,
lib/fortnox/api/mappers/value/country_string.rb,
lib/fortnox/api/types/default_delivery_types.rb,
lib/fortnox/api/repositories/terms_of_payment.rb,
lib/fortnox/api/mappers/default_delivery_types.rb,
lib/fortnox/api/mappers/base/canonical_name_sym.rb
Defined Under Namespace
Modules: Mapper, Model, Repository, RequestHandling, Types
Classes: AttributeError, Exception, MissingAccessToken, MissingAttributeError, MissingConfiguration, RemoteServerError
Constant Summary
collapse
- DEFAULT_CONFIGURATION =
{
base_url: 'https://api.fortnox.se/3/',
token_url: 'https://apps.fortnox.se/oauth-v1/token',
debugging: false,
logger: lambda {
logger = Logger.new($stdout)
logger.level = Logger::WARN
return logger
}.call
}.freeze
- Registry =
Dry::Container.new
- VERSION =
'0.9.0'
Class Method Summary
collapse
Class Method Details
.access_token ⇒ Object
34
35
36
|
# File 'lib/fortnox/api.rb', line 34
def self.access_token
Thread.current[:access_token]
end
|
.access_token=(token) ⇒ Object
30
31
32
|
# File 'lib/fortnox/api.rb', line 30
def self.access_token=(token)
Thread.current[:access_token] = token
end
|