Class: Bob::MetaData::TimeOffPolicies
- Inherits:
-
API
- Object
- API
- Bob::MetaData::TimeOffPolicies
show all
- Defined in:
- lib/bob/api/metadata/time_off_policies.rb
Constant Summary
Constants inherited
from API
API::BASE_URL, API::SANDBOX_URL
Class Method Summary
collapse
Methods inherited from API
build_url, create_csv, delete, get, headers, post, post_file, post_media, put
Class Method Details
.all ⇒ Object
6
7
8
|
# File 'lib/bob/api/metadata/time_off_policies.rb', line 6
def self.all
get('timeoff/policy-types')['policyTypes']
end
|
.find(policy_name) ⇒ Object
10
11
12
13
|
# File 'lib/bob/api/metadata/time_off_policies.rb', line 10
def self.find(policy_name)
response = get('timeoff/policies', { policyName: policy_name })
BaseParser.new(response).fields
end
|
.names_for(policy_name) ⇒ Object
15
16
17
|
# File 'lib/bob/api/metadata/time_off_policies.rb', line 15
def self.names_for(policy_name)
get('timeoff/policies/names', { policyTypeName: policy_name })['policies']
end
|