Class: Nova::API::Base
Direct Known Subclasses
Resource::Apportionment, Resource::ApportionmentValue, Resource::Bill, Resource::Company, Resource::CurrentAsset, Resource::DirectBill, Resource::FinancialAccount, Resource::Installment, Resource::Permission, Resource::ThirdParty, Resource::Webhook, Resource::WriteOff
Constant Summary
collapse
- SCHEME =
'https'
- PRODUCTION_HOST =
'nova.money'
- STAGING_HOST =
'staging.nova.money'
Utils::BaseStruct::DATE_REGEX
Class Method Summary
collapse
Instance Method Summary
collapse
#allowed_attributes
Class Method Details
.base_url ⇒ Object
15
16
17
18
19
20
21
|
# File 'lib/nova/api/base.rb', line 15
def self.base_url
raise Nova::API::MissingSubdomainError, 'The subdomain must be informed' if configuration.subdomain.nil? || configuration.subdomain.empty?
host = configuration.use_staging? ? STAGING_HOST : PRODUCTION_HOST
"#{SCHEME}://#{configuration.subdomain}.#{host}"
end
|
.endpoint ⇒ Object
11
12
13
|
# File 'lib/nova/api/base.rb', line 11
def self.endpoint
raise EndpointNotConfiguredError, 'Each class must implement its own endpoint'
end
|
Instance Method Details
#endpoint ⇒ Object
24
25
26
|
# File 'lib/nova/api/base.rb', line 24
def endpoint
raise EndpointNotConfiguredError, 'Each class must implement its own endpoint'
end
|