Class: FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules
- Inherits:
-
Object
- Object
- FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules
- Defined in:
- lib/finch_api/resources/hris/company/pay_statement_item/rules.rb
Instance Method Summary collapse
-
#create(attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) ⇒ FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse
Beta: this endpoint currently serves employers onboarded after March 4th and historical support will be added soon Custom rules can be created to associate specific attributes to pay statement items depending on the use case.
-
#delete(rule_id, request_options: {}) ⇒ FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse
Beta: this endpoint currently serves employers onboarded after March 4th and historical support will be added soon Delete a rule for a pay statement item.
-
#initialize(client:) ⇒ Rules
constructor
private
A new instance of Rules.
-
#list(request_options: {}) ⇒ FinchAPI::Internal::ResponsesPage<FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse>
Beta: this endpoint currently serves employers onboarded after March 4th and historical support will be added soon List all rules of a connection account.
-
#update(rule_id, optional_property: nil, request_options: {}) ⇒ FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse
Beta: this endpoint currently serves employers onboarded after March 4th and historical support will be added soon Update a rule for a pay statement item.
Constructor Details
#initialize(client:) ⇒ Rules
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 Rules.
110 111 112 |
# File 'lib/finch_api/resources/hris/company/pay_statement_item/rules.rb', line 110 def initialize(client:) @client = client end |
Instance Method Details
#create(attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) ⇒ FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse
Beta: this endpoint currently serves employers onboarded after March 4th and historical support will be added soon Custom rules can be created to associate specific attributes to pay statement items depending on the use case. For example, pay statement items that meet certain conditions can be labeled as a pre-tax 401k. This metadata can be retrieved where pay statement item information is available.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/finch_api/resources/hris/company/pay_statement_item/rules.rb', line 33 def create(params = {}) parsed, = FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams.dump_request(params) @client.request( method: :post, path: "employer/pay-statement-item/rule", body: parsed, model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse, options: ) end |
#delete(rule_id, request_options: {}) ⇒ FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse
Beta: this endpoint currently serves employers onboarded after March 4th and historical support will be added soon Delete a rule for a pay statement item.
98 99 100 101 102 103 104 105 |
# File 'lib/finch_api/resources/hris/company/pay_statement_item/rules.rb', line 98 def delete(rule_id, params = {}) @client.request( method: :delete, path: ["employer/pay-statement-item/rule/%1$s", rule_id], model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse, options: params[:request_options] ) end |
#list(request_options: {}) ⇒ FinchAPI::Internal::ResponsesPage<FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse>
Beta: this endpoint currently serves employers onboarded after March 4th and historical support will be added soon List all rules of a connection account.
77 78 79 80 81 82 83 84 85 |
# File 'lib/finch_api/resources/hris/company/pay_statement_item/rules.rb', line 77 def list(params = {}) @client.request( method: :get, path: "employer/pay-statement-item/rule", page: FinchAPI::Internal::ResponsesPage, model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse, options: params[:request_options] ) end |
#update(rule_id, optional_property: nil, request_options: {}) ⇒ FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse
Beta: this endpoint currently serves employers onboarded after March 4th and historical support will be added soon Update a rule for a pay statement item.
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/finch_api/resources/hris/company/pay_statement_item/rules.rb', line 56 def update(rule_id, params = {}) parsed, = FinchAPI::HRIS::Company::PayStatementItem::RuleUpdateParams.dump_request(params) @client.request( method: :put, path: ["employer/pay-statement-item/rule/%1$s", rule_id], body: parsed, model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse, options: ) end |