Class: Zara4::API::Communication::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/zara4/api/communication/config.rb

Constant Summary collapse

USER_AGENT =
'Zara 4 RUBY-SDK, Version-' + Zara4::API::VERSION
PRODUCTION_API_ENDPOINT =
'https://api.zara4.com'
DEVELOPMENT_API_ENDPOINT =
'http://api.zara4.dev'
@@BASE_URL =
PRODUCTION_API_ENDPOINT

Class Method Summary collapse

Class Method Details

.api_endpoint_urlObject

Get the base url of the API endpoint.



15
16
17
# File 'lib/zara4/api/communication/config.rb', line 15

def self.api_endpoint_url
  return @@BASE_URL
end

.enter_development_modeObject

Configure development mode.



31
32
33
# File 'lib/zara4/api/communication/config.rb', line 31

def self.enter_development_mode
  @@BASE_URL = DEVELOPMENT_API_ENDPOINT
end

.enter_production_modeObject

Configure production mode.



23
24
25
# File 'lib/zara4/api/communication/config.rb', line 23

def self.enter_production_mode
  @@BASE_URL = PRODUCTION_API_ENDPOINT
end