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:



40
41
42
# File 'lib/finch_api/resources/hris/payments.rb', line 40

def initialize(client:)
  @client = client
end

Instance Method Details

#list(end_date: , start_date: , entity_ids: nil, request_options: {}) ⇒ FinchAPI::Internal::SinglePage<FinchAPI::Models::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

  • entity_ids (Array<String>)

    The entity IDs to specify which entities’ data to access.

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

Returns:

See Also:



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

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