class ChangeHealth::Configuration

Attributes

client_id[RW]
client_secret[RW]
grant_type[RW]

Public Class Methods

new() click to toggle source
# File lib/change_health.rb, line 25
def initialize
  @client_id     = nil
  @client_secret = nil
  @grant_type    = :client_credentials
end

Public Instance Methods

api_endpoint() click to toggle source
# File lib/change_health.rb, line 35
def api_endpoint
  return Connection.base_uri
end
api_endpoint=(endpoint) click to toggle source
# File lib/change_health.rb, line 31
def api_endpoint=(endpoint)
  Connection.base_uri(endpoint.freeze)
end
from_h(h) click to toggle source
# File lib/change_health.rb, line 48
def from_h(h)
  self.client_id     = h[:client_id]
  self.client_secret = h[:client_secret]
  self.grant_type    = h[:grant_type]
  self.api_endpoint  = h[:api_endpoint]

  return self
end
to_h() click to toggle source
# File lib/change_health.rb, line 39
def to_h
  return {
    client_id: @client_id,
    client_secret: @client_secret,
    grant_type: @grant_type,
    api_endpoint: api_endpoint
  }
end