Class: FinchAPI::Resources::HRIS::Payments

Inherits:
Object
  • Object
show all
Defined in:
lib/finch-api/resources/hris/payments.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Payments

Returns a new instance of Payments.

Parameters:



33
34
35
# File 'lib/finch-api/resources/hris/payments.rb', line 33

def initialize(client:)
  @client = client
end

Instance Method Details

#list(params) ⇒ FinchAPI::SinglePage<FinchAPI::Models::HRIS::Payment>

Read payroll and contractor related payments by the company.

Parameters:

  • params (FinchAPI::Models::HRIS::PaymentListParams, Hash{Symbol=>Object})

    .

    @option params [Date] :end_date The end date to retrieve payments by a company (inclusive) in ‘YYYY-MM-DD`

    format.
    

    @option params [Date] :start_date The start date to retrieve payments by a company (inclusive) in ‘YYYY-MM-DD`

    format.
    

    @option params [FinchAPI::RequestOptions, HashSymbol=>Object, nil] :request_options

Returns:



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/finch-api/resources/hris/payments.rb', line 20

def list(params)
  parsed, options = FinchAPI::Models::HRIS::PaymentListParams.dump_request(params)
  @client.request(
    method: :get,
    path: "employer/payment",
    query: parsed,
    page: FinchAPI::SinglePage,
    model: FinchAPI::Models::HRIS::Payment,
    options: options
  )
end