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

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Payments.

Parameters:



38
39
40
# File 'lib/finch_api/resources/hris/payments.rb', line 38

def initialize(client:)
  @client = client
end

Instance Method Details

#list(end_date: , start_date: , request_options: {}) ⇒ FinchAPI::Internal::SinglePage<FinchAPI::HRIS::Payment>

Some parameter documentations has been truncated, see Models::HRIS::PaymentListParams for more details.

Read payroll and contractor related payments by the company.

Parameters:

  • end_date (Date)

    The end date to retrieve payments by a company (inclusive) in ‘YYYY-MM-DD` forma

  • start_date (Date)

    The start date to retrieve payments by a company (inclusive) in ‘YYYY-MM-DD` for

  • request_options (FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/finch_api/resources/hris/payments.rb', line 23

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