Class: PayrollHero::Api::V2::Worksites

Inherits:
BaseGroup
  • Object
show all
Defined in:
lib/payroll_hero/api/v2/worksites.rb

Overview

Worksites 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

#list(page: nil, per_page: nil) ⇒ Hashie::Mash

implements the interface to the Worksites List endpoint

Parameters:

  • page (Fixnum) (defaults to: nil)
  • per_page (Fixnum) (defaults to: nil)

Returns:

  • (Hashie::Mash)


12
13
14
15
16
17
18
19
# File 'lib/payroll_hero/api/v2/worksites.rb', line 12

def list(page: nil, per_page: nil)
  params = {
    page: page,
    per_page: per_page,
  }
  remove_nil_values_from!(params)
  client.get("/api/v2/worksites", params)
end