Module: Circuit

Defined in:
lib/circuit.rb

Constant Summary collapse

API_BASE_URL =
'https://www.circuit.com/'.freeze
API_SANDBOX_BASE_URL =
'https://circuitsandbox.net/'.freeze
API_PATH_BASE =
'rest/v2/'.freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_client_idObject

Returns the value of attribute api_client_id.



27
28
29
# File 'lib/circuit.rb', line 27

def api_client_id
  @api_client_id
end

.api_client_secretObject

Returns the value of attribute api_client_secret.



27
28
29
# File 'lib/circuit.rb', line 27

def api_client_secret
  @api_client_secret
end

.bearer_tokenObject

Returns the value of attribute bearer_token.



27
28
29
# File 'lib/circuit.rb', line 27

def bearer_token
  @bearer_token
end

.loggerObject

Returns the value of attribute logger.



27
28
29
# File 'lib/circuit.rb', line 27

def logger
  @logger
end

.sandboxObject

Returns the value of attribute sandbox.



27
28
29
# File 'lib/circuit.rb', line 27

def sandbox
  @sandbox
end

Class Method Details

.api_urlObject



35
36
37
# File 'lib/circuit.rb', line 35

def api_url
  URI.join(base_url, API_PATH_BASE)
end

.base_urlObject



29
30
31
32
33
# File 'lib/circuit.rb', line 29

def base_url
  return API_SANDBOX_BASE_URL if sandbox

  API_BASE_URL
end