class Redox::Configuration

Attributes

api_key[RW]
secret[RW]

Public Class Methods

new() click to toggle source
# File lib/redox.rb, line 39
def initialize
  @api_key  =  nil
  @secret   =  nil
end

Public Instance Methods

api_endpoint() click to toggle source
# File lib/redox.rb, line 48
def api_endpoint
  return Connection.base_uri
end
api_endpoint=(endpoint) click to toggle source
# File lib/redox.rb, line 44
def api_endpoint=(endpoint)
  Connection.base_uri(endpoint.freeze)
end
from_h(h) click to toggle source
# File lib/redox.rb, line 69
def from_h(h)
  self.api_key = h[:api_key]
  self.secret  = h[:secret]
  self.api_endpoint = h[:api_endpoint]
  self.token_expiry_padding = h[:token_expiry_padding]

  return self
end
to_h() click to toggle source
# File lib/redox.rb, line 60
def to_h
  return {
    api_key: @api_key,
    secret: @secret,
    api_endpoint: api_endpoint,
    token_expiry_padding: token_expiry_padding
  }
end
token_expiry_padding() click to toggle source
# File lib/redox.rb, line 56
def token_expiry_padding
  return Authentication.token_expiry_padding
end
token_expiry_padding=(time_in_seconds) click to toggle source
# File lib/redox.rb, line 52
def token_expiry_padding=(time_in_seconds)
  Authentication.token_expiry_padding = time_in_seconds
end