class PayrollHero::Api::BaseGroup
Attributes
client[R]
Public Class Methods
new(token)
click to toggle source
# File lib/payroll_hero/api/base_group.rb, line 5 def initialize(token) @client = new_client(token, :core) end
Private Instance Methods
base_url_for(name)
click to toggle source
# File lib/payroll_hero/api/base_group.rb, line 14 def base_url_for(name) PayrollHero::Api.send("#{name}_base_url") end
new_client(token, name)
click to toggle source
# File lib/payroll_hero/api/base_group.rb, line 18 def new_client(token, name) Client.new(token, base_url_for(name)) end
remove_empty_values_from!(hash)
click to toggle source
# File lib/payroll_hero/api/base_group.rb, line 26 def remove_empty_values_from!(hash) hash.delete_if { |_, value| value.nil? || value.empty? } end
remove_nil_values_from!(hash)
click to toggle source
# File lib/payroll_hero/api/base_group.rb, line 22 def remove_nil_values_from!(hash) hash.delete_if { |_, value| value.nil? } end