Class: PayrollHero::Api::V4::Leaves

Inherits:
BaseGroup
  • Object
show all
Defined in:
lib/payroll_hero/api/v4/leaves.rb

Overview

Leaves Endpoint

Instance Attribute Summary

Attributes inherited from BaseGroup

#client

Instance Method Summary collapse

Methods inherited from BaseGroup

#initialize

Constructor Details

This class inherits a constructor from PayrollHero::Api::BaseGroup

Instance Method Details

#create(attributes) ⇒ Hashie::Mash

Creates a leave record.

Parameters:

  • attributes (Hash)
    • Attributes of the Leave to be created.

Returns:

  • (Hashie::Mash)


10
11
12
# File 'lib/payroll_hero/api/v4/leaves.rb', line 10

def create(attributes)
  client.post("/api/v4/leaves", attributes)
end

#destroy(id, **params) ⇒ Object



14
15
16
# File 'lib/payroll_hero/api/v4/leaves.rb', line 14

def destroy(id, **params)
  client.delete("/api/v4/leaves/#{id}", params)
end