Class: FinchAPI::Resources::Payroll::PayGroups
- Inherits:
-
Object
- Object
- FinchAPI::Resources::Payroll::PayGroups
- Defined in:
- lib/finch_api/resources/payroll/pay_groups.rb,
sig/finch_api/resources/payroll/pay_groups.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ PayGroups
constructor
private
A new instance of PayGroups.
-
#list(entity_ids: nil, individual_id: nil, pay_frequencies: nil, request_options: {}) ⇒ FinchAPI::Internal::SinglePage<FinchAPI::Models::Payroll::PayGroupListResponse>
Some parameter documentations has been truncated, see Models::Payroll::PayGroupListParams for more details.
-
#retrieve(pay_group_id, entity_ids: nil, request_options: {}) ⇒ FinchAPI::Models::Payroll::PayGroupRetrieveResponse
Some parameter documentations has been truncated, see Models::Payroll::PayGroupRetrieveParams for more details.
Constructor Details
#initialize(client:) ⇒ PayGroups
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 PayGroups.
71 72 73 |
# File 'lib/finch_api/resources/payroll/pay_groups.rb', line 71 def initialize(client:) @client = client end |
Instance Method Details
#list(entity_ids: nil, individual_id: nil, pay_frequencies: nil, request_options: {}) ⇒ FinchAPI::Internal::SinglePage<FinchAPI::Models::Payroll::PayGroupListResponse>
Some parameter documentations has been truncated, see Models::Payroll::PayGroupListParams for more details.
Read company pay groups and frequencies
54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/finch_api/resources/payroll/pay_groups.rb', line 54 def list(params = {}) parsed, = FinchAPI::Payroll::PayGroupListParams.dump_request(params) query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "employer/pay-groups", query: query, page: FinchAPI::Internal::SinglePage, model: FinchAPI::Models::Payroll::PayGroupListResponse, security: {bearer_auth: true}, options: ) end |
#retrieve(pay_group_id, entity_ids: nil, request_options: {}) ⇒ FinchAPI::Models::Payroll::PayGroupRetrieveResponse
Some parameter documentations has been truncated, see Models::Payroll::PayGroupRetrieveParams for more details.
Read information from a single pay group
23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/finch_api/resources/payroll/pay_groups.rb', line 23 def retrieve(pay_group_id, params = {}) parsed, = FinchAPI::Payroll::PayGroupRetrieveParams.dump_request(params) query = FinchAPI::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: ["employer/pay-groups/%1$s", pay_group_id], query: query, model: FinchAPI::Models::Payroll::PayGroupRetrieveResponse, security: {bearer_auth: true}, options: ) end |