class PeopleGroup::Connectors::PTORoots

Public Class Methods

new() click to toggle source
# File lib/peoplegroup/connectors/pto_roots.rb, line 8
def initialize
  ::Splinter.configure do |config|
    config.api_key = ENV['PTO_ROOTS_API_KEY']
  end
end

Public Instance Methods

pto(params) click to toggle source
# File lib/peoplegroup/connectors/pto_roots.rb, line 14
def pto(params)
  Splinter::OOOEvents.get_all(params)
end
pto_type(type) click to toggle source
# File lib/peoplegroup/connectors/pto_roots.rb, line 18
def pto_type(type)
  pto_types.find { |pto_type| pto_type['name'] == type }
end

Private Instance Methods

pto_types() click to toggle source
# File lib/peoplegroup/connectors/pto_roots.rb, line 24
def pto_types
  Splinter::OOOTypes.get_all
end