diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b10d67af..c5407a00 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.44" + ".": "0.1.0-alpha.45" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index b7a7420d..431aa1d4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 48 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-7e39b6a20bf3e1f23ad832300b73ae92b6f6ce7c9d86eaa8fcc0710b51455f17.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch/finch-ecd3f6c28edae07dbe9f54d8040a6d7f2af5ac032b20f8df06065542478e4e73.yml openapi_spec_hash: 5e0e04e7274494062ff46ac85d358f5b -config_hash: 8b3c2a32014346513c18d98cbb752d2c +config_hash: 9ae56f40cec7304896138bfad5caf748 diff --git a/CHANGELOG.md b/CHANGELOG.md index a36b7e8d..a27c09fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.1.0-alpha.45 (2026-06-22) + +Full Changelog: [v0.1.0-alpha.44...v0.1.0-alpha.45](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.44...v0.1.0-alpha.45) + +### Bug Fixes + +* **payroll:** pay_statement_item is now a direct subresource of hris instead of company ([83b50ae](https://github.com/Finch-API/finch-api-ruby/commit/83b50ae945eb5a7db1cc1212ec7de522553ea050)) + ## 0.1.0-alpha.44 (2026-06-22) Full Changelog: [v0.1.0-alpha.43...v0.1.0-alpha.44](https://github.com/Finch-API/finch-api-ruby/compare/v0.1.0-alpha.43...v0.1.0-alpha.44) diff --git a/Gemfile.lock b/Gemfile.lock index cb56e454..dd71ddd8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - finch-api (0.1.0.pre.alpha.44) + finch-api (0.1.0.pre.alpha.45) cgi connection_pool diff --git a/README.md b/README.md index 08e40edc..0683488f 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "finch-api", "~> 0.1.0.pre.alpha.44" +gem "finch-api", "~> 0.1.0.pre.alpha.45" ``` diff --git a/lib/finch_api.rb b/lib/finch_api.rb index aa22800b..9a2d78df 100644 --- a/lib/finch_api.rb +++ b/lib/finch_api.rb @@ -94,16 +94,6 @@ require_relative "finch_api/models/hris/benefit_type" require_relative "finch_api/models/hris/benefit_update_params" require_relative "finch_api/models/hris/benfit_contribution" -require_relative "finch_api/models/hris/company/pay_statement_item/rule_create_params" -require_relative "finch_api/models/hris/company/pay_statement_item/rule_create_response" -require_relative "finch_api/models/hris/company/pay_statement_item/rule_delete_params" -require_relative "finch_api/models/hris/company/pay_statement_item/rule_delete_response" -require_relative "finch_api/models/hris/company/pay_statement_item/rule_list_params" -require_relative "finch_api/models/hris/company/pay_statement_item/rule_list_response" -require_relative "finch_api/models/hris/company/pay_statement_item/rule_update_params" -require_relative "finch_api/models/hris/company/pay_statement_item/rule_update_response" -require_relative "finch_api/models/hris/company/pay_statement_item_list_params" -require_relative "finch_api/models/hris/company/pay_statement_item_list_response" require_relative "finch_api/models/hris/company_benefit" require_relative "finch_api/models/hris/company_retrieve_params" require_relative "finch_api/models/hris/create_company_benefits_response" @@ -127,6 +117,16 @@ require_relative "finch_api/models/hris/pay_statement" require_relative "finch_api/models/hris/pay_statement_data" require_relative "finch_api/models/hris/pay_statement_data_sync_in_progress" +require_relative "finch_api/models/hris/pay_statement_item/rule_create_params" +require_relative "finch_api/models/hris/pay_statement_item/rule_create_response" +require_relative "finch_api/models/hris/pay_statement_item/rule_delete_params" +require_relative "finch_api/models/hris/pay_statement_item/rule_delete_response" +require_relative "finch_api/models/hris/pay_statement_item/rule_list_params" +require_relative "finch_api/models/hris/pay_statement_item/rule_list_response" +require_relative "finch_api/models/hris/pay_statement_item/rule_update_params" +require_relative "finch_api/models/hris/pay_statement_item/rule_update_response" +require_relative "finch_api/models/hris/pay_statement_item_list_params" +require_relative "finch_api/models/hris/pay_statement_item_list_response" require_relative "finch_api/models/hris/pay_statement_response" require_relative "finch_api/models/hris/pay_statement_retrieve_many_params" require_relative "finch_api/models/hris/register_company_benefit_response" @@ -194,13 +194,13 @@ require_relative "finch_api/resources/hris/benefits" require_relative "finch_api/resources/hris/benefits/individuals" require_relative "finch_api/resources/hris/company" -require_relative "finch_api/resources/hris/company/pay_statement_item" -require_relative "finch_api/resources/hris/company/pay_statement_item/rules" require_relative "finch_api/resources/hris/directory" require_relative "finch_api/resources/hris/documents" require_relative "finch_api/resources/hris/employments" require_relative "finch_api/resources/hris/individuals" require_relative "finch_api/resources/hris/payments" +require_relative "finch_api/resources/hris/pay_statement_item" +require_relative "finch_api/resources/hris/pay_statement_item/rules" require_relative "finch_api/resources/hris/pay_statements" require_relative "finch_api/resources/jobs" require_relative "finch_api/resources/jobs/automated" diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb deleted file mode 100644 index 6c88048c..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb +++ /dev/null @@ -1,137 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#create - class RuleCreateParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - # @!attribute entity_ids - # The entity IDs to create the rule for. - # - # @return [Array, nil] - optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - - # @!attribute attributes - # Specifies the fields to be applied when the condition is met. - # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, nil] - optional :attributes, -> { FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes } - - # @!attribute conditions - # - # @return [Array, nil] - optional :conditions, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition] } - - # @!attribute effective_end_date - # Specifies when the rules should stop applying rules based on the date. - # - # @return [String, nil] - optional :effective_end_date, String, nil?: true - - # @!attribute effective_start_date - # Specifies when the rule should begin applying based on the date. - # - # @return [String, nil] - optional :effective_start_date, String, nil?: true - - # @!attribute entity_type - # The entity type to which the rule is applied. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType, nil] - optional :entity_type, - enum: -> { FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType } - - # @!method initialize(entity_ids: nil, attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) - # @param entity_ids [Array] The entity IDs to create the rule for. - # - # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met. - # - # @param conditions [Array] - # - # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. - # - # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. - # - # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] The entity type to which the rule is applied. - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - # - # @return [Hash{Symbol=>Object}, nil] - optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - - # @!method initialize(metadata: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes} - # for more details. - # - # Specifies the fields to be applied when the condition is met. - # - # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val - end - - class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute field - # The field to be checked in the rule. - # - # @return [String, nil] - optional :field, String - - # @!attribute operator - # The operator to be used in the rule. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator, nil] - optional :operator, - enum: -> { FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator } - - # @!attribute value - # The value of the field to be checked in the rule. - # - # @return [String, nil] - optional :value, String - - # @!method initialize(field: nil, operator: nil, value: nil) - # @param field [String] The field to be checked in the rule. - # - # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator] The operator to be used in the rule. - # - # @param value [String] The value of the field to be checked in the rule. - - # The operator to be used in the rule. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition#operator - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS = :equals - - # @!method self.values - # @return [Array] - end - end - - # The entity type to which the rule is applied. - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM = :pay_statement_item - - # @!method self.values - # @return [Array] - end - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rb deleted file mode 100644 index ae8a49d6..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rb +++ /dev/null @@ -1,160 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#create - class RuleCreateResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # Finch id (uuidv4) for the rule. - # - # @return [String, nil] - optional :id, String - - # @!attribute attributes - # Specifies the fields to be applied when the condition is met. - # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes, nil] - optional :attributes, - -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes } - - # @!attribute conditions - # - # @return [Array, nil] - optional :conditions, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition] } - - # @!attribute created_at - # The datetime when the rule was created. - # - # @return [Time, nil] - optional :created_at, Time - - # @!attribute effective_end_date - # Specifies when the rules should stop applying rules based on the date. - # - # @return [String, nil] - optional :effective_end_date, String, nil?: true - - # @!attribute effective_start_date - # Specifies when the rule should begin applying based on the date. - # - # @return [String, nil] - optional :effective_start_date, String, nil?: true - - # @!attribute entity_type - # The entity type to which the rule is applied. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType, nil] - optional :entity_type, - enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType } - - # @!attribute priority - # The priority of the rule. - # - # @return [Integer, nil] - optional :priority, Integer - - # @!attribute updated_at - # The datetime when the rule was last updated. - # - # @return [Time, nil] - optional :updated_at, Time - - # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) - # @param id [String] Finch id (uuidv4) for the rule. - # - # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes] Specifies the fields to be applied when the condition is met. - # - # @param conditions [Array] - # - # @param created_at [Time] The datetime when the rule was created. - # - # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. - # - # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. - # - # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType] The entity type to which the rule is applied. - # - # @param priority [Integer] The priority of the rule. - # - # @param updated_at [Time] The datetime when the rule was last updated. - - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - # - # @return [Hash{Symbol=>Object}, nil] - optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - - # @!method initialize(metadata: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes} - # for more details. - # - # Specifies the fields to be applied when the condition is met. - # - # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val - end - - class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute field - # The field to be checked in the rule. - # - # @return [String, nil] - optional :field, String - - # @!attribute operator - # The operator to be used in the rule. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator, nil] - optional :operator, - enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator } - - # @!attribute value - # The value of the field to be checked in the rule. - # - # @return [String, nil] - optional :value, String - - # @!method initialize(field: nil, operator: nil, value: nil) - # @param field [String] The field to be checked in the rule. - # - # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator] The operator to be used in the rule. - # - # @param value [String] The value of the field to be checked in the rule. - - # The operator to be used in the rule. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition#operator - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS = :equals - - # @!method self.values - # @return [Array] - end - end - - # The entity type to which the rule is applied. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse#entity_type - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM = :pay_statement_item - - # @!method self.values - # @return [Array] - end - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb deleted file mode 100644 index 45299bab..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb +++ /dev/null @@ -1,35 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#delete - class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - # @!attribute rule_id - # - # @return [String] - required :rule_id, String - - # @!attribute entity_ids - # The entity IDs to delete the rule for. - # - # @return [Array, nil] - optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - - # @!method initialize(rule_id:, entity_ids: nil, request_options: {}) - # @param rule_id [String] - # - # @param entity_ids [Array] The entity IDs to delete the rule for. - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rb deleted file mode 100644 index e512c887..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rb +++ /dev/null @@ -1,168 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#delete - class RuleDeleteResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # Finch id (uuidv4) for the rule. - # - # @return [String, nil] - optional :id, String - - # @!attribute attributes - # Specifies the fields to be applied when the condition is met. - # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes, nil] - optional :attributes, - -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes } - - # @!attribute conditions - # - # @return [Array, nil] - optional :conditions, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition] } - - # @!attribute created_at - # The datetime when the rule was created. - # - # @return [Time, nil] - optional :created_at, Time - - # @!attribute deleted_at - # The datetime when the rule was deleted. - # - # @return [Time, nil] - optional :deleted_at, Time - - # @!attribute effective_end_date - # Specifies when the rules should stop applying rules based on the date. - # - # @return [String, nil] - optional :effective_end_date, String, nil?: true - - # @!attribute effective_start_date - # Specifies when the rule should begin applying based on the date. - # - # @return [String, nil] - optional :effective_start_date, String, nil?: true - - # @!attribute entity_type - # The entity type to which the rule is applied. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType, nil] - optional :entity_type, - enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType } - - # @!attribute priority - # The priority of the rule. - # - # @return [Integer, nil] - optional :priority, Integer - - # @!attribute updated_at - # The datetime when the rule was last updated. - # - # @return [Time, nil] - optional :updated_at, Time - - # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, deleted_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) - # @param id [String] Finch id (uuidv4) for the rule. - # - # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes] Specifies the fields to be applied when the condition is met. - # - # @param conditions [Array] - # - # @param created_at [Time] The datetime when the rule was created. - # - # @param deleted_at [Time] The datetime when the rule was deleted. - # - # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. - # - # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. - # - # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType] The entity type to which the rule is applied. - # - # @param priority [Integer] The priority of the rule. - # - # @param updated_at [Time] The datetime when the rule was last updated. - - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - # - # @return [Hash{Symbol=>Object}, nil] - optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - - # @!method initialize(metadata: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes} - # for more details. - # - # Specifies the fields to be applied when the condition is met. - # - # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val - end - - class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute field - # The field to be checked in the rule. - # - # @return [String, nil] - optional :field, String - - # @!attribute operator - # The operator to be used in the rule. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator, nil] - optional :operator, - enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator } - - # @!attribute value - # The value of the field to be checked in the rule. - # - # @return [String, nil] - optional :value, String - - # @!method initialize(field: nil, operator: nil, value: nil) - # @param field [String] The field to be checked in the rule. - # - # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator] The operator to be used in the rule. - # - # @param value [String] The value of the field to be checked in the rule. - - # The operator to be used in the rule. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition#operator - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS = :equals - - # @!method self.values - # @return [Array] - end - end - - # The entity type to which the rule is applied. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse#entity_type - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM = :pay_statement_item - - # @!method self.values - # @return [Array] - end - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rb deleted file mode 100644 index b85c54e6..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#list - class RuleListParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - # @!attribute entity_ids - # The entity IDs to retrieve rules for. - # - # @return [Array, nil] - optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - - # @!method initialize(entity_ids: nil, request_options: {}) - # @param entity_ids [Array] The entity IDs to retrieve rules for. - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rb deleted file mode 100644 index ca8b7ac3..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rb +++ /dev/null @@ -1,160 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#list - class RuleListResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # Finch id (uuidv4) for the rule. - # - # @return [String, nil] - optional :id, String - - # @!attribute attributes - # Specifies the fields to be applied when the condition is met. - # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes, nil] - optional :attributes, - -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes } - - # @!attribute conditions - # - # @return [Array, nil] - optional :conditions, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition] } - - # @!attribute created_at - # The datetime when the rule was created. - # - # @return [Time, nil] - optional :created_at, Time - - # @!attribute effective_end_date - # Specifies when the rules should stop applying rules based on the date. - # - # @return [String, nil] - optional :effective_end_date, String, nil?: true - - # @!attribute effective_start_date - # Specifies when the rule should begin applying based on the date. - # - # @return [String, nil] - optional :effective_start_date, String, nil?: true - - # @!attribute entity_type - # The entity type to which the rule is applied. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType, nil] - optional :entity_type, - enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType } - - # @!attribute priority - # The priority of the rule. - # - # @return [Integer, nil] - optional :priority, Integer - - # @!attribute updated_at - # The datetime when the rule was last updated. - # - # @return [Time, nil] - optional :updated_at, Time - - # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) - # @param id [String] Finch id (uuidv4) for the rule. - # - # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes] Specifies the fields to be applied when the condition is met. - # - # @param conditions [Array] - # - # @param created_at [Time] The datetime when the rule was created. - # - # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. - # - # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. - # - # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType] The entity type to which the rule is applied. - # - # @param priority [Integer] The priority of the rule. - # - # @param updated_at [Time] The datetime when the rule was last updated. - - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - # - # @return [Hash{Symbol=>Object}, nil] - optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - - # @!method initialize(metadata: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes} - # for more details. - # - # Specifies the fields to be applied when the condition is met. - # - # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val - end - - class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute field - # The field to be checked in the rule. - # - # @return [String, nil] - optional :field, String - - # @!attribute operator - # The operator to be used in the rule. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator, nil] - optional :operator, - enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator } - - # @!attribute value - # The value of the field to be checked in the rule. - # - # @return [String, nil] - optional :value, String - - # @!method initialize(field: nil, operator: nil, value: nil) - # @param field [String] The field to be checked in the rule. - # - # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator] The operator to be used in the rule. - # - # @param value [String] The value of the field to be checked in the rule. - - # The operator to be used in the rule. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition#operator - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS = :equals - - # @!method self.values - # @return [Array] - end - end - - # The entity type to which the rule is applied. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse#entity_type - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM = :pay_statement_item - - # @!method self.values - # @return [Array] - end - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb deleted file mode 100644 index 4e1d2c58..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#update - class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - # @!attribute rule_id - # - # @return [String] - required :rule_id, String - - # @!attribute entity_ids - # The entity IDs to update the rule for. - # - # @return [Array, nil] - optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - - # @!attribute optional_property - # - # @return [Object, nil] - optional :optional_property, FinchAPI::Internal::Type::Unknown, api_name: :optionalProperty - - # @!method initialize(rule_id:, entity_ids: nil, optional_property: nil, request_options: {}) - # @param rule_id [String] - # - # @param entity_ids [Array] The entity IDs to update the rule for. - # - # @param optional_property [Object] - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rb b/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rb deleted file mode 100644 index 6882d427..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rb +++ /dev/null @@ -1,160 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#update - class RuleUpdateResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute id - # Finch id (uuidv4) for the rule. - # - # @return [String, nil] - optional :id, String - - # @!attribute attributes - # Specifies the fields to be applied when the condition is met. - # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes, nil] - optional :attributes, - -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes } - - # @!attribute conditions - # - # @return [Array, nil] - optional :conditions, - -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition] } - - # @!attribute created_at - # The datetime when the rule was created. - # - # @return [Time, nil] - optional :created_at, Time - - # @!attribute effective_end_date - # Specifies when the rules should stop applying rules based on the date. - # - # @return [String, nil] - optional :effective_end_date, String, nil?: true - - # @!attribute effective_start_date - # Specifies when the rule should begin applying based on the date. - # - # @return [String, nil] - optional :effective_start_date, String, nil?: true - - # @!attribute entity_type - # The entity type to which the rule is applied. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType, nil] - optional :entity_type, - enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType } - - # @!attribute priority - # The priority of the rule. - # - # @return [Integer, nil] - optional :priority, Integer - - # @!attribute updated_at - # The datetime when the rule was last updated. - # - # @return [Time, nil] - optional :updated_at, Time - - # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) - # @param id [String] Finch id (uuidv4) for the rule. - # - # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes] Specifies the fields to be applied when the condition is met. - # - # @param conditions [Array] - # - # @param created_at [Time] The datetime when the rule was created. - # - # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. - # - # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. - # - # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType] The entity type to which the rule is applied. - # - # @param priority [Integer] The priority of the rule. - # - # @param updated_at [Time] The datetime when the rule was last updated. - - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - # - # @return [Hash{Symbol=>Object}, nil] - optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] - - # @!method initialize(metadata: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes} - # for more details. - # - # Specifies the fields to be applied when the condition is met. - # - # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val - end - - class Condition < FinchAPI::Internal::Type::BaseModel - # @!attribute field - # The field to be checked in the rule. - # - # @return [String, nil] - optional :field, String - - # @!attribute operator - # The operator to be used in the rule. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator, nil] - optional :operator, - enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator } - - # @!attribute value - # The value of the field to be checked in the rule. - # - # @return [String, nil] - optional :value, String - - # @!method initialize(field: nil, operator: nil, value: nil) - # @param field [String] The field to be checked in the rule. - # - # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator] The operator to be used in the rule. - # - # @param value [String] The value of the field to be checked in the rule. - - # The operator to be used in the rule. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition#operator - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS = :equals - - # @!method self.values - # @return [Array] - end - end - - # The entity type to which the rule is applied. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse#entity_type - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM = :pay_statement_item - - # @!method self.values - # @return [Array] - end - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb b/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb deleted file mode 100644 index 196a3a68..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem#list - class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - # @!attribute categories - # Comma-delimited list of pay statement item categories to filter on. If empty, - # defaults to all categories. - # - # @return [Array, nil] - optional :categories, - -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::Company::PayStatementItemListParams::Category] } - - # @!attribute end_date - # The end date to retrieve pay statement items by via their last seen pay date in - # `YYYY-MM-DD` format. - # - # @return [Date, nil] - optional :end_date, Date - - # @!attribute entity_ids - # The entity IDs to specify which entities' data to access. - # - # @return [Array, nil] - optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] - - # @!attribute name - # Case-insensitive partial match search by pay statement item name. - # - # @return [String, nil] - optional :name, String - - # @!attribute start_date - # The start date to retrieve pay statement items by via their last seen pay date - # (inclusive) in `YYYY-MM-DD` format. - # - # @return [Date, nil] - optional :start_date, Date - - # @!attribute type - # String search by pay statement item type. - # - # @return [String, nil] - optional :type, String - - # @!method initialize(categories: nil, end_date: nil, entity_ids: nil, name: nil, start_date: nil, type: nil, request_options: {}) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Company::PayStatementItemListParams} for more details. - # - # @param categories [Array] Comma-delimited list of pay statement item categories to filter on. If empty, de - # - # @param end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in - # - # @param entity_ids [Array] The entity IDs to specify which entities' data to access. - # - # @param name [String] Case-insensitive partial match search by pay statement item name. - # - # @param start_date [Date] The start date to retrieve pay statement items by via their last seen pay date ( - # - # @param type [String] String search by pay statement item type. - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] - - module Category - extend FinchAPI::Internal::Type::Enum - - EARNINGS = :earnings - TAXES = :taxes - EMPLOYEE_DEDUCTIONS = :employee_deductions - EMPLOYER_CONTRIBUTIONS = :employer_contributions - - # @!method self.values - # @return [Array] - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb b/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb deleted file mode 100644 index c8a8b922..00000000 --- a/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb +++ /dev/null @@ -1,99 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Models - module HRIS - module Company - # @see FinchAPI::Resources::HRIS::Company::PayStatementItem#list - class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel - # @!attribute attributes - # The attributes of the pay statement item. - # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes] - required :attributes, -> { FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes } - - # @!attribute category - # The category of the pay statement item. - # - # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category] - required :category, enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category } - - # @!attribute name - # The name of the pay statement item. - # - # @return [String] - required :name, String - - # @!method initialize(attributes:, category:, name:) - # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes] The attributes of the pay statement item. - # - # @param category [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category] The category of the pay statement item. - # - # @param name [String] The name of the pay statement item. - - # @see FinchAPI::Models::HRIS::Company::PayStatementItemListResponse#attributes - class Attributes < FinchAPI::Internal::Type::BaseModel - # @!attribute metadata - # The metadata of the pay statement item derived by the rules engine if available. - # Each attribute will be a key-value pair defined by a rule. - # - # @return [Hash{Symbol=>Object, nil}, nil] - required :metadata, - FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], - nil?: true - - # @!attribute employer - # `true` if the amount is paid by the employers. This field is only available for - # taxes. - # - # @return [Boolean, nil] - optional :employer, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute pre_tax - # `true` if the pay statement item is pre-tax. This field is only available for - # employee deductions. - # - # @return [Boolean, nil] - optional :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true - - # @!attribute type - # The type of the pay statement item. - # - # @return [String, nil] - optional :type, String, nil?: true - - # @!method initialize(metadata:, employer: nil, pre_tax: nil, type: nil) - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes} for - # more details. - # - # The attributes of the pay statement item. - # - # @param metadata [Hash{Symbol=>Object, nil}, nil] The metadata of the pay statement item derived by the rules engine if available. - # - # @param employer [Boolean, nil] `true` if the amount is paid by the employers. This field is only available for - # - # @param pre_tax [Boolean, nil] `true` if the pay statement item is pre-tax. This field is only available for em - # - # @param type [String, nil] The type of the pay statement item. - end - - # The category of the pay statement item. - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItemListResponse#category - module Category - extend FinchAPI::Internal::Type::Enum - - EARNINGS = :earnings - TAXES = :taxes - EMPLOYEE_DEDUCTIONS = :employee_deductions - EMPLOYER_CONTRIBUTIONS = :employer_contributions - - # @!method self.values - # @return [Array] - end - end - end - end - end -end diff --git a/lib/finch_api/models/hris/pay_statement_item/rule_create_params.rb b/lib/finch_api/models/hris/pay_statement_item/rule_create_params.rb new file mode 100644 index 00000000..1a3d8073 --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item/rule_create_params.rb @@ -0,0 +1,133 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + module PayStatementItem + # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#create + class RuleCreateParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + # @!attribute entity_ids + # The entity IDs to create the rule for. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!attribute attributes + # Specifies the fields to be applied when the condition is met. + # + # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Attributes, nil] + optional :attributes, -> { FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes } + + # @!attribute conditions + # + # @return [Array, nil] + optional :conditions, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition] } + + # @!attribute effective_end_date + # Specifies when the rules should stop applying rules based on the date. + # + # @return [String, nil] + optional :effective_end_date, String, nil?: true + + # @!attribute effective_start_date + # Specifies when the rule should begin applying based on the date. + # + # @return [String, nil] + optional :effective_start_date, String, nil?: true + + # @!attribute entity_type + # The entity type to which the rule is applied. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::EntityType, nil] + optional :entity_type, enum: -> { FinchAPI::HRIS::PayStatementItem::RuleCreateParams::EntityType } + + # @!method initialize(entity_ids: nil, attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to create the rule for. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::EntityType] The entity type to which the rule is applied. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] + + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + # + # @return [Hash{Symbol=>Object}, nil] + optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] + + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Attributes} for + # more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + end + + class Condition < FinchAPI::Internal::Type::BaseModel + # @!attribute field + # The field to be checked in the rule. + # + # @return [String, nil] + optional :field, String + + # @!attribute operator + # The operator to be used in the rule. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator, nil] + optional :operator, enum: -> { FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator } + + # @!attribute value + # The value of the field to be checked in the rule. + # + # @return [String, nil] + optional :value, String + + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. + + # The operator to be used in the rule. + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition#operator + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS = :equals + + # @!method self.values + # @return [Array] + end + end + + # The entity type to which the rule is applied. + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM = :pay_statement_item + + # @!method self.values + # @return [Array] + end + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_item/rule_create_response.rb b/lib/finch_api/models/hris/pay_statement_item/rule_create_response.rb new file mode 100644 index 00000000..40d8260c --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item/rule_create_response.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + module PayStatementItem + # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#create + class RuleCreateResponse < FinchAPI::Internal::Type::BaseModel + # @!attribute id + # Finch id (uuidv4) for the rule. + # + # @return [String, nil] + optional :id, String + + # @!attribute attributes + # Specifies the fields to be applied when the condition is met. + # + # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes, nil] + optional :attributes, -> { FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes } + + # @!attribute conditions + # + # @return [Array, nil] + optional :conditions, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition] } + + # @!attribute created_at + # The datetime when the rule was created. + # + # @return [Time, nil] + optional :created_at, Time + + # @!attribute effective_end_date + # Specifies when the rules should stop applying rules based on the date. + # + # @return [String, nil] + optional :effective_end_date, String, nil?: true + + # @!attribute effective_start_date + # Specifies when the rule should begin applying based on the date. + # + # @return [String, nil] + optional :effective_start_date, String, nil?: true + + # @!attribute entity_type + # The entity type to which the rule is applied. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType, nil] + optional :entity_type, + enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType } + + # @!attribute priority + # The priority of the rule. + # + # @return [Integer, nil] + optional :priority, Integer + + # @!attribute updated_at + # The datetime when the rule was last updated. + # + # @return [Time, nil] + optional :updated_at, Time + + # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) + # @param id [String] Finch id (uuidv4) for the rule. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param created_at [Time] The datetime when the rule was created. + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType] The entity type to which the rule is applied. + # + # @param priority [Integer] The priority of the rule. + # + # @param updated_at [Time] The datetime when the rule was last updated. + + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + # + # @return [Hash{Symbol=>Object}, nil] + optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] + + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes} for + # more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + end + + class Condition < FinchAPI::Internal::Type::BaseModel + # @!attribute field + # The field to be checked in the rule. + # + # @return [String, nil] + optional :field, String + + # @!attribute operator + # The operator to be used in the rule. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator, nil] + optional :operator, + enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator } + + # @!attribute value + # The value of the field to be checked in the rule. + # + # @return [String, nil] + optional :value, String + + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. + + # The operator to be used in the rule. + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition#operator + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS = :equals + + # @!method self.values + # @return [Array] + end + end + + # The entity type to which the rule is applied. + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse#entity_type + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM = :pay_statement_item + + # @!method self.values + # @return [Array] + end + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_item/rule_delete_params.rb b/lib/finch_api/models/hris/pay_statement_item/rule_delete_params.rb new file mode 100644 index 00000000..b1a007c4 --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item/rule_delete_params.rb @@ -0,0 +1,33 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + module PayStatementItem + # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#delete + class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + # @!attribute rule_id + # + # @return [String] + required :rule_id, String + + # @!attribute entity_ids + # The entity IDs to delete the rule for. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(rule_id:, entity_ids: nil, request_options: {}) + # @param rule_id [String] + # + # @param entity_ids [Array] The entity IDs to delete the rule for. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_item/rule_delete_response.rb b/lib/finch_api/models/hris/pay_statement_item/rule_delete_response.rb new file mode 100644 index 00000000..76749419 --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item/rule_delete_response.rb @@ -0,0 +1,165 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + module PayStatementItem + # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#delete + class RuleDeleteResponse < FinchAPI::Internal::Type::BaseModel + # @!attribute id + # Finch id (uuidv4) for the rule. + # + # @return [String, nil] + optional :id, String + + # @!attribute attributes + # Specifies the fields to be applied when the condition is met. + # + # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes, nil] + optional :attributes, -> { FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes } + + # @!attribute conditions + # + # @return [Array, nil] + optional :conditions, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition] } + + # @!attribute created_at + # The datetime when the rule was created. + # + # @return [Time, nil] + optional :created_at, Time + + # @!attribute deleted_at + # The datetime when the rule was deleted. + # + # @return [Time, nil] + optional :deleted_at, Time + + # @!attribute effective_end_date + # Specifies when the rules should stop applying rules based on the date. + # + # @return [String, nil] + optional :effective_end_date, String, nil?: true + + # @!attribute effective_start_date + # Specifies when the rule should begin applying based on the date. + # + # @return [String, nil] + optional :effective_start_date, String, nil?: true + + # @!attribute entity_type + # The entity type to which the rule is applied. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType, nil] + optional :entity_type, + enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType } + + # @!attribute priority + # The priority of the rule. + # + # @return [Integer, nil] + optional :priority, Integer + + # @!attribute updated_at + # The datetime when the rule was last updated. + # + # @return [Time, nil] + optional :updated_at, Time + + # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, deleted_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) + # @param id [String] Finch id (uuidv4) for the rule. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param created_at [Time] The datetime when the rule was created. + # + # @param deleted_at [Time] The datetime when the rule was deleted. + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType] The entity type to which the rule is applied. + # + # @param priority [Integer] The priority of the rule. + # + # @param updated_at [Time] The datetime when the rule was last updated. + + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + # + # @return [Hash{Symbol=>Object}, nil] + optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] + + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes} for + # more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + end + + class Condition < FinchAPI::Internal::Type::BaseModel + # @!attribute field + # The field to be checked in the rule. + # + # @return [String, nil] + optional :field, String + + # @!attribute operator + # The operator to be used in the rule. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator, nil] + optional :operator, + enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator } + + # @!attribute value + # The value of the field to be checked in the rule. + # + # @return [String, nil] + optional :value, String + + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. + + # The operator to be used in the rule. + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition#operator + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS = :equals + + # @!method self.values + # @return [Array] + end + end + + # The entity type to which the rule is applied. + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse#entity_type + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM = :pay_statement_item + + # @!method self.values + # @return [Array] + end + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_item/rule_list_params.rb b/lib/finch_api/models/hris/pay_statement_item/rule_list_params.rb new file mode 100644 index 00000000..422e1c6e --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item/rule_list_params.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + module PayStatementItem + # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#list + class RuleListParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + # @!attribute entity_ids + # The entity IDs to retrieve rules for. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!method initialize(entity_ids: nil, request_options: {}) + # @param entity_ids [Array] The entity IDs to retrieve rules for. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_item/rule_list_response.rb b/lib/finch_api/models/hris/pay_statement_item/rule_list_response.rb new file mode 100644 index 00000000..7421c0ed --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item/rule_list_response.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + module PayStatementItem + # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#list + class RuleListResponse < FinchAPI::Internal::Type::BaseModel + # @!attribute id + # Finch id (uuidv4) for the rule. + # + # @return [String, nil] + optional :id, String + + # @!attribute attributes + # Specifies the fields to be applied when the condition is met. + # + # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes, nil] + optional :attributes, -> { FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes } + + # @!attribute conditions + # + # @return [Array, nil] + optional :conditions, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition] } + + # @!attribute created_at + # The datetime when the rule was created. + # + # @return [Time, nil] + optional :created_at, Time + + # @!attribute effective_end_date + # Specifies when the rules should stop applying rules based on the date. + # + # @return [String, nil] + optional :effective_end_date, String, nil?: true + + # @!attribute effective_start_date + # Specifies when the rule should begin applying based on the date. + # + # @return [String, nil] + optional :effective_start_date, String, nil?: true + + # @!attribute entity_type + # The entity type to which the rule is applied. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType, nil] + optional :entity_type, enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType } + + # @!attribute priority + # The priority of the rule. + # + # @return [Integer, nil] + optional :priority, Integer + + # @!attribute updated_at + # The datetime when the rule was last updated. + # + # @return [Time, nil] + optional :updated_at, Time + + # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) + # @param id [String] Finch id (uuidv4) for the rule. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param created_at [Time] The datetime when the rule was created. + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType] The entity type to which the rule is applied. + # + # @param priority [Integer] The priority of the rule. + # + # @param updated_at [Time] The datetime when the rule was last updated. + + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + # + # @return [Hash{Symbol=>Object}, nil] + optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] + + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes} for + # more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + end + + class Condition < FinchAPI::Internal::Type::BaseModel + # @!attribute field + # The field to be checked in the rule. + # + # @return [String, nil] + optional :field, String + + # @!attribute operator + # The operator to be used in the rule. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator, nil] + optional :operator, + enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator } + + # @!attribute value + # The value of the field to be checked in the rule. + # + # @return [String, nil] + optional :value, String + + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. + + # The operator to be used in the rule. + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition#operator + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS = :equals + + # @!method self.values + # @return [Array] + end + end + + # The entity type to which the rule is applied. + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse#entity_type + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM = :pay_statement_item + + # @!method self.values + # @return [Array] + end + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_item/rule_update_params.rb b/lib/finch_api/models/hris/pay_statement_item/rule_update_params.rb new file mode 100644 index 00000000..40cb9396 --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item/rule_update_params.rb @@ -0,0 +1,40 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + module PayStatementItem + # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#update + class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + # @!attribute rule_id + # + # @return [String] + required :rule_id, String + + # @!attribute entity_ids + # The entity IDs to update the rule for. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!attribute optional_property + # + # @return [Object, nil] + optional :optional_property, FinchAPI::Internal::Type::Unknown, api_name: :optionalProperty + + # @!method initialize(rule_id:, entity_ids: nil, optional_property: nil, request_options: {}) + # @param rule_id [String] + # + # @param entity_ids [Array] The entity IDs to update the rule for. + # + # @param optional_property [Object] + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_item/rule_update_response.rb b/lib/finch_api/models/hris/pay_statement_item/rule_update_response.rb new file mode 100644 index 00000000..85a27b3e --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item/rule_update_response.rb @@ -0,0 +1,157 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + module PayStatementItem + # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#update + class RuleUpdateResponse < FinchAPI::Internal::Type::BaseModel + # @!attribute id + # Finch id (uuidv4) for the rule. + # + # @return [String, nil] + optional :id, String + + # @!attribute attributes + # Specifies the fields to be applied when the condition is met. + # + # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes, nil] + optional :attributes, -> { FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes } + + # @!attribute conditions + # + # @return [Array, nil] + optional :conditions, + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition] } + + # @!attribute created_at + # The datetime when the rule was created. + # + # @return [Time, nil] + optional :created_at, Time + + # @!attribute effective_end_date + # Specifies when the rules should stop applying rules based on the date. + # + # @return [String, nil] + optional :effective_end_date, String, nil?: true + + # @!attribute effective_start_date + # Specifies when the rule should begin applying based on the date. + # + # @return [String, nil] + optional :effective_start_date, String, nil?: true + + # @!attribute entity_type + # The entity type to which the rule is applied. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType, nil] + optional :entity_type, + enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType } + + # @!attribute priority + # The priority of the rule. + # + # @return [Integer, nil] + optional :priority, Integer + + # @!attribute updated_at + # The datetime when the rule was last updated. + # + # @return [Time, nil] + optional :updated_at, Time + + # @!method initialize(id: nil, attributes: nil, conditions: nil, created_at: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, priority: nil, updated_at: nil) + # @param id [String] Finch id (uuidv4) for the rule. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes] Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] + # + # @param created_at [Time] The datetime when the rule was created. + # + # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date. + # + # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType] The entity type to which the rule is applied. + # + # @param priority [Integer] The priority of the rule. + # + # @param updated_at [Time] The datetime when the rule was last updated. + + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + # + # @return [Hash{Symbol=>Object}, nil] + optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] + + # @!method initialize(metadata: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes} for + # more details. + # + # Specifies the fields to be applied when the condition is met. + # + # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val + end + + class Condition < FinchAPI::Internal::Type::BaseModel + # @!attribute field + # The field to be checked in the rule. + # + # @return [String, nil] + optional :field, String + + # @!attribute operator + # The operator to be used in the rule. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator, nil] + optional :operator, + enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator } + + # @!attribute value + # The value of the field to be checked in the rule. + # + # @return [String, nil] + optional :value, String + + # @!method initialize(field: nil, operator: nil, value: nil) + # @param field [String] The field to be checked in the rule. + # + # @param operator [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator] The operator to be used in the rule. + # + # @param value [String] The value of the field to be checked in the rule. + + # The operator to be used in the rule. + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition#operator + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS = :equals + + # @!method self.values + # @return [Array] + end + end + + # The entity type to which the rule is applied. + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse#entity_type + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM = :pay_statement_item + + # @!method self.values + # @return [Array] + end + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_item_list_params.rb b/lib/finch_api/models/hris/pay_statement_item_list_params.rb new file mode 100644 index 00000000..4a06e669 --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item_list_params.rb @@ -0,0 +1,83 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + # @see FinchAPI::Resources::HRIS::PayStatementItem#list + class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + # @!attribute categories + # Comma-delimited list of pay statement item categories to filter on. If empty, + # defaults to all categories. + # + # @return [Array, nil] + optional :categories, + -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::PayStatementItemListParams::Category] } + + # @!attribute end_date + # The end date to retrieve pay statement items by via their last seen pay date in + # `YYYY-MM-DD` format. + # + # @return [Date, nil] + optional :end_date, Date + + # @!attribute entity_ids + # The entity IDs to specify which entities' data to access. + # + # @return [Array, nil] + optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String] + + # @!attribute name + # Case-insensitive partial match search by pay statement item name. + # + # @return [String, nil] + optional :name, String + + # @!attribute start_date + # The start date to retrieve pay statement items by via their last seen pay date + # (inclusive) in `YYYY-MM-DD` format. + # + # @return [Date, nil] + optional :start_date, Date + + # @!attribute type + # String search by pay statement item type. + # + # @return [String, nil] + optional :type, String + + # @!method initialize(categories: nil, end_date: nil, entity_ids: nil, name: nil, start_date: nil, type: nil, request_options: {}) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementItemListParams} for more details. + # + # @param categories [Array] Comma-delimited list of pay statement item categories to filter on. If empty, de + # + # @param end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # + # @param name [String] Case-insensitive partial match search by pay statement item name. + # + # @param start_date [Date] The start date to retrieve pay statement items by via their last seen pay date ( + # + # @param type [String] String search by pay statement item type. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] + + module Category + extend FinchAPI::Internal::Type::Enum + + EARNINGS = :earnings + TAXES = :taxes + EMPLOYEE_DEDUCTIONS = :employee_deductions + EMPLOYER_CONTRIBUTIONS = :employer_contributions + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/finch_api/models/hris/pay_statement_item_list_response.rb b/lib/finch_api/models/hris/pay_statement_item_list_response.rb new file mode 100644 index 00000000..3786ff4c --- /dev/null +++ b/lib/finch_api/models/hris/pay_statement_item_list_response.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +module FinchAPI + module Models + module HRIS + # @see FinchAPI::Resources::HRIS::PayStatementItem#list + class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel + # @!attribute attributes + # The attributes of the pay statement item. + # + # @return [FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes] + required :attributes, -> { FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes } + + # @!attribute category + # The category of the pay statement item. + # + # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItemListResponse::Category] + required :category, enum: -> { FinchAPI::Models::HRIS::PayStatementItemListResponse::Category } + + # @!attribute name + # The name of the pay statement item. + # + # @return [String] + required :name, String + + # @!method initialize(attributes:, category:, name:) + # @param attributes [FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes] The attributes of the pay statement item. + # + # @param category [Symbol, FinchAPI::Models::HRIS::PayStatementItemListResponse::Category] The category of the pay statement item. + # + # @param name [String] The name of the pay statement item. + + # @see FinchAPI::Models::HRIS::PayStatementItemListResponse#attributes + class Attributes < FinchAPI::Internal::Type::BaseModel + # @!attribute metadata + # The metadata of the pay statement item derived by the rules engine if available. + # Each attribute will be a key-value pair defined by a rule. + # + # @return [Hash{Symbol=>Object, nil}, nil] + required :metadata, + FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true], + nil?: true + + # @!attribute employer + # `true` if the amount is paid by the employers. This field is only available for + # taxes. + # + # @return [Boolean, nil] + optional :employer, FinchAPI::Internal::Type::Boolean, nil?: true + + # @!attribute pre_tax + # `true` if the pay statement item is pre-tax. This field is only available for + # employee deductions. + # + # @return [Boolean, nil] + optional :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true + + # @!attribute type + # The type of the pay statement item. + # + # @return [String, nil] + optional :type, String, nil?: true + + # @!method initialize(metadata:, employer: nil, pre_tax: nil, type: nil) + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes} for more + # details. + # + # The attributes of the pay statement item. + # + # @param metadata [Hash{Symbol=>Object, nil}, nil] The metadata of the pay statement item derived by the rules engine if available. + # + # @param employer [Boolean, nil] `true` if the amount is paid by the employers. This field is only available for + # + # @param pre_tax [Boolean, nil] `true` if the pay statement item is pre-tax. This field is only available for em + # + # @param type [String, nil] The type of the pay statement item. + end + + # The category of the pay statement item. + # + # @see FinchAPI::Models::HRIS::PayStatementItemListResponse#category + module Category + extend FinchAPI::Internal::Type::Enum + + EARNINGS = :earnings + TAXES = :taxes + EMPLOYEE_DEDUCTIONS = :employee_deductions + EMPLOYER_CONTRIBUTIONS = :employer_contributions + + # @!method self.values + # @return [Array] + end + end + end + end +end diff --git a/lib/finch_api/resources/hris.rb b/lib/finch_api/resources/hris.rb index fb144300..ebbe86c7 100644 --- a/lib/finch_api/resources/hris.rb +++ b/lib/finch_api/resources/hris.rb @@ -6,6 +6,9 @@ class HRIS # @return [FinchAPI::Resources::HRIS::Company] attr_reader :company + # @return [FinchAPI::Resources::HRIS::PayStatementItem] + attr_reader :pay_statement_item + # @return [FinchAPI::Resources::HRIS::Directory] attr_reader :directory @@ -33,6 +36,7 @@ class HRIS def initialize(client:) @client = client @company = FinchAPI::Resources::HRIS::Company.new(client: client) + @pay_statement_item = FinchAPI::Resources::HRIS::PayStatementItem.new(client: client) @directory = FinchAPI::Resources::HRIS::Directory.new(client: client) @individuals = FinchAPI::Resources::HRIS::Individuals.new(client: client) @employments = FinchAPI::Resources::HRIS::Employments.new(client: client) diff --git a/lib/finch_api/resources/hris/company.rb b/lib/finch_api/resources/hris/company.rb index 94dfbd24..5359fa47 100644 --- a/lib/finch_api/resources/hris/company.rb +++ b/lib/finch_api/resources/hris/company.rb @@ -4,9 +4,6 @@ module FinchAPI module Resources class HRIS class Company - # @return [FinchAPI::Resources::HRIS::Company::PayStatementItem] - attr_reader :pay_statement_item - # Read basic company data # # @overload retrieve(entity_ids: nil, request_options: {}) @@ -36,7 +33,6 @@ def retrieve(params = {}) # @param client [FinchAPI::Client] def initialize(client:) @client = client - @pay_statement_item = FinchAPI::Resources::HRIS::Company::PayStatementItem.new(client: client) end end end diff --git a/lib/finch_api/resources/hris/company/pay_statement_item.rb b/lib/finch_api/resources/hris/company/pay_statement_item.rb deleted file mode 100644 index 4e3d8f48..00000000 --- a/lib/finch_api/resources/hris/company/pay_statement_item.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Resources - class HRIS - class Company - class PayStatementItem - # @return [FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules] - attr_reader :rules - - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Company::PayStatementItemListParams} for more details. - # - # Retrieve a list of detailed pay statement items for the access token's - # connection account. - # - # @overload list(categories: nil, end_date: nil, entity_ids: nil, name: nil, start_date: nil, type: nil, request_options: {}) - # - # @param categories [Array] Comma-delimited list of pay statement item categories to filter on. If empty, de - # - # @param end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in - # - # @param entity_ids [Array] The entity IDs to specify which entities' data to access. - # - # @param name [String] Case-insensitive partial match search by pay statement item name. - # - # @param start_date [Date] The start date to retrieve pay statement items by via their last seen pay date ( - # - # @param type [String] String search by pay statement item type. - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [FinchAPI::Internal::ResponsesPage] - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItemListParams - def list(params = {}) - parsed, options = FinchAPI::HRIS::Company::PayStatementItemListParams.dump_request(params) - query = FinchAPI::Internal::Util.encode_query_params(parsed) - @client.request( - method: :get, - path: "employer/pay-statement-item", - query: query, - page: FinchAPI::Internal::ResponsesPage, - model: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse, - security: {bearer_auth: true}, - options: options - ) - end - - # @api private - # - # @param client [FinchAPI::Client] - def initialize(client:) - @client = client - @rules = FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules.new(client: client) - end - end - end - end - end -end diff --git a/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb b/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb deleted file mode 100644 index d8c4bffa..00000000 --- a/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb +++ /dev/null @@ -1,144 +0,0 @@ -# frozen_string_literal: true - -module FinchAPI - module Resources - class HRIS - class Company - class PayStatementItem - class Rules - # Some parameter documentations has been truncated, see - # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams} for more - # details. - # - # 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. - # - # @overload create(entity_ids: nil, attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) - # - # @param entity_ids [Array] Query param: The entity IDs to create the rule for. - # - # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Body param: Specifies the fields to be applied when the condition is met. - # - # @param conditions [Array] Body param - # - # @param effective_end_date [String, nil] Body param: Specifies when the rules should stop applying rules based on the dat - # - # @param effective_start_date [String, nil] Body param: Specifies when the rule should begin applying based on the date. - # - # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] Body param: The entity type to which the rule is applied. - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse] - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams - def create(params = {}) - query_params = [:entity_ids] - parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams.dump_request(params) - query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) - @client.request( - method: :post, - path: "employer/pay-statement-item/rule", - query: query, - body: parsed.except(*query_params), - model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse, - security: {bearer_auth: true}, - options: options - ) - end - - # Update a rule for a pay statement item. - # - # @overload update(rule_id, entity_ids: nil, optional_property: nil, request_options: {}) - # - # @param rule_id [String] Path param - # - # @param entity_ids [Array] Query param: The entity IDs to update the rule for. - # - # @param optional_property [Object] Body param - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse] - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateParams - def update(rule_id, params = {}) - query_params = [:entity_ids] - parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleUpdateParams.dump_request(params) - query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) - @client.request( - method: :put, - path: ["employer/pay-statement-item/rule/%1$s", rule_id], - query: query, - body: parsed.except(*query_params), - model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse, - security: {bearer_auth: true}, - options: options - ) - end - - # List all rules of a connection account. - # - # @overload list(entity_ids: nil, request_options: {}) - # - # @param entity_ids [Array] The entity IDs to retrieve rules for. - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [FinchAPI::Internal::ResponsesPage] - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListParams - def list(params = {}) - parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleListParams.dump_request(params) - query = FinchAPI::Internal::Util.encode_query_params(parsed) - @client.request( - method: :get, - path: "employer/pay-statement-item/rule", - query: query, - page: FinchAPI::Internal::ResponsesPage, - model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse, - security: {bearer_auth: true}, - options: options - ) - end - - # Delete a rule for a pay statement item. - # - # @overload delete(rule_id, entity_ids: nil, request_options: {}) - # - # @param rule_id [String] - # - # @param entity_ids [Array] The entity IDs to delete the rule for. - # - # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] - # - # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse] - # - # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteParams - def delete(rule_id, params = {}) - parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleDeleteParams.dump_request(params) - query = FinchAPI::Internal::Util.encode_query_params(parsed) - @client.request( - method: :delete, - path: ["employer/pay-statement-item/rule/%1$s", rule_id], - query: query, - model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse, - security: {bearer_auth: true}, - options: options - ) - end - - # @api private - # - # @param client [FinchAPI::Client] - def initialize(client:) - @client = client - end - end - end - end - end - end -end diff --git a/lib/finch_api/resources/hris/pay_statement_item.rb b/lib/finch_api/resources/hris/pay_statement_item.rb new file mode 100644 index 00000000..33caba8c --- /dev/null +++ b/lib/finch_api/resources/hris/pay_statement_item.rb @@ -0,0 +1,59 @@ +# frozen_string_literal: true + +module FinchAPI + module Resources + class HRIS + class PayStatementItem + # @return [FinchAPI::Resources::HRIS::PayStatementItem::Rules] + attr_reader :rules + + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementItemListParams} for more details. + # + # Retrieve a list of detailed pay statement items for the access token's + # connection account. + # + # @overload list(categories: nil, end_date: nil, entity_ids: nil, name: nil, start_date: nil, type: nil, request_options: {}) + # + # @param categories [Array] Comma-delimited list of pay statement item categories to filter on. If empty, de + # + # @param end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in + # + # @param entity_ids [Array] The entity IDs to specify which entities' data to access. + # + # @param name [String] Case-insensitive partial match search by pay statement item name. + # + # @param start_date [Date] The start date to retrieve pay statement items by via their last seen pay date ( + # + # @param type [String] String search by pay statement item type. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [FinchAPI::Internal::ResponsesPage] + # + # @see FinchAPI::Models::HRIS::PayStatementItemListParams + def list(params = {}) + parsed, options = FinchAPI::HRIS::PayStatementItemListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "employer/pay-statement-item", + query: query, + page: FinchAPI::Internal::ResponsesPage, + model: FinchAPI::Models::HRIS::PayStatementItemListResponse, + security: {bearer_auth: true}, + options: options + ) + end + + # @api private + # + # @param client [FinchAPI::Client] + def initialize(client:) + @client = client + @rules = FinchAPI::Resources::HRIS::PayStatementItem::Rules.new(client: client) + end + end + end + end +end diff --git a/lib/finch_api/resources/hris/pay_statement_item/rules.rb b/lib/finch_api/resources/hris/pay_statement_item/rules.rb new file mode 100644 index 00000000..3684b7df --- /dev/null +++ b/lib/finch_api/resources/hris/pay_statement_item/rules.rb @@ -0,0 +1,141 @@ +# frozen_string_literal: true + +module FinchAPI + module Resources + class HRIS + class PayStatementItem + class Rules + # Some parameter documentations has been truncated, see + # {FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams} for more details. + # + # 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. + # + # @overload create(entity_ids: nil, attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {}) + # + # @param entity_ids [Array] Query param: The entity IDs to create the rule for. + # + # @param attributes [FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Attributes] Body param: Specifies the fields to be applied when the condition is met. + # + # @param conditions [Array] Body param + # + # @param effective_end_date [String, nil] Body param: Specifies when the rules should stop applying rules based on the dat + # + # @param effective_start_date [String, nil] Body param: Specifies when the rule should begin applying based on the date. + # + # @param entity_type [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::EntityType] Body param: The entity type to which the rule is applied. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse] + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams + def create(params = {}) + query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::PayStatementItem::RuleCreateParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) + @client.request( + method: :post, + path: "employer/pay-statement-item/rule", + query: query, + body: parsed.except(*query_params), + model: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse, + security: {bearer_auth: true}, + options: options + ) + end + + # Update a rule for a pay statement item. + # + # @overload update(rule_id, entity_ids: nil, optional_property: nil, request_options: {}) + # + # @param rule_id [String] Path param + # + # @param entity_ids [Array] Query param: The entity IDs to update the rule for. + # + # @param optional_property [Object] Body param + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse] + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateParams + def update(rule_id, params = {}) + query_params = [:entity_ids] + parsed, options = FinchAPI::HRIS::PayStatementItem::RuleUpdateParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed.slice(*query_params)) + @client.request( + method: :put, + path: ["employer/pay-statement-item/rule/%1$s", rule_id], + query: query, + body: parsed.except(*query_params), + model: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse, + security: {bearer_auth: true}, + options: options + ) + end + + # List all rules of a connection account. + # + # @overload list(entity_ids: nil, request_options: {}) + # + # @param entity_ids [Array] The entity IDs to retrieve rules for. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [FinchAPI::Internal::ResponsesPage] + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleListParams + def list(params = {}) + parsed, options = FinchAPI::HRIS::PayStatementItem::RuleListParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) + @client.request( + method: :get, + path: "employer/pay-statement-item/rule", + query: query, + page: FinchAPI::Internal::ResponsesPage, + model: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse, + security: {bearer_auth: true}, + options: options + ) + end + + # Delete a rule for a pay statement item. + # + # @overload delete(rule_id, entity_ids: nil, request_options: {}) + # + # @param rule_id [String] + # + # @param entity_ids [Array] The entity IDs to delete the rule for. + # + # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil] + # + # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse] + # + # @see FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteParams + def delete(rule_id, params = {}) + parsed, options = FinchAPI::HRIS::PayStatementItem::RuleDeleteParams.dump_request(params) + query = FinchAPI::Internal::Util.encode_query_params(parsed) + @client.request( + method: :delete, + path: ["employer/pay-statement-item/rule/%1$s", rule_id], + query: query, + model: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse, + security: {bearer_auth: true}, + options: options + ) + end + + # @api private + # + # @param client [FinchAPI::Client] + def initialize(client:) + @client = client + end + end + end + end + end +end diff --git a/lib/finch_api/version.rb b/lib/finch_api/version.rb index 7c97b956..949ae72d 100644 --- a/lib/finch_api/version.rb +++ b/lib/finch_api/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module FinchAPI - VERSION = "0.1.0.pre.alpha.44" + VERSION = "0.1.0.pre.alpha.45" end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi deleted file mode 100644 index 0e6fb196..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi +++ /dev/null @@ -1,319 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - class RuleCreateParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams, - FinchAPI::Internal::AnyHash - ) - end - - # The entity IDs to create the rule for. - sig { returns(T.nilable(T::Array[String])) } - attr_reader :entity_ids - - sig { params(entity_ids: T::Array[String]).void } - attr_writer :entity_ids - - # Specifies the fields to be applied when the condition is met. - sig do - returns( - T.nilable( - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes::OrHash - ).void - end - attr_writer :attributes - - sig do - returns( - T.nilable( - T::Array[ - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition - ] - ) - ) - end - attr_reader :conditions - - sig do - params( - conditions: - T::Array[ - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::OrHash - ] - ).void - end - attr_writer :conditions - - # Specifies when the rules should stop applying rules based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_end_date - - # Specifies when the rule should begin applying based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_start_date - - # The entity type to which the rule is applied. - sig do - returns( - T.nilable( - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType::OrSymbol - ) - ) - end - attr_reader :entity_type - - sig do - params( - entity_type: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType::OrSymbol - ).void - end - attr_writer :entity_type - - sig do - params( - entity_ids: T::Array[String], - attributes: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes::OrHash, - conditions: - T::Array[ - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::OrHash - ], - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType::OrSymbol, - request_options: FinchAPI::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - # The entity IDs to create the rule for. - entity_ids: nil, - # Specifies the fields to be applied when the condition is met. - attributes: nil, - conditions: nil, - # Specifies when the rules should stop applying rules based on the date. - effective_end_date: nil, - # Specifies when the rule should begin applying based on the date. - effective_start_date: nil, - # The entity type to which the rule is applied. - entity_type: nil, - request_options: {} - ) - end - - sig do - override.returns( - { - entity_ids: T::Array[String], - attributes: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, - conditions: - T::Array[ - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition - ], - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType::OrSymbol, - request_options: FinchAPI::RequestOptions - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_reader :metadata - - sig { params(metadata: T::Hash[Symbol, T.anything]).void } - attr_writer :metadata - - # Specifies the fields to be applied when the condition is met. - sig do - params(metadata: T::Hash[Symbol, T.anything]).returns( - T.attached_class - ) - end - def self.new( - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - metadata: nil - ) - end - - sig do - override.returns({ metadata: T::Hash[Symbol, T.anything] }) - end - def to_hash - end - end - - class Condition < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition, - FinchAPI::Internal::AnyHash - ) - end - - # The field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :field - - sig { params(field: String).void } - attr_writer :field - - # The operator to be used in the rule. - sig do - returns( - T.nilable( - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator::OrSymbol - ) - ) - end - attr_reader :operator - - sig do - params( - operator: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator::OrSymbol - ).void - end - attr_writer :operator - - # The value of the field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :value - - sig { params(value: String).void } - attr_writer :value - - sig do - params( - field: String, - operator: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator::OrSymbol, - value: String - ).returns(T.attached_class) - end - def self.new( - # The field to be checked in the rule. - field: nil, - # The operator to be used in the rule. - operator: nil, - # The value of the field to be checked in the rule. - value: nil - ) - end - - sig do - override.returns( - { - field: String, - operator: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator::OrSymbol, - value: String - } - ) - end - def to_hash - end - - # The operator to be used in the rule. - module Operator - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - EQUALS = - T.let( - :equals, - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # The entity type to which the rule is applied. - module EntityType - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - PAY_STATEMENT_ITEM = - T.let( - :pay_statement_item, - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi deleted file mode 100644 index 66d58147..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi +++ /dev/null @@ -1,346 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - class RuleCreateResponse < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse, - FinchAPI::Internal::AnyHash - ) - end - - # Finch id (uuidv4) for the rule. - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id - - # Specifies the fields to be applied when the condition is met. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes::OrHash - ).void - end - attr_writer :attributes - - sig do - returns( - T.nilable( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition - ] - ) - ) - end - attr_reader :conditions - - sig do - params( - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::OrHash - ] - ).void - end - attr_writer :conditions - - # The datetime when the rule was created. - sig { returns(T.nilable(Time)) } - attr_reader :created_at - - sig { params(created_at: Time).void } - attr_writer :created_at - - # Specifies when the rules should stop applying rules based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_end_date - - # Specifies when the rule should begin applying based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_start_date - - # The entity type to which the rule is applied. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType::TaggedSymbol - ) - ) - end - attr_reader :entity_type - - sig do - params( - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType::OrSymbol - ).void - end - attr_writer :entity_type - - # The priority of the rule. - sig { returns(T.nilable(Integer)) } - attr_reader :priority - - sig { params(priority: Integer).void } - attr_writer :priority - - # The datetime when the rule was last updated. - sig { returns(T.nilable(Time)) } - attr_reader :updated_at - - sig { params(updated_at: Time).void } - attr_writer :updated_at - - sig do - params( - id: String, - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes::OrHash, - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::OrHash - ], - created_at: Time, - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType::OrSymbol, - priority: Integer, - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # Finch id (uuidv4) for the rule. - id: nil, - # Specifies the fields to be applied when the condition is met. - attributes: nil, - conditions: nil, - # The datetime when the rule was created. - created_at: nil, - # Specifies when the rules should stop applying rules based on the date. - effective_end_date: nil, - # Specifies when the rule should begin applying based on the date. - effective_start_date: nil, - # The entity type to which the rule is applied. - entity_type: nil, - # The priority of the rule. - priority: nil, - # The datetime when the rule was last updated. - updated_at: nil - ) - end - - sig do - override.returns( - { - id: String, - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes, - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition - ], - created_at: Time, - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType::TaggedSymbol, - priority: Integer, - updated_at: Time - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_reader :metadata - - sig { params(metadata: T::Hash[Symbol, T.anything]).void } - attr_writer :metadata - - # Specifies the fields to be applied when the condition is met. - sig do - params(metadata: T::Hash[Symbol, T.anything]).returns( - T.attached_class - ) - end - def self.new( - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - metadata: nil - ) - end - - sig do - override.returns({ metadata: T::Hash[Symbol, T.anything] }) - end - def to_hash - end - end - - class Condition < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition, - FinchAPI::Internal::AnyHash - ) - end - - # The field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :field - - sig { params(field: String).void } - attr_writer :field - - # The operator to be used in the rule. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator::TaggedSymbol - ) - ) - end - attr_reader :operator - - sig do - params( - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator::OrSymbol - ).void - end - attr_writer :operator - - # The value of the field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :value - - sig { params(value: String).void } - attr_writer :value - - sig do - params( - field: String, - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator::OrSymbol, - value: String - ).returns(T.attached_class) - end - def self.new( - # The field to be checked in the rule. - field: nil, - # The operator to be used in the rule. - operator: nil, - # The value of the field to be checked in the rule. - value: nil - ) - end - - sig do - override.returns( - { - field: String, - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator::TaggedSymbol, - value: String - } - ) - end - def to_hash - end - - # The operator to be used in the rule. - module Operator - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - EQUALS = - T.let( - :equals, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::Operator::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # The entity type to which the rule is applied. - module EntityType - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - PAY_STATEMENT_ITEM = - T.let( - :pay_statement_item, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi deleted file mode 100644 index 76a72572..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi +++ /dev/null @@ -1,61 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::Company::PayStatementItem::RuleDeleteParams, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :rule_id - - # The entity IDs to delete the rule for. - sig { returns(T.nilable(T::Array[String])) } - attr_reader :entity_ids - - sig { params(entity_ids: T::Array[String]).void } - attr_writer :entity_ids - - sig do - params( - rule_id: String, - entity_ids: T::Array[String], - request_options: FinchAPI::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - rule_id:, - # The entity IDs to delete the rule for. - entity_ids: nil, - request_options: {} - ) - end - - sig do - override.returns( - { - rule_id: String, - entity_ids: T::Array[String], - request_options: FinchAPI::RequestOptions - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi deleted file mode 100644 index 864a1248..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi +++ /dev/null @@ -1,357 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - class RuleDeleteResponse < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse, - FinchAPI::Internal::AnyHash - ) - end - - # Finch id (uuidv4) for the rule. - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id - - # Specifies the fields to be applied when the condition is met. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes::OrHash - ).void - end - attr_writer :attributes - - sig do - returns( - T.nilable( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition - ] - ) - ) - end - attr_reader :conditions - - sig do - params( - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::OrHash - ] - ).void - end - attr_writer :conditions - - # The datetime when the rule was created. - sig { returns(T.nilable(Time)) } - attr_reader :created_at - - sig { params(created_at: Time).void } - attr_writer :created_at - - # The datetime when the rule was deleted. - sig { returns(T.nilable(Time)) } - attr_reader :deleted_at - - sig { params(deleted_at: Time).void } - attr_writer :deleted_at - - # Specifies when the rules should stop applying rules based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_end_date - - # Specifies when the rule should begin applying based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_start_date - - # The entity type to which the rule is applied. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType::TaggedSymbol - ) - ) - end - attr_reader :entity_type - - sig do - params( - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType::OrSymbol - ).void - end - attr_writer :entity_type - - # The priority of the rule. - sig { returns(T.nilable(Integer)) } - attr_reader :priority - - sig { params(priority: Integer).void } - attr_writer :priority - - # The datetime when the rule was last updated. - sig { returns(T.nilable(Time)) } - attr_reader :updated_at - - sig { params(updated_at: Time).void } - attr_writer :updated_at - - sig do - params( - id: String, - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes::OrHash, - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::OrHash - ], - created_at: Time, - deleted_at: Time, - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType::OrSymbol, - priority: Integer, - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # Finch id (uuidv4) for the rule. - id: nil, - # Specifies the fields to be applied when the condition is met. - attributes: nil, - conditions: nil, - # The datetime when the rule was created. - created_at: nil, - # The datetime when the rule was deleted. - deleted_at: nil, - # Specifies when the rules should stop applying rules based on the date. - effective_end_date: nil, - # Specifies when the rule should begin applying based on the date. - effective_start_date: nil, - # The entity type to which the rule is applied. - entity_type: nil, - # The priority of the rule. - priority: nil, - # The datetime when the rule was last updated. - updated_at: nil - ) - end - - sig do - override.returns( - { - id: String, - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes, - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition - ], - created_at: Time, - deleted_at: Time, - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType::TaggedSymbol, - priority: Integer, - updated_at: Time - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_reader :metadata - - sig { params(metadata: T::Hash[Symbol, T.anything]).void } - attr_writer :metadata - - # Specifies the fields to be applied when the condition is met. - sig do - params(metadata: T::Hash[Symbol, T.anything]).returns( - T.attached_class - ) - end - def self.new( - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - metadata: nil - ) - end - - sig do - override.returns({ metadata: T::Hash[Symbol, T.anything] }) - end - def to_hash - end - end - - class Condition < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition, - FinchAPI::Internal::AnyHash - ) - end - - # The field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :field - - sig { params(field: String).void } - attr_writer :field - - # The operator to be used in the rule. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator::TaggedSymbol - ) - ) - end - attr_reader :operator - - sig do - params( - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator::OrSymbol - ).void - end - attr_writer :operator - - # The value of the field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :value - - sig { params(value: String).void } - attr_writer :value - - sig do - params( - field: String, - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator::OrSymbol, - value: String - ).returns(T.attached_class) - end - def self.new( - # The field to be checked in the rule. - field: nil, - # The operator to be used in the rule. - operator: nil, - # The value of the field to be checked in the rule. - value: nil - ) - end - - sig do - override.returns( - { - field: String, - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator::TaggedSymbol, - value: String - } - ) - end - def to_hash - end - - # The operator to be used in the rule. - module Operator - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - EQUALS = - T.let( - :equals, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::Operator::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # The entity type to which the rule is applied. - module EntityType - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - PAY_STATEMENT_ITEM = - T.let( - :pay_statement_item, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi deleted file mode 100644 index ee5e2dc5..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi +++ /dev/null @@ -1,55 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - class RuleListParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::Company::PayStatementItem::RuleListParams, - FinchAPI::Internal::AnyHash - ) - end - - # The entity IDs to retrieve rules for. - sig { returns(T.nilable(T::Array[String])) } - attr_reader :entity_ids - - sig { params(entity_ids: T::Array[String]).void } - attr_writer :entity_ids - - sig do - params( - entity_ids: T::Array[String], - request_options: FinchAPI::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - # The entity IDs to retrieve rules for. - entity_ids: nil, - request_options: {} - ) - end - - sig do - override.returns( - { - entity_ids: T::Array[String], - request_options: FinchAPI::RequestOptions - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi deleted file mode 100644 index 34ab90f6..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi +++ /dev/null @@ -1,346 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - class RuleListResponse < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse, - FinchAPI::Internal::AnyHash - ) - end - - # Finch id (uuidv4) for the rule. - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id - - # Specifies the fields to be applied when the condition is met. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes::OrHash - ).void - end - attr_writer :attributes - - sig do - returns( - T.nilable( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition - ] - ) - ) - end - attr_reader :conditions - - sig do - params( - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::OrHash - ] - ).void - end - attr_writer :conditions - - # The datetime when the rule was created. - sig { returns(T.nilable(Time)) } - attr_reader :created_at - - sig { params(created_at: Time).void } - attr_writer :created_at - - # Specifies when the rules should stop applying rules based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_end_date - - # Specifies when the rule should begin applying based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_start_date - - # The entity type to which the rule is applied. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType::TaggedSymbol - ) - ) - end - attr_reader :entity_type - - sig do - params( - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType::OrSymbol - ).void - end - attr_writer :entity_type - - # The priority of the rule. - sig { returns(T.nilable(Integer)) } - attr_reader :priority - - sig { params(priority: Integer).void } - attr_writer :priority - - # The datetime when the rule was last updated. - sig { returns(T.nilable(Time)) } - attr_reader :updated_at - - sig { params(updated_at: Time).void } - attr_writer :updated_at - - sig do - params( - id: String, - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes::OrHash, - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::OrHash - ], - created_at: Time, - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType::OrSymbol, - priority: Integer, - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # Finch id (uuidv4) for the rule. - id: nil, - # Specifies the fields to be applied when the condition is met. - attributes: nil, - conditions: nil, - # The datetime when the rule was created. - created_at: nil, - # Specifies when the rules should stop applying rules based on the date. - effective_end_date: nil, - # Specifies when the rule should begin applying based on the date. - effective_start_date: nil, - # The entity type to which the rule is applied. - entity_type: nil, - # The priority of the rule. - priority: nil, - # The datetime when the rule was last updated. - updated_at: nil - ) - end - - sig do - override.returns( - { - id: String, - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes, - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition - ], - created_at: Time, - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType::TaggedSymbol, - priority: Integer, - updated_at: Time - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_reader :metadata - - sig { params(metadata: T::Hash[Symbol, T.anything]).void } - attr_writer :metadata - - # Specifies the fields to be applied when the condition is met. - sig do - params(metadata: T::Hash[Symbol, T.anything]).returns( - T.attached_class - ) - end - def self.new( - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - metadata: nil - ) - end - - sig do - override.returns({ metadata: T::Hash[Symbol, T.anything] }) - end - def to_hash - end - end - - class Condition < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition, - FinchAPI::Internal::AnyHash - ) - end - - # The field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :field - - sig { params(field: String).void } - attr_writer :field - - # The operator to be used in the rule. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator::TaggedSymbol - ) - ) - end - attr_reader :operator - - sig do - params( - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator::OrSymbol - ).void - end - attr_writer :operator - - # The value of the field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :value - - sig { params(value: String).void } - attr_writer :value - - sig do - params( - field: String, - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator::OrSymbol, - value: String - ).returns(T.attached_class) - end - def self.new( - # The field to be checked in the rule. - field: nil, - # The operator to be used in the rule. - operator: nil, - # The value of the field to be checked in the rule. - value: nil - ) - end - - sig do - override.returns( - { - field: String, - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator::TaggedSymbol, - value: String - } - ) - end - def to_hash - end - - # The operator to be used in the rule. - module Operator - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - EQUALS = - T.let( - :equals, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::Operator::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # The entity type to which the rule is applied. - module EntityType - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - PAY_STATEMENT_ITEM = - T.let( - :pay_statement_item, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi deleted file mode 100644 index 9995fad7..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi +++ /dev/null @@ -1,70 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::Company::PayStatementItem::RuleUpdateParams, - FinchAPI::Internal::AnyHash - ) - end - - sig { returns(String) } - attr_accessor :rule_id - - # The entity IDs to update the rule for. - sig { returns(T.nilable(T::Array[String])) } - attr_reader :entity_ids - - sig { params(entity_ids: T::Array[String]).void } - attr_writer :entity_ids - - sig { returns(T.nilable(T.anything)) } - attr_reader :optional_property - - sig { params(optional_property: T.anything).void } - attr_writer :optional_property - - sig do - params( - rule_id: String, - entity_ids: T::Array[String], - optional_property: T.anything, - request_options: FinchAPI::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - rule_id:, - # The entity IDs to update the rule for. - entity_ids: nil, - optional_property: nil, - request_options: {} - ) - end - - sig do - override.returns( - { - rule_id: String, - entity_ids: T::Array[String], - optional_property: T.anything, - request_options: FinchAPI::RequestOptions - } - ) - end - def to_hash - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi deleted file mode 100644 index 3cc83160..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi +++ /dev/null @@ -1,346 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - class RuleUpdateResponse < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse, - FinchAPI::Internal::AnyHash - ) - end - - # Finch id (uuidv4) for the rule. - sig { returns(T.nilable(String)) } - attr_reader :id - - sig { params(id: String).void } - attr_writer :id - - # Specifies the fields to be applied when the condition is met. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes - ) - ) - end - attr_reader :attributes - - sig do - params( - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes::OrHash - ).void - end - attr_writer :attributes - - sig do - returns( - T.nilable( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition - ] - ) - ) - end - attr_reader :conditions - - sig do - params( - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::OrHash - ] - ).void - end - attr_writer :conditions - - # The datetime when the rule was created. - sig { returns(T.nilable(Time)) } - attr_reader :created_at - - sig { params(created_at: Time).void } - attr_writer :created_at - - # Specifies when the rules should stop applying rules based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_end_date - - # Specifies when the rule should begin applying based on the date. - sig { returns(T.nilable(String)) } - attr_accessor :effective_start_date - - # The entity type to which the rule is applied. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType::TaggedSymbol - ) - ) - end - attr_reader :entity_type - - sig do - params( - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType::OrSymbol - ).void - end - attr_writer :entity_type - - # The priority of the rule. - sig { returns(T.nilable(Integer)) } - attr_reader :priority - - sig { params(priority: Integer).void } - attr_writer :priority - - # The datetime when the rule was last updated. - sig { returns(T.nilable(Time)) } - attr_reader :updated_at - - sig { params(updated_at: Time).void } - attr_writer :updated_at - - sig do - params( - id: String, - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes::OrHash, - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::OrHash - ], - created_at: Time, - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType::OrSymbol, - priority: Integer, - updated_at: Time - ).returns(T.attached_class) - end - def self.new( - # Finch id (uuidv4) for the rule. - id: nil, - # Specifies the fields to be applied when the condition is met. - attributes: nil, - conditions: nil, - # The datetime when the rule was created. - created_at: nil, - # Specifies when the rules should stop applying rules based on the date. - effective_end_date: nil, - # Specifies when the rule should begin applying based on the date. - effective_start_date: nil, - # The entity type to which the rule is applied. - entity_type: nil, - # The priority of the rule. - priority: nil, - # The datetime when the rule was last updated. - updated_at: nil - ) - end - - sig do - override.returns( - { - id: String, - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes, - conditions: - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition - ], - created_at: Time, - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType::TaggedSymbol, - priority: Integer, - updated_at: Time - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } - attr_reader :metadata - - sig { params(metadata: T::Hash[Symbol, T.anything]).void } - attr_writer :metadata - - # Specifies the fields to be applied when the condition is met. - sig do - params(metadata: T::Hash[Symbol, T.anything]).returns( - T.attached_class - ) - end - def self.new( - # The metadata to be attached in the entity. It is a key-value pairs where the - # values can be of any type (string, number, boolean, object, array, etc.). - metadata: nil - ) - end - - sig do - override.returns({ metadata: T::Hash[Symbol, T.anything] }) - end - def to_hash - end - end - - class Condition < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition, - FinchAPI::Internal::AnyHash - ) - end - - # The field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :field - - sig { params(field: String).void } - attr_writer :field - - # The operator to be used in the rule. - sig do - returns( - T.nilable( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator::TaggedSymbol - ) - ) - end - attr_reader :operator - - sig do - params( - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator::OrSymbol - ).void - end - attr_writer :operator - - # The value of the field to be checked in the rule. - sig { returns(T.nilable(String)) } - attr_reader :value - - sig { params(value: String).void } - attr_writer :value - - sig do - params( - field: String, - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator::OrSymbol, - value: String - ).returns(T.attached_class) - end - def self.new( - # The field to be checked in the rule. - field: nil, - # The operator to be used in the rule. - operator: nil, - # The value of the field to be checked in the rule. - value: nil - ) - end - - sig do - override.returns( - { - field: String, - operator: - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator::TaggedSymbol, - value: String - } - ) - end - def to_hash - end - - # The operator to be used in the rule. - module Operator - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - EQUALS = - T.let( - :equals, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::Operator::TaggedSymbol - ] - ) - end - def self.values - end - end - end - - # The entity type to which the rule is applied. - module EntityType - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - PAY_STATEMENT_ITEM = - T.let( - :pay_statement_item, - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi b/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi deleted file mode 100644 index 2f9c0f47..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi +++ /dev/null @@ -1,179 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - OrHash = - T.type_alias do - T.any( - FinchAPI::HRIS::Company::PayStatementItemListParams, - FinchAPI::Internal::AnyHash - ) - end - - # Comma-delimited list of pay statement item categories to filter on. If empty, - # defaults to all categories. - sig do - returns( - T.nilable( - T::Array[ - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::OrSymbol - ] - ) - ) - end - attr_reader :categories - - sig do - params( - categories: - T::Array[ - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::OrSymbol - ] - ).void - end - attr_writer :categories - - # The end date to retrieve pay statement items by via their last seen pay date in - # `YYYY-MM-DD` format. - sig { returns(T.nilable(Date)) } - attr_reader :end_date - - sig { params(end_date: Date).void } - attr_writer :end_date - - # The entity IDs to specify which entities' data to access. - sig { returns(T.nilable(T::Array[String])) } - attr_reader :entity_ids - - sig { params(entity_ids: T::Array[String]).void } - attr_writer :entity_ids - - # Case-insensitive partial match search by pay statement item name. - sig { returns(T.nilable(String)) } - attr_reader :name - - sig { params(name: String).void } - attr_writer :name - - # The start date to retrieve pay statement items by via their last seen pay date - # (inclusive) in `YYYY-MM-DD` format. - sig { returns(T.nilable(Date)) } - attr_reader :start_date - - sig { params(start_date: Date).void } - attr_writer :start_date - - # String search by pay statement item type. - sig { returns(T.nilable(String)) } - attr_reader :type - - sig { params(type: String).void } - attr_writer :type - - sig do - params( - categories: - T::Array[ - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::OrSymbol - ], - end_date: Date, - entity_ids: T::Array[String], - name: String, - start_date: Date, - type: String, - request_options: FinchAPI::RequestOptions::OrHash - ).returns(T.attached_class) - end - def self.new( - # Comma-delimited list of pay statement item categories to filter on. If empty, - # defaults to all categories. - categories: nil, - # The end date to retrieve pay statement items by via their last seen pay date in - # `YYYY-MM-DD` format. - end_date: nil, - # The entity IDs to specify which entities' data to access. - entity_ids: nil, - # Case-insensitive partial match search by pay statement item name. - name: nil, - # The start date to retrieve pay statement items by via their last seen pay date - # (inclusive) in `YYYY-MM-DD` format. - start_date: nil, - # String search by pay statement item type. - type: nil, - request_options: {} - ) - end - - sig do - override.returns( - { - categories: - T::Array[ - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::OrSymbol - ], - end_date: Date, - entity_ids: T::Array[String], - name: String, - start_date: Date, - type: String, - request_options: FinchAPI::RequestOptions - } - ) - end - def to_hash - end - - module Category - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::HRIS::Company::PayStatementItemListParams::Category - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - EARNINGS = - T.let( - :earnings, - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::TaggedSymbol - ) - TAXES = - T.let( - :taxes, - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::TaggedSymbol - ) - EMPLOYEE_DEDUCTIONS = - T.let( - :employee_deductions, - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::TaggedSymbol - ) - EMPLOYER_CONTRIBUTIONS = - T.let( - :employer_contributions, - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi b/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi deleted file mode 100644 index 45b6c134..00000000 --- a/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi +++ /dev/null @@ -1,191 +0,0 @@ -# typed: strong - -module FinchAPI - module Models - module HRIS - module Company - class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse, - FinchAPI::Internal::AnyHash - ) - end - - # The attributes of the pay statement item. - sig do - returns( - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes - ) - end - attr_reader :attributes - - sig do - params( - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes::OrHash - ).void - end - attr_writer :attributes - - # The category of the pay statement item. - sig do - returns( - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol - ) - end - attr_accessor :category - - # The name of the pay statement item. - sig { returns(String) } - attr_accessor :name - - sig do - params( - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes::OrHash, - category: - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::OrSymbol, - name: String - ).returns(T.attached_class) - end - def self.new( - # The attributes of the pay statement item. - attributes:, - # The category of the pay statement item. - category:, - # The name of the pay statement item. - name: - ) - end - - sig do - override.returns( - { - attributes: - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, - category: - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol, - name: String - } - ) - end - def to_hash - end - - class Attributes < FinchAPI::Internal::Type::BaseModel - OrHash = - T.type_alias do - T.any( - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, - FinchAPI::Internal::AnyHash - ) - end - - # The metadata of the pay statement item derived by the rules engine if available. - # Each attribute will be a key-value pair defined by a rule. - sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } - attr_accessor :metadata - - # `true` if the amount is paid by the employers. This field is only available for - # taxes. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :employer - - # `true` if the pay statement item is pre-tax. This field is only available for - # employee deductions. - sig { returns(T.nilable(T::Boolean)) } - attr_accessor :pre_tax - - # The type of the pay statement item. - sig { returns(T.nilable(String)) } - attr_accessor :type - - # The attributes of the pay statement item. - sig do - params( - metadata: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), - employer: T.nilable(T::Boolean), - pre_tax: T.nilable(T::Boolean), - type: T.nilable(String) - ).returns(T.attached_class) - end - def self.new( - # The metadata of the pay statement item derived by the rules engine if available. - # Each attribute will be a key-value pair defined by a rule. - metadata:, - # `true` if the amount is paid by the employers. This field is only available for - # taxes. - employer: nil, - # `true` if the pay statement item is pre-tax. This field is only available for - # employee deductions. - pre_tax: nil, - # The type of the pay statement item. - type: nil - ) - end - - sig do - override.returns( - { - metadata: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), - employer: T.nilable(T::Boolean), - pre_tax: T.nilable(T::Boolean), - type: T.nilable(String) - } - ) - end - def to_hash - end - end - - # The category of the pay statement item. - module Category - extend FinchAPI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all( - Symbol, - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category - ) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - EARNINGS = - T.let( - :earnings, - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol - ) - TAXES = - T.let( - :taxes, - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol - ) - EMPLOYEE_DEDUCTIONS = - T.let( - :employee_deductions, - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol - ) - EMPLOYER_CONTRIBUTIONS = - T.let( - :employer_contributions, - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category::TaggedSymbol - ] - ) - end - def self.values - end - end - end - end - end - end -end diff --git a/rbi/finch_api/models/hris/pay_statement_item/rule_create_params.rbi b/rbi/finch_api/models/hris/pay_statement_item/rule_create_params.rbi new file mode 100644 index 00000000..f6553029 --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item/rule_create_params.rbi @@ -0,0 +1,315 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + module PayStatementItem + class RuleCreateParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementItem::RuleCreateParams, + FinchAPI::Internal::AnyHash + ) + end + + # The entity IDs to create the rule for. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + + # Specifies the fields to be applied when the condition is met. + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes::OrHash + ).void + end + attr_writer :attributes + + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition + ] + ) + ) + end + attr_reader :conditions + + sig do + params( + conditions: + T::Array[ + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::OrHash + ] + ).void + end + attr_writer :conditions + + # Specifies when the rules should stop applying rules based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_end_date + + # Specifies when the rule should begin applying based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_start_date + + # The entity type to which the rule is applied. + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::EntityType::OrSymbol + ) + ) + end + attr_reader :entity_type + + sig do + params( + entity_type: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::EntityType::OrSymbol + ).void + end + attr_writer :entity_type + + sig do + params( + entity_ids: T::Array[String], + attributes: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes::OrHash, + conditions: + T::Array[ + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::OrHash + ], + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::EntityType::OrSymbol, + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The entity IDs to create the rule for. + entity_ids: nil, + # Specifies the fields to be applied when the condition is met. + attributes: nil, + conditions: nil, + # Specifies when the rules should stop applying rules based on the date. + effective_end_date: nil, + # Specifies when the rule should begin applying based on the date. + effective_start_date: nil, + # The entity type to which the rule is applied. + entity_type: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + entity_ids: T::Array[String], + attributes: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes, + conditions: + T::Array[ + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition + ], + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::EntityType::OrSymbol, + request_options: FinchAPI::RequestOptions + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_reader :metadata + + sig { params(metadata: T::Hash[Symbol, T.anything]).void } + attr_writer :metadata + + # Specifies the fields to be applied when the condition is met. + sig do + params(metadata: T::Hash[Symbol, T.anything]).returns( + T.attached_class + ) + end + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ) + end + + sig { override.returns({ metadata: T::Hash[Symbol, T.anything] }) } + def to_hash + end + end + + class Condition < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition, + FinchAPI::Internal::AnyHash + ) + end + + # The field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :field + + sig { params(field: String).void } + attr_writer :field + + # The operator to be used in the rule. + sig do + returns( + T.nilable( + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator::OrSymbol + ) + ) + end + attr_reader :operator + + sig do + params( + operator: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator::OrSymbol + ).void + end + attr_writer :operator + + # The value of the field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :value + + sig { params(value: String).void } + attr_writer :value + + sig do + params( + field: String, + operator: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator::OrSymbol, + value: String + ).returns(T.attached_class) + end + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ) + end + + sig do + override.returns( + { + field: String, + operator: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator::OrSymbol, + value: String + } + ) + end + def to_hash + end + + # The operator to be used in the rule. + module Operator + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EQUALS = + T.let( + :equals, + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # The entity type to which the rule is applied. + module EntityType + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::EntityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PAY_STATEMENT_ITEM = + T.let( + :pay_statement_item, + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::EntityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::EntityType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_item/rule_create_response.rbi b/rbi/finch_api/models/hris/pay_statement_item/rule_create_response.rbi new file mode 100644 index 00000000..cf08d6ec --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item/rule_create_response.rbi @@ -0,0 +1,342 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + module PayStatementItem + class RuleCreateResponse < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse, + FinchAPI::Internal::AnyHash + ) + end + + # Finch id (uuidv4) for the rule. + sig { returns(T.nilable(String)) } + attr_reader :id + + sig { params(id: String).void } + attr_writer :id + + # Specifies the fields to be applied when the condition is met. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes::OrHash + ).void + end + attr_writer :attributes + + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition + ] + ) + ) + end + attr_reader :conditions + + sig do + params( + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::OrHash + ] + ).void + end + attr_writer :conditions + + # The datetime when the rule was created. + sig { returns(T.nilable(Time)) } + attr_reader :created_at + + sig { params(created_at: Time).void } + attr_writer :created_at + + # Specifies when the rules should stop applying rules based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_end_date + + # Specifies when the rule should begin applying based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_start_date + + # The entity type to which the rule is applied. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType::TaggedSymbol + ) + ) + end + attr_reader :entity_type + + sig do + params( + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType::OrSymbol + ).void + end + attr_writer :entity_type + + # The priority of the rule. + sig { returns(T.nilable(Integer)) } + attr_reader :priority + + sig { params(priority: Integer).void } + attr_writer :priority + + # The datetime when the rule was last updated. + sig { returns(T.nilable(Time)) } + attr_reader :updated_at + + sig { params(updated_at: Time).void } + attr_writer :updated_at + + sig do + params( + id: String, + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes::OrHash, + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::OrHash + ], + created_at: Time, + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType::OrSymbol, + priority: Integer, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # Finch id (uuidv4) for the rule. + id: nil, + # Specifies the fields to be applied when the condition is met. + attributes: nil, + conditions: nil, + # The datetime when the rule was created. + created_at: nil, + # Specifies when the rules should stop applying rules based on the date. + effective_end_date: nil, + # Specifies when the rule should begin applying based on the date. + effective_start_date: nil, + # The entity type to which the rule is applied. + entity_type: nil, + # The priority of the rule. + priority: nil, + # The datetime when the rule was last updated. + updated_at: nil + ) + end + + sig do + override.returns( + { + id: String, + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes, + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition + ], + created_at: Time, + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType::TaggedSymbol, + priority: Integer, + updated_at: Time + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_reader :metadata + + sig { params(metadata: T::Hash[Symbol, T.anything]).void } + attr_writer :metadata + + # Specifies the fields to be applied when the condition is met. + sig do + params(metadata: T::Hash[Symbol, T.anything]).returns( + T.attached_class + ) + end + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ) + end + + sig { override.returns({ metadata: T::Hash[Symbol, T.anything] }) } + def to_hash + end + end + + class Condition < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition, + FinchAPI::Internal::AnyHash + ) + end + + # The field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :field + + sig { params(field: String).void } + attr_writer :field + + # The operator to be used in the rule. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator::TaggedSymbol + ) + ) + end + attr_reader :operator + + sig do + params( + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator::OrSymbol + ).void + end + attr_writer :operator + + # The value of the field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :value + + sig { params(value: String).void } + attr_writer :value + + sig do + params( + field: String, + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator::OrSymbol, + value: String + ).returns(T.attached_class) + end + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ) + end + + sig do + override.returns( + { + field: String, + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator::TaggedSymbol, + value: String + } + ) + end + def to_hash + end + + # The operator to be used in the rule. + module Operator + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EQUALS = + T.let( + :equals, + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # The entity type to which the rule is applied. + module EntityType + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PAY_STATEMENT_ITEM = + T.let( + :pay_statement_item, + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_item/rule_delete_params.rbi b/rbi/finch_api/models/hris/pay_statement_item/rule_delete_params.rbi new file mode 100644 index 00000000..1e02b6bd --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item/rule_delete_params.rbi @@ -0,0 +1,59 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + module PayStatementItem + class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementItem::RuleDeleteParams, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :rule_id + + # The entity IDs to delete the rule for. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + + sig do + params( + rule_id: String, + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + rule_id:, + # The entity IDs to delete the rule for. + entity_ids: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + rule_id: String, + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_item/rule_delete_response.rbi b/rbi/finch_api/models/hris/pay_statement_item/rule_delete_response.rbi new file mode 100644 index 00000000..a65d1a7e --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item/rule_delete_response.rbi @@ -0,0 +1,353 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + module PayStatementItem + class RuleDeleteResponse < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse, + FinchAPI::Internal::AnyHash + ) + end + + # Finch id (uuidv4) for the rule. + sig { returns(T.nilable(String)) } + attr_reader :id + + sig { params(id: String).void } + attr_writer :id + + # Specifies the fields to be applied when the condition is met. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes::OrHash + ).void + end + attr_writer :attributes + + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition + ] + ) + ) + end + attr_reader :conditions + + sig do + params( + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::OrHash + ] + ).void + end + attr_writer :conditions + + # The datetime when the rule was created. + sig { returns(T.nilable(Time)) } + attr_reader :created_at + + sig { params(created_at: Time).void } + attr_writer :created_at + + # The datetime when the rule was deleted. + sig { returns(T.nilable(Time)) } + attr_reader :deleted_at + + sig { params(deleted_at: Time).void } + attr_writer :deleted_at + + # Specifies when the rules should stop applying rules based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_end_date + + # Specifies when the rule should begin applying based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_start_date + + # The entity type to which the rule is applied. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType::TaggedSymbol + ) + ) + end + attr_reader :entity_type + + sig do + params( + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType::OrSymbol + ).void + end + attr_writer :entity_type + + # The priority of the rule. + sig { returns(T.nilable(Integer)) } + attr_reader :priority + + sig { params(priority: Integer).void } + attr_writer :priority + + # The datetime when the rule was last updated. + sig { returns(T.nilable(Time)) } + attr_reader :updated_at + + sig { params(updated_at: Time).void } + attr_writer :updated_at + + sig do + params( + id: String, + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes::OrHash, + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::OrHash + ], + created_at: Time, + deleted_at: Time, + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType::OrSymbol, + priority: Integer, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # Finch id (uuidv4) for the rule. + id: nil, + # Specifies the fields to be applied when the condition is met. + attributes: nil, + conditions: nil, + # The datetime when the rule was created. + created_at: nil, + # The datetime when the rule was deleted. + deleted_at: nil, + # Specifies when the rules should stop applying rules based on the date. + effective_end_date: nil, + # Specifies when the rule should begin applying based on the date. + effective_start_date: nil, + # The entity type to which the rule is applied. + entity_type: nil, + # The priority of the rule. + priority: nil, + # The datetime when the rule was last updated. + updated_at: nil + ) + end + + sig do + override.returns( + { + id: String, + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes, + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition + ], + created_at: Time, + deleted_at: Time, + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType::TaggedSymbol, + priority: Integer, + updated_at: Time + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_reader :metadata + + sig { params(metadata: T::Hash[Symbol, T.anything]).void } + attr_writer :metadata + + # Specifies the fields to be applied when the condition is met. + sig do + params(metadata: T::Hash[Symbol, T.anything]).returns( + T.attached_class + ) + end + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ) + end + + sig { override.returns({ metadata: T::Hash[Symbol, T.anything] }) } + def to_hash + end + end + + class Condition < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition, + FinchAPI::Internal::AnyHash + ) + end + + # The field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :field + + sig { params(field: String).void } + attr_writer :field + + # The operator to be used in the rule. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator::TaggedSymbol + ) + ) + end + attr_reader :operator + + sig do + params( + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator::OrSymbol + ).void + end + attr_writer :operator + + # The value of the field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :value + + sig { params(value: String).void } + attr_writer :value + + sig do + params( + field: String, + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator::OrSymbol, + value: String + ).returns(T.attached_class) + end + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ) + end + + sig do + override.returns( + { + field: String, + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator::TaggedSymbol, + value: String + } + ) + end + def to_hash + end + + # The operator to be used in the rule. + module Operator + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EQUALS = + T.let( + :equals, + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # The entity type to which the rule is applied. + module EntityType + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PAY_STATEMENT_ITEM = + T.let( + :pay_statement_item, + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_item/rule_list_params.rbi b/rbi/finch_api/models/hris/pay_statement_item/rule_list_params.rbi new file mode 100644 index 00000000..d2d6cfb5 --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item/rule_list_params.rbi @@ -0,0 +1,53 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + module PayStatementItem + class RuleListParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementItem::RuleListParams, + FinchAPI::Internal::AnyHash + ) + end + + # The entity IDs to retrieve rules for. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + + sig do + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # The entity IDs to retrieve rules for. + entity_ids: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_item/rule_list_response.rbi b/rbi/finch_api/models/hris/pay_statement_item/rule_list_response.rbi new file mode 100644 index 00000000..abbef4b3 --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item/rule_list_response.rbi @@ -0,0 +1,342 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + module PayStatementItem + class RuleListResponse < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse, + FinchAPI::Internal::AnyHash + ) + end + + # Finch id (uuidv4) for the rule. + sig { returns(T.nilable(String)) } + attr_reader :id + + sig { params(id: String).void } + attr_writer :id + + # Specifies the fields to be applied when the condition is met. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes::OrHash + ).void + end + attr_writer :attributes + + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition + ] + ) + ) + end + attr_reader :conditions + + sig do + params( + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::OrHash + ] + ).void + end + attr_writer :conditions + + # The datetime when the rule was created. + sig { returns(T.nilable(Time)) } + attr_reader :created_at + + sig { params(created_at: Time).void } + attr_writer :created_at + + # Specifies when the rules should stop applying rules based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_end_date + + # Specifies when the rule should begin applying based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_start_date + + # The entity type to which the rule is applied. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType::TaggedSymbol + ) + ) + end + attr_reader :entity_type + + sig do + params( + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType::OrSymbol + ).void + end + attr_writer :entity_type + + # The priority of the rule. + sig { returns(T.nilable(Integer)) } + attr_reader :priority + + sig { params(priority: Integer).void } + attr_writer :priority + + # The datetime when the rule was last updated. + sig { returns(T.nilable(Time)) } + attr_reader :updated_at + + sig { params(updated_at: Time).void } + attr_writer :updated_at + + sig do + params( + id: String, + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes::OrHash, + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::OrHash + ], + created_at: Time, + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType::OrSymbol, + priority: Integer, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # Finch id (uuidv4) for the rule. + id: nil, + # Specifies the fields to be applied when the condition is met. + attributes: nil, + conditions: nil, + # The datetime when the rule was created. + created_at: nil, + # Specifies when the rules should stop applying rules based on the date. + effective_end_date: nil, + # Specifies when the rule should begin applying based on the date. + effective_start_date: nil, + # The entity type to which the rule is applied. + entity_type: nil, + # The priority of the rule. + priority: nil, + # The datetime when the rule was last updated. + updated_at: nil + ) + end + + sig do + override.returns( + { + id: String, + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes, + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition + ], + created_at: Time, + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType::TaggedSymbol, + priority: Integer, + updated_at: Time + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_reader :metadata + + sig { params(metadata: T::Hash[Symbol, T.anything]).void } + attr_writer :metadata + + # Specifies the fields to be applied when the condition is met. + sig do + params(metadata: T::Hash[Symbol, T.anything]).returns( + T.attached_class + ) + end + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ) + end + + sig { override.returns({ metadata: T::Hash[Symbol, T.anything] }) } + def to_hash + end + end + + class Condition < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition, + FinchAPI::Internal::AnyHash + ) + end + + # The field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :field + + sig { params(field: String).void } + attr_writer :field + + # The operator to be used in the rule. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator::TaggedSymbol + ) + ) + end + attr_reader :operator + + sig do + params( + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator::OrSymbol + ).void + end + attr_writer :operator + + # The value of the field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :value + + sig { params(value: String).void } + attr_writer :value + + sig do + params( + field: String, + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator::OrSymbol, + value: String + ).returns(T.attached_class) + end + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ) + end + + sig do + override.returns( + { + field: String, + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator::TaggedSymbol, + value: String + } + ) + end + def to_hash + end + + # The operator to be used in the rule. + module Operator + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EQUALS = + T.let( + :equals, + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # The entity type to which the rule is applied. + module EntityType + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PAY_STATEMENT_ITEM = + T.let( + :pay_statement_item, + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_item/rule_update_params.rbi b/rbi/finch_api/models/hris/pay_statement_item/rule_update_params.rbi new file mode 100644 index 00000000..73631bf9 --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item/rule_update_params.rbi @@ -0,0 +1,68 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + module PayStatementItem + class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementItem::RuleUpdateParams, + FinchAPI::Internal::AnyHash + ) + end + + sig { returns(String) } + attr_accessor :rule_id + + # The entity IDs to update the rule for. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + + sig { returns(T.nilable(T.anything)) } + attr_reader :optional_property + + sig { params(optional_property: T.anything).void } + attr_writer :optional_property + + sig do + params( + rule_id: String, + entity_ids: T::Array[String], + optional_property: T.anything, + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + rule_id:, + # The entity IDs to update the rule for. + entity_ids: nil, + optional_property: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + rule_id: String, + entity_ids: T::Array[String], + optional_property: T.anything, + request_options: FinchAPI::RequestOptions + } + ) + end + def to_hash + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_item/rule_update_response.rbi b/rbi/finch_api/models/hris/pay_statement_item/rule_update_response.rbi new file mode 100644 index 00000000..f56946c8 --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item/rule_update_response.rbi @@ -0,0 +1,342 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + module PayStatementItem + class RuleUpdateResponse < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse, + FinchAPI::Internal::AnyHash + ) + end + + # Finch id (uuidv4) for the rule. + sig { returns(T.nilable(String)) } + attr_reader :id + + sig { params(id: String).void } + attr_writer :id + + # Specifies the fields to be applied when the condition is met. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes + ) + ) + end + attr_reader :attributes + + sig do + params( + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes::OrHash + ).void + end + attr_writer :attributes + + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition + ] + ) + ) + end + attr_reader :conditions + + sig do + params( + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::OrHash + ] + ).void + end + attr_writer :conditions + + # The datetime when the rule was created. + sig { returns(T.nilable(Time)) } + attr_reader :created_at + + sig { params(created_at: Time).void } + attr_writer :created_at + + # Specifies when the rules should stop applying rules based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_end_date + + # Specifies when the rule should begin applying based on the date. + sig { returns(T.nilable(String)) } + attr_accessor :effective_start_date + + # The entity type to which the rule is applied. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType::TaggedSymbol + ) + ) + end + attr_reader :entity_type + + sig do + params( + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType::OrSymbol + ).void + end + attr_writer :entity_type + + # The priority of the rule. + sig { returns(T.nilable(Integer)) } + attr_reader :priority + + sig { params(priority: Integer).void } + attr_writer :priority + + # The datetime when the rule was last updated. + sig { returns(T.nilable(Time)) } + attr_reader :updated_at + + sig { params(updated_at: Time).void } + attr_writer :updated_at + + sig do + params( + id: String, + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes::OrHash, + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::OrHash + ], + created_at: Time, + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType::OrSymbol, + priority: Integer, + updated_at: Time + ).returns(T.attached_class) + end + def self.new( + # Finch id (uuidv4) for the rule. + id: nil, + # Specifies the fields to be applied when the condition is met. + attributes: nil, + conditions: nil, + # The datetime when the rule was created. + created_at: nil, + # Specifies when the rules should stop applying rules based on the date. + effective_end_date: nil, + # Specifies when the rule should begin applying based on the date. + effective_start_date: nil, + # The entity type to which the rule is applied. + entity_type: nil, + # The priority of the rule. + priority: nil, + # The datetime when the rule was last updated. + updated_at: nil + ) + end + + sig do + override.returns( + { + id: String, + attributes: + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes, + conditions: + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition + ], + created_at: Time, + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType::TaggedSymbol, + priority: Integer, + updated_at: Time + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } + attr_reader :metadata + + sig { params(metadata: T::Hash[Symbol, T.anything]).void } + attr_writer :metadata + + # Specifies the fields to be applied when the condition is met. + sig do + params(metadata: T::Hash[Symbol, T.anything]).returns( + T.attached_class + ) + end + def self.new( + # The metadata to be attached in the entity. It is a key-value pairs where the + # values can be of any type (string, number, boolean, object, array, etc.). + metadata: nil + ) + end + + sig { override.returns({ metadata: T::Hash[Symbol, T.anything] }) } + def to_hash + end + end + + class Condition < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition, + FinchAPI::Internal::AnyHash + ) + end + + # The field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :field + + sig { params(field: String).void } + attr_writer :field + + # The operator to be used in the rule. + sig do + returns( + T.nilable( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator::TaggedSymbol + ) + ) + end + attr_reader :operator + + sig do + params( + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator::OrSymbol + ).void + end + attr_writer :operator + + # The value of the field to be checked in the rule. + sig { returns(T.nilable(String)) } + attr_reader :value + + sig { params(value: String).void } + attr_writer :value + + sig do + params( + field: String, + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator::OrSymbol, + value: String + ).returns(T.attached_class) + end + def self.new( + # The field to be checked in the rule. + field: nil, + # The operator to be used in the rule. + operator: nil, + # The value of the field to be checked in the rule. + value: nil + ) + end + + sig do + override.returns( + { + field: String, + operator: + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator::TaggedSymbol, + value: String + } + ) + end + def to_hash + end + + # The operator to be used in the rule. + module Operator + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EQUALS = + T.let( + :equals, + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator::TaggedSymbol + ] + ) + end + def self.values + end + end + end + + # The entity type to which the rule is applied. + module EntityType + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + PAY_STATEMENT_ITEM = + T.let( + :pay_statement_item, + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_item_list_params.rbi b/rbi/finch_api/models/hris/pay_statement_item_list_params.rbi new file mode 100644 index 00000000..e157c1ea --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item_list_params.rbi @@ -0,0 +1,177 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + OrHash = + T.type_alias do + T.any( + FinchAPI::HRIS::PayStatementItemListParams, + FinchAPI::Internal::AnyHash + ) + end + + # Comma-delimited list of pay statement item categories to filter on. If empty, + # defaults to all categories. + sig do + returns( + T.nilable( + T::Array[ + FinchAPI::HRIS::PayStatementItemListParams::Category::OrSymbol + ] + ) + ) + end + attr_reader :categories + + sig do + params( + categories: + T::Array[ + FinchAPI::HRIS::PayStatementItemListParams::Category::OrSymbol + ] + ).void + end + attr_writer :categories + + # The end date to retrieve pay statement items by via their last seen pay date in + # `YYYY-MM-DD` format. + sig { returns(T.nilable(Date)) } + attr_reader :end_date + + sig { params(end_date: Date).void } + attr_writer :end_date + + # The entity IDs to specify which entities' data to access. + sig { returns(T.nilable(T::Array[String])) } + attr_reader :entity_ids + + sig { params(entity_ids: T::Array[String]).void } + attr_writer :entity_ids + + # Case-insensitive partial match search by pay statement item name. + sig { returns(T.nilable(String)) } + attr_reader :name + + sig { params(name: String).void } + attr_writer :name + + # The start date to retrieve pay statement items by via their last seen pay date + # (inclusive) in `YYYY-MM-DD` format. + sig { returns(T.nilable(Date)) } + attr_reader :start_date + + sig { params(start_date: Date).void } + attr_writer :start_date + + # String search by pay statement item type. + sig { returns(T.nilable(String)) } + attr_reader :type + + sig { params(type: String).void } + attr_writer :type + + sig do + params( + categories: + T::Array[ + FinchAPI::HRIS::PayStatementItemListParams::Category::OrSymbol + ], + end_date: Date, + entity_ids: T::Array[String], + name: String, + start_date: Date, + type: String, + request_options: FinchAPI::RequestOptions::OrHash + ).returns(T.attached_class) + end + def self.new( + # Comma-delimited list of pay statement item categories to filter on. If empty, + # defaults to all categories. + categories: nil, + # The end date to retrieve pay statement items by via their last seen pay date in + # `YYYY-MM-DD` format. + end_date: nil, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + # Case-insensitive partial match search by pay statement item name. + name: nil, + # The start date to retrieve pay statement items by via their last seen pay date + # (inclusive) in `YYYY-MM-DD` format. + start_date: nil, + # String search by pay statement item type. + type: nil, + request_options: {} + ) + end + + sig do + override.returns( + { + categories: + T::Array[ + FinchAPI::HRIS::PayStatementItemListParams::Category::OrSymbol + ], + end_date: Date, + entity_ids: T::Array[String], + name: String, + start_date: Date, + type: String, + request_options: FinchAPI::RequestOptions + } + ) + end + def to_hash + end + + module Category + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::HRIS::PayStatementItemListParams::Category + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EARNINGS = + T.let( + :earnings, + FinchAPI::HRIS::PayStatementItemListParams::Category::TaggedSymbol + ) + TAXES = + T.let( + :taxes, + FinchAPI::HRIS::PayStatementItemListParams::Category::TaggedSymbol + ) + EMPLOYEE_DEDUCTIONS = + T.let( + :employee_deductions, + FinchAPI::HRIS::PayStatementItemListParams::Category::TaggedSymbol + ) + EMPLOYER_CONTRIBUTIONS = + T.let( + :employer_contributions, + FinchAPI::HRIS::PayStatementItemListParams::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::HRIS::PayStatementItemListParams::Category::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/finch_api/models/hris/pay_statement_item_list_response.rbi b/rbi/finch_api/models/hris/pay_statement_item_list_response.rbi new file mode 100644 index 00000000..07da1504 --- /dev/null +++ b/rbi/finch_api/models/hris/pay_statement_item_list_response.rbi @@ -0,0 +1,189 @@ +# typed: strong + +module FinchAPI + module Models + module HRIS + class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItemListResponse, + FinchAPI::Internal::AnyHash + ) + end + + # The attributes of the pay statement item. + sig do + returns( + FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes + ) + end + attr_reader :attributes + + sig do + params( + attributes: + FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes::OrHash + ).void + end + attr_writer :attributes + + # The category of the pay statement item. + sig do + returns( + FinchAPI::Models::HRIS::PayStatementItemListResponse::Category::TaggedSymbol + ) + end + attr_accessor :category + + # The name of the pay statement item. + sig { returns(String) } + attr_accessor :name + + sig do + params( + attributes: + FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes::OrHash, + category: + FinchAPI::Models::HRIS::PayStatementItemListResponse::Category::OrSymbol, + name: String + ).returns(T.attached_class) + end + def self.new( + # The attributes of the pay statement item. + attributes:, + # The category of the pay statement item. + category:, + # The name of the pay statement item. + name: + ) + end + + sig do + override.returns( + { + attributes: + FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes, + category: + FinchAPI::Models::HRIS::PayStatementItemListResponse::Category::TaggedSymbol, + name: String + } + ) + end + def to_hash + end + + class Attributes < FinchAPI::Internal::Type::BaseModel + OrHash = + T.type_alias do + T.any( + FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes, + FinchAPI::Internal::AnyHash + ) + end + + # The metadata of the pay statement item derived by the rules engine if available. + # Each attribute will be a key-value pair defined by a rule. + sig { returns(T.nilable(T::Hash[Symbol, T.nilable(T.anything)])) } + attr_accessor :metadata + + # `true` if the amount is paid by the employers. This field is only available for + # taxes. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :employer + + # `true` if the pay statement item is pre-tax. This field is only available for + # employee deductions. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :pre_tax + + # The type of the pay statement item. + sig { returns(T.nilable(String)) } + attr_accessor :type + + # The attributes of the pay statement item. + sig do + params( + metadata: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + employer: T.nilable(T::Boolean), + pre_tax: T.nilable(T::Boolean), + type: T.nilable(String) + ).returns(T.attached_class) + end + def self.new( + # The metadata of the pay statement item derived by the rules engine if available. + # Each attribute will be a key-value pair defined by a rule. + metadata:, + # `true` if the amount is paid by the employers. This field is only available for + # taxes. + employer: nil, + # `true` if the pay statement item is pre-tax. This field is only available for + # employee deductions. + pre_tax: nil, + # The type of the pay statement item. + type: nil + ) + end + + sig do + override.returns( + { + metadata: T.nilable(T::Hash[Symbol, T.nilable(T.anything)]), + employer: T.nilable(T::Boolean), + pre_tax: T.nilable(T::Boolean), + type: T.nilable(String) + } + ) + end + def to_hash + end + end + + # The category of the pay statement item. + module Category + extend FinchAPI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all( + Symbol, + FinchAPI::Models::HRIS::PayStatementItemListResponse::Category + ) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + EARNINGS = + T.let( + :earnings, + FinchAPI::Models::HRIS::PayStatementItemListResponse::Category::TaggedSymbol + ) + TAXES = + T.let( + :taxes, + FinchAPI::Models::HRIS::PayStatementItemListResponse::Category::TaggedSymbol + ) + EMPLOYEE_DEDUCTIONS = + T.let( + :employee_deductions, + FinchAPI::Models::HRIS::PayStatementItemListResponse::Category::TaggedSymbol + ) + EMPLOYER_CONTRIBUTIONS = + T.let( + :employer_contributions, + FinchAPI::Models::HRIS::PayStatementItemListResponse::Category::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + FinchAPI::Models::HRIS::PayStatementItemListResponse::Category::TaggedSymbol + ] + ) + end + def self.values + end + end + end + end + end +end diff --git a/rbi/finch_api/resources/hris.rbi b/rbi/finch_api/resources/hris.rbi index 460c720e..9c006d2b 100644 --- a/rbi/finch_api/resources/hris.rbi +++ b/rbi/finch_api/resources/hris.rbi @@ -6,6 +6,9 @@ module FinchAPI sig { returns(FinchAPI::Resources::HRIS::Company) } attr_reader :company + sig { returns(FinchAPI::Resources::HRIS::PayStatementItem) } + attr_reader :pay_statement_item + sig { returns(FinchAPI::Resources::HRIS::Directory) } attr_reader :directory diff --git a/rbi/finch_api/resources/hris/company.rbi b/rbi/finch_api/resources/hris/company.rbi index 3ea7ecad..d5e5de23 100644 --- a/rbi/finch_api/resources/hris/company.rbi +++ b/rbi/finch_api/resources/hris/company.rbi @@ -4,9 +4,6 @@ module FinchAPI module Resources class HRIS class Company - sig { returns(FinchAPI::Resources::HRIS::Company::PayStatementItem) } - attr_reader :pay_statement_item - # Read basic company data sig do params( diff --git a/rbi/finch_api/resources/hris/company/pay_statement_item.rbi b/rbi/finch_api/resources/hris/company/pay_statement_item.rbi deleted file mode 100644 index 5a4d4c8e..00000000 --- a/rbi/finch_api/resources/hris/company/pay_statement_item.rbi +++ /dev/null @@ -1,61 +0,0 @@ -# typed: strong - -module FinchAPI - module Resources - class HRIS - class Company - class PayStatementItem - sig do - returns(FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules) - end - attr_reader :rules - - # Retrieve a list of detailed pay statement items for the access token's - # connection account. - sig do - params( - categories: - T::Array[ - FinchAPI::HRIS::Company::PayStatementItemListParams::Category::OrSymbol - ], - end_date: Date, - entity_ids: T::Array[String], - name: String, - start_date: Date, - type: String, - request_options: FinchAPI::RequestOptions::OrHash - ).returns( - FinchAPI::Internal::ResponsesPage[ - FinchAPI::Models::HRIS::Company::PayStatementItemListResponse - ] - ) - end - def list( - # Comma-delimited list of pay statement item categories to filter on. If empty, - # defaults to all categories. - categories: nil, - # The end date to retrieve pay statement items by via their last seen pay date in - # `YYYY-MM-DD` format. - end_date: nil, - # The entity IDs to specify which entities' data to access. - entity_ids: nil, - # Case-insensitive partial match search by pay statement item name. - name: nil, - # The start date to retrieve pay statement items by via their last seen pay date - # (inclusive) in `YYYY-MM-DD` format. - start_date: nil, - # String search by pay statement item type. - type: nil, - request_options: {} - ) - end - - # @api private - sig { params(client: FinchAPI::Client).returns(T.attached_class) } - def self.new(client:) - end - end - end - end - end -end diff --git a/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi b/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi deleted file mode 100644 index 2f8060f0..00000000 --- a/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi +++ /dev/null @@ -1,116 +0,0 @@ -# typed: strong - -module FinchAPI - module Resources - class HRIS - class Company - class PayStatementItem - class Rules - # 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. - sig do - params( - entity_ids: T::Array[String], - attributes: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes::OrHash, - conditions: - T::Array[ - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::OrHash - ], - effective_end_date: T.nilable(String), - effective_start_date: T.nilable(String), - entity_type: - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType::OrSymbol, - request_options: FinchAPI::RequestOptions::OrHash - ).returns( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse - ) - end - def create( - # Query param: The entity IDs to create the rule for. - entity_ids: nil, - # Body param: Specifies the fields to be applied when the condition is met. - attributes: nil, - # Body param - conditions: nil, - # Body param: Specifies when the rules should stop applying rules based on the - # date. - effective_end_date: nil, - # Body param: Specifies when the rule should begin applying based on the date. - effective_start_date: nil, - # Body param: The entity type to which the rule is applied. - entity_type: nil, - request_options: {} - ) - end - - # Update a rule for a pay statement item. - sig do - params( - rule_id: String, - entity_ids: T::Array[String], - optional_property: T.anything, - request_options: FinchAPI::RequestOptions::OrHash - ).returns( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse - ) - end - def update( - # Path param - rule_id, - # Query param: The entity IDs to update the rule for. - entity_ids: nil, - # Body param - optional_property: nil, - request_options: {} - ) - end - - # List all rules of a connection account. - sig do - params( - entity_ids: T::Array[String], - request_options: FinchAPI::RequestOptions::OrHash - ).returns( - FinchAPI::Internal::ResponsesPage[ - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse - ] - ) - end - def list( - # The entity IDs to retrieve rules for. - entity_ids: nil, - request_options: {} - ) - end - - # Delete a rule for a pay statement item. - sig do - params( - rule_id: String, - entity_ids: T::Array[String], - request_options: FinchAPI::RequestOptions::OrHash - ).returns( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse - ) - end - def delete( - rule_id, - # The entity IDs to delete the rule for. - entity_ids: nil, - request_options: {} - ) - end - - # @api private - sig { params(client: FinchAPI::Client).returns(T.attached_class) } - def self.new(client:) - end - end - end - end - end - end -end diff --git a/rbi/finch_api/resources/hris/pay_statement_item.rbi b/rbi/finch_api/resources/hris/pay_statement_item.rbi new file mode 100644 index 00000000..3ae3a13b --- /dev/null +++ b/rbi/finch_api/resources/hris/pay_statement_item.rbi @@ -0,0 +1,57 @@ +# typed: strong + +module FinchAPI + module Resources + class HRIS + class PayStatementItem + sig { returns(FinchAPI::Resources::HRIS::PayStatementItem::Rules) } + attr_reader :rules + + # Retrieve a list of detailed pay statement items for the access token's + # connection account. + sig do + params( + categories: + T::Array[ + FinchAPI::HRIS::PayStatementItemListParams::Category::OrSymbol + ], + end_date: Date, + entity_ids: T::Array[String], + name: String, + start_date: Date, + type: String, + request_options: FinchAPI::RequestOptions::OrHash + ).returns( + FinchAPI::Internal::ResponsesPage[ + FinchAPI::Models::HRIS::PayStatementItemListResponse + ] + ) + end + def list( + # Comma-delimited list of pay statement item categories to filter on. If empty, + # defaults to all categories. + categories: nil, + # The end date to retrieve pay statement items by via their last seen pay date in + # `YYYY-MM-DD` format. + end_date: nil, + # The entity IDs to specify which entities' data to access. + entity_ids: nil, + # Case-insensitive partial match search by pay statement item name. + name: nil, + # The start date to retrieve pay statement items by via their last seen pay date + # (inclusive) in `YYYY-MM-DD` format. + start_date: nil, + # String search by pay statement item type. + type: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: FinchAPI::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end + end +end diff --git a/rbi/finch_api/resources/hris/pay_statement_item/rules.rbi b/rbi/finch_api/resources/hris/pay_statement_item/rules.rbi new file mode 100644 index 00000000..12f37958 --- /dev/null +++ b/rbi/finch_api/resources/hris/pay_statement_item/rules.rbi @@ -0,0 +1,114 @@ +# typed: strong + +module FinchAPI + module Resources + class HRIS + class PayStatementItem + class Rules + # 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. + sig do + params( + entity_ids: T::Array[String], + attributes: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes::OrHash, + conditions: + T::Array[ + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition::OrHash + ], + effective_end_date: T.nilable(String), + effective_start_date: T.nilable(String), + entity_type: + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::EntityType::OrSymbol, + request_options: FinchAPI::RequestOptions::OrHash + ).returns( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse + ) + end + def create( + # Query param: The entity IDs to create the rule for. + entity_ids: nil, + # Body param: Specifies the fields to be applied when the condition is met. + attributes: nil, + # Body param + conditions: nil, + # Body param: Specifies when the rules should stop applying rules based on the + # date. + effective_end_date: nil, + # Body param: Specifies when the rule should begin applying based on the date. + effective_start_date: nil, + # Body param: The entity type to which the rule is applied. + entity_type: nil, + request_options: {} + ) + end + + # Update a rule for a pay statement item. + sig do + params( + rule_id: String, + entity_ids: T::Array[String], + optional_property: T.anything, + request_options: FinchAPI::RequestOptions::OrHash + ).returns( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse + ) + end + def update( + # Path param + rule_id, + # Query param: The entity IDs to update the rule for. + entity_ids: nil, + # Body param + optional_property: nil, + request_options: {} + ) + end + + # List all rules of a connection account. + sig do + params( + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns( + FinchAPI::Internal::ResponsesPage[ + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse + ] + ) + end + def list( + # The entity IDs to retrieve rules for. + entity_ids: nil, + request_options: {} + ) + end + + # Delete a rule for a pay statement item. + sig do + params( + rule_id: String, + entity_ids: T::Array[String], + request_options: FinchAPI::RequestOptions::OrHash + ).returns( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse + ) + end + def delete( + rule_id, + # The entity IDs to delete the rule for. + entity_ids: nil, + request_options: {} + ) + end + + # @api private + sig { params(client: FinchAPI::Client).returns(T.attached_class) } + def self.new(client:) + end + end + end + end + end +end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbs deleted file mode 100644 index c78df13a..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbs +++ /dev/null @@ -1,138 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - type rule_create_params = - { - entity_ids: ::Array[String], - attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, - conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition], - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type - } - & FinchAPI::Internal::Type::request_parameters - - class RuleCreateParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - attr_reader entity_ids: ::Array[String]? - - def entity_ids=: (::Array[String]) -> ::Array[String] - - attr_reader attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes? - - def attributes=: ( - FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes - ) -> FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes - - attr_reader conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition]? - - def conditions=: ( - ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition] - ) -> ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition] - - attr_accessor effective_end_date: String? - - attr_accessor effective_start_date: String? - - attr_reader entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type? - - def entity_type=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type - - def initialize: ( - ?entity_ids: ::Array[String], - ?attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, - ?conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition], - ?effective_end_date: String?, - ?effective_start_date: String?, - ?entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type, - ?request_options: FinchAPI::request_opts - ) -> void - - def to_hash: -> { - entity_ids: ::Array[String], - attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, - conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition], - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type, - request_options: FinchAPI::RequestOptions - } - - type attributes = { metadata: ::Hash[Symbol, top] } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top]? - - def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] - - def initialize: (?metadata: ::Hash[Symbol, top]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top] } - end - - type condition = - { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator, - value: String - } - - class Condition < FinchAPI::Internal::Type::BaseModel - attr_reader field: String? - - def field=: (String) -> String - - attr_reader operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator? - - def operator=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator - - attr_reader value: String? - - def value=: (String) -> String - - def initialize: ( - ?field: String, - ?operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator, - ?value: String - ) -> void - - def to_hash: -> { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator, - value: String - } - - type operator = :equals - - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS: :equals - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::operator] - end - end - - type entity_type = :pay_statement_item - - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM: :pay_statement_item - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type] - end - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbs deleted file mode 100644 index ad879cbe..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbs +++ /dev/null @@ -1,153 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - type rule_create_response = - { - id: String, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes, - conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition], - created_at: Time, - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::entity_type, - priority: Integer, - updated_at: Time - } - - class RuleCreateResponse < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? - - def id=: (String) -> String - - attr_reader attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes? - - def attributes=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes - - attr_reader conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition]? - - def conditions=: ( - ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition] - ) -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition] - - attr_reader created_at: Time? - - def created_at=: (Time) -> Time - - attr_accessor effective_end_date: String? - - attr_accessor effective_start_date: String? - - attr_reader entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::entity_type? - - def entity_type=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::entity_type - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::entity_type - - attr_reader priority: Integer? - - def priority=: (Integer) -> Integer - - attr_reader updated_at: Time? - - def updated_at=: (Time) -> Time - - def initialize: ( - ?id: String, - ?attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes, - ?conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition], - ?created_at: Time, - ?effective_end_date: String?, - ?effective_start_date: String?, - ?entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::entity_type, - ?priority: Integer, - ?updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes, - conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition], - created_at: Time, - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::entity_type, - priority: Integer, - updated_at: Time - } - - type attributes = { metadata: ::Hash[Symbol, top] } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top]? - - def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] - - def initialize: (?metadata: ::Hash[Symbol, top]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top] } - end - - type condition = - { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::operator, - value: String - } - - class Condition < FinchAPI::Internal::Type::BaseModel - attr_reader field: String? - - def field=: (String) -> String - - attr_reader operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::operator? - - def operator=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::operator - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::operator - - attr_reader value: String? - - def value=: (String) -> String - - def initialize: ( - ?field: String, - ?operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::operator, - ?value: String - ) -> void - - def to_hash: -> { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::operator, - value: String - } - - type operator = :equals - - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS: :equals - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition::operator] - end - end - - type entity_type = :pay_statement_item - - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM: :pay_statement_item - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::entity_type] - end - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs deleted file mode 100644 index 384109e7..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs +++ /dev/null @@ -1,36 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - type rule_delete_params = - { rule_id: String, entity_ids: ::Array[String] } - & FinchAPI::Internal::Type::request_parameters - - class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - attr_accessor rule_id: String - - attr_reader entity_ids: ::Array[String]? - - def entity_ids=: (::Array[String]) -> ::Array[String] - - def initialize: ( - rule_id: String, - ?entity_ids: ::Array[String], - ?request_options: FinchAPI::request_opts - ) -> void - - def to_hash: -> { - rule_id: String, - entity_ids: ::Array[String], - request_options: FinchAPI::RequestOptions - } - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbs deleted file mode 100644 index dfbf765d..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbs +++ /dev/null @@ -1,160 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - type rule_delete_response = - { - id: String, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes, - conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition], - created_at: Time, - deleted_at: Time, - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::entity_type, - priority: Integer, - updated_at: Time - } - - class RuleDeleteResponse < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? - - def id=: (String) -> String - - attr_reader attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes? - - def attributes=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes - - attr_reader conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition]? - - def conditions=: ( - ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition] - ) -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition] - - attr_reader created_at: Time? - - def created_at=: (Time) -> Time - - attr_reader deleted_at: Time? - - def deleted_at=: (Time) -> Time - - attr_accessor effective_end_date: String? - - attr_accessor effective_start_date: String? - - attr_reader entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::entity_type? - - def entity_type=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::entity_type - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::entity_type - - attr_reader priority: Integer? - - def priority=: (Integer) -> Integer - - attr_reader updated_at: Time? - - def updated_at=: (Time) -> Time - - def initialize: ( - ?id: String, - ?attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes, - ?conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition], - ?created_at: Time, - ?deleted_at: Time, - ?effective_end_date: String?, - ?effective_start_date: String?, - ?entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::entity_type, - ?priority: Integer, - ?updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes, - conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition], - created_at: Time, - deleted_at: Time, - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::entity_type, - priority: Integer, - updated_at: Time - } - - type attributes = { metadata: ::Hash[Symbol, top] } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top]? - - def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] - - def initialize: (?metadata: ::Hash[Symbol, top]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top] } - end - - type condition = - { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::operator, - value: String - } - - class Condition < FinchAPI::Internal::Type::BaseModel - attr_reader field: String? - - def field=: (String) -> String - - attr_reader operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::operator? - - def operator=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::operator - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::operator - - attr_reader value: String? - - def value=: (String) -> String - - def initialize: ( - ?field: String, - ?operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::operator, - ?value: String - ) -> void - - def to_hash: -> { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::operator, - value: String - } - - type operator = :equals - - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS: :equals - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition::operator] - end - end - - type entity_type = :pay_statement_item - - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM: :pay_statement_item - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::entity_type] - end - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbs deleted file mode 100644 index 2bf6060c..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbs +++ /dev/null @@ -1,32 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - type rule_list_params = - { entity_ids: ::Array[String] } - & FinchAPI::Internal::Type::request_parameters - - class RuleListParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - attr_reader entity_ids: ::Array[String]? - - def entity_ids=: (::Array[String]) -> ::Array[String] - - def initialize: ( - ?entity_ids: ::Array[String], - ?request_options: FinchAPI::request_opts - ) -> void - - def to_hash: -> { - entity_ids: ::Array[String], - request_options: FinchAPI::RequestOptions - } - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbs deleted file mode 100644 index 9516aae7..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbs +++ /dev/null @@ -1,153 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - type rule_list_response = - { - id: String, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes, - conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition], - created_at: Time, - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::entity_type, - priority: Integer, - updated_at: Time - } - - class RuleListResponse < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? - - def id=: (String) -> String - - attr_reader attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes? - - def attributes=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes - - attr_reader conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition]? - - def conditions=: ( - ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition] - ) -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition] - - attr_reader created_at: Time? - - def created_at=: (Time) -> Time - - attr_accessor effective_end_date: String? - - attr_accessor effective_start_date: String? - - attr_reader entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::entity_type? - - def entity_type=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::entity_type - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::entity_type - - attr_reader priority: Integer? - - def priority=: (Integer) -> Integer - - attr_reader updated_at: Time? - - def updated_at=: (Time) -> Time - - def initialize: ( - ?id: String, - ?attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes, - ?conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition], - ?created_at: Time, - ?effective_end_date: String?, - ?effective_start_date: String?, - ?entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::entity_type, - ?priority: Integer, - ?updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes, - conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition], - created_at: Time, - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::entity_type, - priority: Integer, - updated_at: Time - } - - type attributes = { metadata: ::Hash[Symbol, top] } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top]? - - def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] - - def initialize: (?metadata: ::Hash[Symbol, top]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top] } - end - - type condition = - { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::operator, - value: String - } - - class Condition < FinchAPI::Internal::Type::BaseModel - attr_reader field: String? - - def field=: (String) -> String - - attr_reader operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::operator? - - def operator=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::operator - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::operator - - attr_reader value: String? - - def value=: (String) -> String - - def initialize: ( - ?field: String, - ?operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::operator, - ?value: String - ) -> void - - def to_hash: -> { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::operator, - value: String - } - - type operator = :equals - - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS: :equals - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition::operator] - end - end - - type entity_type = :pay_statement_item - - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM: :pay_statement_item - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::entity_type] - end - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs deleted file mode 100644 index a2532ccd..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs +++ /dev/null @@ -1,46 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - type rule_update_params = - { - rule_id: String, - entity_ids: ::Array[String], - optional_property: top - } - & FinchAPI::Internal::Type::request_parameters - - class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - attr_accessor rule_id: String - - attr_reader entity_ids: ::Array[String]? - - def entity_ids=: (::Array[String]) -> ::Array[String] - - attr_reader optional_property: top? - - def optional_property=: (top) -> top - - def initialize: ( - rule_id: String, - ?entity_ids: ::Array[String], - ?optional_property: top, - ?request_options: FinchAPI::request_opts - ) -> void - - def to_hash: -> { - rule_id: String, - entity_ids: ::Array[String], - optional_property: top, - request_options: FinchAPI::RequestOptions - } - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbs deleted file mode 100644 index c3577ae2..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbs +++ /dev/null @@ -1,153 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - module PayStatementItem - type rule_update_response = - { - id: String, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes, - conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition], - created_at: Time, - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::entity_type, - priority: Integer, - updated_at: Time - } - - class RuleUpdateResponse < FinchAPI::Internal::Type::BaseModel - attr_reader id: String? - - def id=: (String) -> String - - attr_reader attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes? - - def attributes=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes - - attr_reader conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition]? - - def conditions=: ( - ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition] - ) -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition] - - attr_reader created_at: Time? - - def created_at=: (Time) -> Time - - attr_accessor effective_end_date: String? - - attr_accessor effective_start_date: String? - - attr_reader entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::entity_type? - - def entity_type=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::entity_type - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::entity_type - - attr_reader priority: Integer? - - def priority=: (Integer) -> Integer - - attr_reader updated_at: Time? - - def updated_at=: (Time) -> Time - - def initialize: ( - ?id: String, - ?attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes, - ?conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition], - ?created_at: Time, - ?effective_end_date: String?, - ?effective_start_date: String?, - ?entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::entity_type, - ?priority: Integer, - ?updated_at: Time - ) -> void - - def to_hash: -> { - id: String, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes, - conditions: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition], - created_at: Time, - effective_end_date: String?, - effective_start_date: String?, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::entity_type, - priority: Integer, - updated_at: Time - } - - type attributes = { metadata: ::Hash[Symbol, top] } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_reader metadata: ::Hash[Symbol, top]? - - def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] - - def initialize: (?metadata: ::Hash[Symbol, top]) -> void - - def to_hash: -> { metadata: ::Hash[Symbol, top] } - end - - type condition = - { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::operator, - value: String - } - - class Condition < FinchAPI::Internal::Type::BaseModel - attr_reader field: String? - - def field=: (String) -> String - - attr_reader operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::operator? - - def operator=: ( - FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::operator - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::operator - - attr_reader value: String? - - def value=: (String) -> String - - def initialize: ( - ?field: String, - ?operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::operator, - ?value: String - ) -> void - - def to_hash: -> { - field: String, - operator: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::operator, - value: String - } - - type operator = :equals - - module Operator - extend FinchAPI::Internal::Type::Enum - - EQUALS: :equals - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition::operator] - end - end - - type entity_type = :pay_statement_item - - module EntityType - extend FinchAPI::Internal::Type::Enum - - PAY_STATEMENT_ITEM: :pay_statement_item - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::entity_type] - end - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/company/pay_statement_item_list_params.rbs b/sig/finch_api/models/hris/company/pay_statement_item_list_params.rbs deleted file mode 100644 index 6b7d49b8..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item_list_params.rbs +++ /dev/null @@ -1,83 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - type pay_statement_item_list_params = - { - categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], - end_date: Date, - entity_ids: ::Array[String], - name: String, - start_date: Date, - type: String - } - & FinchAPI::Internal::Type::request_parameters - - class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel - extend FinchAPI::Internal::Type::RequestParameters::Converter - include FinchAPI::Internal::Type::RequestParameters - - attr_reader categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category]? - - def categories=: ( - ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category] - ) -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category] - - attr_reader end_date: Date? - - def end_date=: (Date) -> Date - - attr_reader entity_ids: ::Array[String]? - - def entity_ids=: (::Array[String]) -> ::Array[String] - - attr_reader name: String? - - def name=: (String) -> String - - attr_reader start_date: Date? - - def start_date=: (Date) -> Date - - attr_reader type: String? - - def type=: (String) -> String - - def initialize: ( - ?categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], - ?end_date: Date, - ?entity_ids: ::Array[String], - ?name: String, - ?start_date: Date, - ?type: String, - ?request_options: FinchAPI::request_opts - ) -> void - - def to_hash: -> { - categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], - end_date: Date, - entity_ids: ::Array[String], - name: String, - start_date: Date, - type: String, - request_options: FinchAPI::RequestOptions - } - - type category = - :earnings | :taxes | :employee_deductions | :employer_contributions - - module Category - extend FinchAPI::Internal::Type::Enum - - EARNINGS: :earnings - TAXES: :taxes - EMPLOYEE_DEDUCTIONS: :employee_deductions - EMPLOYER_CONTRIBUTIONS: :employer_contributions - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category] - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs b/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs deleted file mode 100644 index 3a14dafc..00000000 --- a/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs +++ /dev/null @@ -1,80 +0,0 @@ -module FinchAPI - module Models - module HRIS - module Company - type pay_statement_item_list_response = - { - attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, - category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category, - name: String - } - - class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel - attr_accessor attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes - - attr_accessor category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category - - attr_accessor name: String - - def initialize: ( - attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, - category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category, - name: String - ) -> void - - def to_hash: -> { - attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, - category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category, - name: String - } - - type attributes = - { - metadata: ::Hash[Symbol, top?]?, - employer: bool?, - pre_tax: bool?, - type: String? - } - - class Attributes < FinchAPI::Internal::Type::BaseModel - attr_accessor metadata: ::Hash[Symbol, top?]? - - attr_accessor employer: bool? - - attr_accessor pre_tax: bool? - - attr_accessor type: String? - - def initialize: ( - metadata: ::Hash[Symbol, top?]?, - ?employer: bool?, - ?pre_tax: bool?, - ?type: String? - ) -> void - - def to_hash: -> { - metadata: ::Hash[Symbol, top?]?, - employer: bool?, - pre_tax: bool?, - type: String? - } - end - - type category = - :earnings | :taxes | :employee_deductions | :employer_contributions - - module Category - extend FinchAPI::Internal::Type::Enum - - EARNINGS: :earnings - TAXES: :taxes - EMPLOYEE_DEDUCTIONS: :employee_deductions - EMPLOYER_CONTRIBUTIONS: :employer_contributions - - def self?.values: -> ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::category] - end - end - end - end - end -end diff --git a/sig/finch_api/models/hris/pay_statement_item/rule_create_params.rbs b/sig/finch_api/models/hris/pay_statement_item/rule_create_params.rbs new file mode 100644 index 00000000..bb2874a6 --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item/rule_create_params.rbs @@ -0,0 +1,136 @@ +module FinchAPI + module Models + module HRIS + module PayStatementItem + type rule_create_params = + { + entity_ids: ::Array[String], + attributes: FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes, + conditions: ::Array[FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition], + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::entity_type + } + & FinchAPI::Internal::Type::request_parameters + + class RuleCreateParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + + attr_reader attributes: FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes? + + def attributes=: ( + FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes + ) -> FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes + + attr_reader conditions: ::Array[FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition]? + + def conditions=: ( + ::Array[FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition] + ) -> ::Array[FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition] + + attr_accessor effective_end_date: String? + + attr_accessor effective_start_date: String? + + attr_reader entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::entity_type? + + def entity_type=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::entity_type + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::entity_type + + def initialize: ( + ?entity_ids: ::Array[String], + ?attributes: FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes, + ?conditions: ::Array[FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition], + ?effective_end_date: String?, + ?effective_start_date: String?, + ?entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::entity_type, + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + attributes: FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes, + conditions: ::Array[FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition], + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::entity_type, + request_options: FinchAPI::RequestOptions + } + + type attributes = { metadata: ::Hash[Symbol, top] } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_reader metadata: ::Hash[Symbol, top]? + + def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] + + def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } + end + + type condition = + { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition::operator, + value: String + } + + class Condition < FinchAPI::Internal::Type::BaseModel + attr_reader field: String? + + def field=: (String) -> String + + attr_reader operator: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition::operator? + + def operator=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition::operator + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition::operator + + attr_reader value: String? + + def value=: (String) -> String + + def initialize: ( + ?field: String, + ?operator: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition::operator, + ?value: String + ) -> void + + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition::operator, + value: String + } + + type operator = :equals + + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS: :equals + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::Condition::operator] + end + end + + type entity_type = :pay_statement_item + + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM: :pay_statement_item + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::entity_type] + end + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_item/rule_create_response.rbs b/sig/finch_api/models/hris/pay_statement_item/rule_create_response.rbs new file mode 100644 index 00000000..fd4af45a --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item/rule_create_response.rbs @@ -0,0 +1,151 @@ +module FinchAPI + module Models + module HRIS + module PayStatementItem + type rule_create_response = + { + id: String, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition], + created_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::entity_type, + priority: Integer, + updated_at: Time + } + + class RuleCreateResponse < FinchAPI::Internal::Type::BaseModel + attr_reader id: String? + + def id=: (String) -> String + + attr_reader attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes? + + def attributes=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes + + attr_reader conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition]? + + def conditions=: ( + ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition] + ) -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition] + + attr_reader created_at: Time? + + def created_at=: (Time) -> Time + + attr_accessor effective_end_date: String? + + attr_accessor effective_start_date: String? + + attr_reader entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::entity_type? + + def entity_type=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::entity_type + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::entity_type + + attr_reader priority: Integer? + + def priority=: (Integer) -> Integer + + attr_reader updated_at: Time? + + def updated_at=: (Time) -> Time + + def initialize: ( + ?id: String, + ?attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes, + ?conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition], + ?created_at: Time, + ?effective_end_date: String?, + ?effective_start_date: String?, + ?entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::entity_type, + ?priority: Integer, + ?updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition], + created_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::entity_type, + priority: Integer, + updated_at: Time + } + + type attributes = { metadata: ::Hash[Symbol, top] } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_reader metadata: ::Hash[Symbol, top]? + + def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] + + def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } + end + + type condition = + { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::operator, + value: String + } + + class Condition < FinchAPI::Internal::Type::BaseModel + attr_reader field: String? + + def field=: (String) -> String + + attr_reader operator: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::operator? + + def operator=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::operator + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::operator + + attr_reader value: String? + + def value=: (String) -> String + + def initialize: ( + ?field: String, + ?operator: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::operator, + ?value: String + ) -> void + + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::operator, + value: String + } + + type operator = :equals + + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS: :equals + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition::operator] + end + end + + type entity_type = :pay_statement_item + + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM: :pay_statement_item + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::entity_type] + end + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_item/rule_delete_params.rbs b/sig/finch_api/models/hris/pay_statement_item/rule_delete_params.rbs new file mode 100644 index 00000000..9cfef672 --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item/rule_delete_params.rbs @@ -0,0 +1,34 @@ +module FinchAPI + module Models + module HRIS + module PayStatementItem + type rule_delete_params = + { rule_id: String, entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters + + class RuleDeleteParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + attr_accessor rule_id: String + + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + rule_id: String, + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + rule_id: String, + entity_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_item/rule_delete_response.rbs b/sig/finch_api/models/hris/pay_statement_item/rule_delete_response.rbs new file mode 100644 index 00000000..17525683 --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item/rule_delete_response.rbs @@ -0,0 +1,158 @@ +module FinchAPI + module Models + module HRIS + module PayStatementItem + type rule_delete_response = + { + id: String, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition], + created_at: Time, + deleted_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::entity_type, + priority: Integer, + updated_at: Time + } + + class RuleDeleteResponse < FinchAPI::Internal::Type::BaseModel + attr_reader id: String? + + def id=: (String) -> String + + attr_reader attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes? + + def attributes=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes + + attr_reader conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition]? + + def conditions=: ( + ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition] + ) -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition] + + attr_reader created_at: Time? + + def created_at=: (Time) -> Time + + attr_reader deleted_at: Time? + + def deleted_at=: (Time) -> Time + + attr_accessor effective_end_date: String? + + attr_accessor effective_start_date: String? + + attr_reader entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::entity_type? + + def entity_type=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::entity_type + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::entity_type + + attr_reader priority: Integer? + + def priority=: (Integer) -> Integer + + attr_reader updated_at: Time? + + def updated_at=: (Time) -> Time + + def initialize: ( + ?id: String, + ?attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes, + ?conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition], + ?created_at: Time, + ?deleted_at: Time, + ?effective_end_date: String?, + ?effective_start_date: String?, + ?entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::entity_type, + ?priority: Integer, + ?updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition], + created_at: Time, + deleted_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::entity_type, + priority: Integer, + updated_at: Time + } + + type attributes = { metadata: ::Hash[Symbol, top] } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_reader metadata: ::Hash[Symbol, top]? + + def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] + + def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } + end + + type condition = + { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::operator, + value: String + } + + class Condition < FinchAPI::Internal::Type::BaseModel + attr_reader field: String? + + def field=: (String) -> String + + attr_reader operator: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::operator? + + def operator=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::operator + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::operator + + attr_reader value: String? + + def value=: (String) -> String + + def initialize: ( + ?field: String, + ?operator: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::operator, + ?value: String + ) -> void + + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::operator, + value: String + } + + type operator = :equals + + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS: :equals + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition::operator] + end + end + + type entity_type = :pay_statement_item + + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM: :pay_statement_item + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::entity_type] + end + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_item/rule_list_params.rbs b/sig/finch_api/models/hris/pay_statement_item/rule_list_params.rbs new file mode 100644 index 00000000..9c2a128e --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item/rule_list_params.rbs @@ -0,0 +1,30 @@ +module FinchAPI + module Models + module HRIS + module PayStatementItem + type rule_list_params = + { entity_ids: ::Array[String] } + & FinchAPI::Internal::Type::request_parameters + + class RuleListParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + + def initialize: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + entity_ids: ::Array[String], + request_options: FinchAPI::RequestOptions + } + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_item/rule_list_response.rbs b/sig/finch_api/models/hris/pay_statement_item/rule_list_response.rbs new file mode 100644 index 00000000..9370669d --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item/rule_list_response.rbs @@ -0,0 +1,151 @@ +module FinchAPI + module Models + module HRIS + module PayStatementItem + type rule_list_response = + { + id: String, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition], + created_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::entity_type, + priority: Integer, + updated_at: Time + } + + class RuleListResponse < FinchAPI::Internal::Type::BaseModel + attr_reader id: String? + + def id=: (String) -> String + + attr_reader attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes? + + def attributes=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes + + attr_reader conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition]? + + def conditions=: ( + ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition] + ) -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition] + + attr_reader created_at: Time? + + def created_at=: (Time) -> Time + + attr_accessor effective_end_date: String? + + attr_accessor effective_start_date: String? + + attr_reader entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::entity_type? + + def entity_type=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::entity_type + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::entity_type + + attr_reader priority: Integer? + + def priority=: (Integer) -> Integer + + attr_reader updated_at: Time? + + def updated_at=: (Time) -> Time + + def initialize: ( + ?id: String, + ?attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes, + ?conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition], + ?created_at: Time, + ?effective_end_date: String?, + ?effective_start_date: String?, + ?entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::entity_type, + ?priority: Integer, + ?updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition], + created_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::entity_type, + priority: Integer, + updated_at: Time + } + + type attributes = { metadata: ::Hash[Symbol, top] } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_reader metadata: ::Hash[Symbol, top]? + + def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] + + def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } + end + + type condition = + { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::operator, + value: String + } + + class Condition < FinchAPI::Internal::Type::BaseModel + attr_reader field: String? + + def field=: (String) -> String + + attr_reader operator: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::operator? + + def operator=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::operator + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::operator + + attr_reader value: String? + + def value=: (String) -> String + + def initialize: ( + ?field: String, + ?operator: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::operator, + ?value: String + ) -> void + + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::operator, + value: String + } + + type operator = :equals + + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS: :equals + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::operator] + end + end + + type entity_type = :pay_statement_item + + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM: :pay_statement_item + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::entity_type] + end + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_item/rule_update_params.rbs b/sig/finch_api/models/hris/pay_statement_item/rule_update_params.rbs new file mode 100644 index 00000000..45483f56 --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item/rule_update_params.rbs @@ -0,0 +1,44 @@ +module FinchAPI + module Models + module HRIS + module PayStatementItem + type rule_update_params = + { + rule_id: String, + entity_ids: ::Array[String], + optional_property: top + } + & FinchAPI::Internal::Type::request_parameters + + class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + attr_accessor rule_id: String + + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + + attr_reader optional_property: top? + + def optional_property=: (top) -> top + + def initialize: ( + rule_id: String, + ?entity_ids: ::Array[String], + ?optional_property: top, + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + rule_id: String, + entity_ids: ::Array[String], + optional_property: top, + request_options: FinchAPI::RequestOptions + } + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_item/rule_update_response.rbs b/sig/finch_api/models/hris/pay_statement_item/rule_update_response.rbs new file mode 100644 index 00000000..3ad1b482 --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item/rule_update_response.rbs @@ -0,0 +1,151 @@ +module FinchAPI + module Models + module HRIS + module PayStatementItem + type rule_update_response = + { + id: String, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition], + created_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::entity_type, + priority: Integer, + updated_at: Time + } + + class RuleUpdateResponse < FinchAPI::Internal::Type::BaseModel + attr_reader id: String? + + def id=: (String) -> String + + attr_reader attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes? + + def attributes=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes + + attr_reader conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition]? + + def conditions=: ( + ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition] + ) -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition] + + attr_reader created_at: Time? + + def created_at=: (Time) -> Time + + attr_accessor effective_end_date: String? + + attr_accessor effective_start_date: String? + + attr_reader entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::entity_type? + + def entity_type=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::entity_type + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::entity_type + + attr_reader priority: Integer? + + def priority=: (Integer) -> Integer + + attr_reader updated_at: Time? + + def updated_at=: (Time) -> Time + + def initialize: ( + ?id: String, + ?attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes, + ?conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition], + ?created_at: Time, + ?effective_end_date: String?, + ?effective_start_date: String?, + ?entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::entity_type, + ?priority: Integer, + ?updated_at: Time + ) -> void + + def to_hash: -> { + id: String, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes, + conditions: ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition], + created_at: Time, + effective_end_date: String?, + effective_start_date: String?, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::entity_type, + priority: Integer, + updated_at: Time + } + + type attributes = { metadata: ::Hash[Symbol, top] } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_reader metadata: ::Hash[Symbol, top]? + + def metadata=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top] + + def initialize: (?metadata: ::Hash[Symbol, top]) -> void + + def to_hash: -> { metadata: ::Hash[Symbol, top] } + end + + type condition = + { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::operator, + value: String + } + + class Condition < FinchAPI::Internal::Type::BaseModel + attr_reader field: String? + + def field=: (String) -> String + + attr_reader operator: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::operator? + + def operator=: ( + FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::operator + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::operator + + attr_reader value: String? + + def value=: (String) -> String + + def initialize: ( + ?field: String, + ?operator: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::operator, + ?value: String + ) -> void + + def to_hash: -> { + field: String, + operator: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::operator, + value: String + } + + type operator = :equals + + module Operator + extend FinchAPI::Internal::Type::Enum + + EQUALS: :equals + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::operator] + end + end + + type entity_type = :pay_statement_item + + module EntityType + extend FinchAPI::Internal::Type::Enum + + PAY_STATEMENT_ITEM: :pay_statement_item + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::entity_type] + end + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_item_list_params.rbs b/sig/finch_api/models/hris/pay_statement_item_list_params.rbs new file mode 100644 index 00000000..ae852711 --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item_list_params.rbs @@ -0,0 +1,81 @@ +module FinchAPI + module Models + module HRIS + type pay_statement_item_list_params = + { + categories: ::Array[FinchAPI::Models::HRIS::PayStatementItemListParams::category], + end_date: Date, + entity_ids: ::Array[String], + name: String, + start_date: Date, + type: String + } + & FinchAPI::Internal::Type::request_parameters + + class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel + extend FinchAPI::Internal::Type::RequestParameters::Converter + include FinchAPI::Internal::Type::RequestParameters + + attr_reader categories: ::Array[FinchAPI::Models::HRIS::PayStatementItemListParams::category]? + + def categories=: ( + ::Array[FinchAPI::Models::HRIS::PayStatementItemListParams::category] + ) -> ::Array[FinchAPI::Models::HRIS::PayStatementItemListParams::category] + + attr_reader end_date: Date? + + def end_date=: (Date) -> Date + + attr_reader entity_ids: ::Array[String]? + + def entity_ids=: (::Array[String]) -> ::Array[String] + + attr_reader name: String? + + def name=: (String) -> String + + attr_reader start_date: Date? + + def start_date=: (Date) -> Date + + attr_reader type: String? + + def type=: (String) -> String + + def initialize: ( + ?categories: ::Array[FinchAPI::Models::HRIS::PayStatementItemListParams::category], + ?end_date: Date, + ?entity_ids: ::Array[String], + ?name: String, + ?start_date: Date, + ?type: String, + ?request_options: FinchAPI::request_opts + ) -> void + + def to_hash: -> { + categories: ::Array[FinchAPI::Models::HRIS::PayStatementItemListParams::category], + end_date: Date, + entity_ids: ::Array[String], + name: String, + start_date: Date, + type: String, + request_options: FinchAPI::RequestOptions + } + + type category = + :earnings | :taxes | :employee_deductions | :employer_contributions + + module Category + extend FinchAPI::Internal::Type::Enum + + EARNINGS: :earnings + TAXES: :taxes + EMPLOYEE_DEDUCTIONS: :employee_deductions + EMPLOYER_CONTRIBUTIONS: :employer_contributions + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItemListParams::category] + end + end + end + end +end diff --git a/sig/finch_api/models/hris/pay_statement_item_list_response.rbs b/sig/finch_api/models/hris/pay_statement_item_list_response.rbs new file mode 100644 index 00000000..f52b61b1 --- /dev/null +++ b/sig/finch_api/models/hris/pay_statement_item_list_response.rbs @@ -0,0 +1,78 @@ +module FinchAPI + module Models + module HRIS + type pay_statement_item_list_response = + { + attributes: FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes, + category: FinchAPI::Models::HRIS::PayStatementItemListResponse::category, + name: String + } + + class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel + attr_accessor attributes: FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes + + attr_accessor category: FinchAPI::Models::HRIS::PayStatementItemListResponse::category + + attr_accessor name: String + + def initialize: ( + attributes: FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes, + category: FinchAPI::Models::HRIS::PayStatementItemListResponse::category, + name: String + ) -> void + + def to_hash: -> { + attributes: FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes, + category: FinchAPI::Models::HRIS::PayStatementItemListResponse::category, + name: String + } + + type attributes = + { + metadata: ::Hash[Symbol, top?]?, + employer: bool?, + pre_tax: bool?, + type: String? + } + + class Attributes < FinchAPI::Internal::Type::BaseModel + attr_accessor metadata: ::Hash[Symbol, top?]? + + attr_accessor employer: bool? + + attr_accessor pre_tax: bool? + + attr_accessor type: String? + + def initialize: ( + metadata: ::Hash[Symbol, top?]?, + ?employer: bool?, + ?pre_tax: bool?, + ?type: String? + ) -> void + + def to_hash: -> { + metadata: ::Hash[Symbol, top?]?, + employer: bool?, + pre_tax: bool?, + type: String? + } + end + + type category = + :earnings | :taxes | :employee_deductions | :employer_contributions + + module Category + extend FinchAPI::Internal::Type::Enum + + EARNINGS: :earnings + TAXES: :taxes + EMPLOYEE_DEDUCTIONS: :employee_deductions + EMPLOYER_CONTRIBUTIONS: :employer_contributions + + def self?.values: -> ::Array[FinchAPI::Models::HRIS::PayStatementItemListResponse::category] + end + end + end + end +end diff --git a/sig/finch_api/resources/hris.rbs b/sig/finch_api/resources/hris.rbs index 2ebb06eb..1f91d02f 100644 --- a/sig/finch_api/resources/hris.rbs +++ b/sig/finch_api/resources/hris.rbs @@ -3,6 +3,8 @@ module FinchAPI class HRIS attr_reader company: FinchAPI::Resources::HRIS::Company + attr_reader pay_statement_item: FinchAPI::Resources::HRIS::PayStatementItem + attr_reader directory: FinchAPI::Resources::HRIS::Directory attr_reader individuals: FinchAPI::Resources::HRIS::Individuals diff --git a/sig/finch_api/resources/hris/company.rbs b/sig/finch_api/resources/hris/company.rbs index 9cc37e7c..ae2d8a35 100644 --- a/sig/finch_api/resources/hris/company.rbs +++ b/sig/finch_api/resources/hris/company.rbs @@ -2,8 +2,6 @@ module FinchAPI module Resources class HRIS class Company - attr_reader pay_statement_item: FinchAPI::Resources::HRIS::Company::PayStatementItem - def retrieve: ( ?entity_ids: ::Array[String], ?request_options: FinchAPI::request_opts diff --git a/sig/finch_api/resources/hris/company/pay_statement_item.rbs b/sig/finch_api/resources/hris/company/pay_statement_item.rbs deleted file mode 100644 index a17ab6da..00000000 --- a/sig/finch_api/resources/hris/company/pay_statement_item.rbs +++ /dev/null @@ -1,23 +0,0 @@ -module FinchAPI - module Resources - class HRIS - class Company - class PayStatementItem - attr_reader rules: FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules - - def list: ( - ?categories: ::Array[FinchAPI::Models::HRIS::Company::PayStatementItemListParams::category], - ?end_date: Date, - ?entity_ids: ::Array[String], - ?name: String, - ?start_date: Date, - ?type: String, - ?request_options: FinchAPI::request_opts - ) -> FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::Company::PayStatementItemListResponse] - - def initialize: (client: FinchAPI::Client) -> void - end - end - end - end -end diff --git a/sig/finch_api/resources/hris/company/pay_statement_item/rules.rbs b/sig/finch_api/resources/hris/company/pay_statement_item/rules.rbs deleted file mode 100644 index da5da32c..00000000 --- a/sig/finch_api/resources/hris/company/pay_statement_item/rules.rbs +++ /dev/null @@ -1,41 +0,0 @@ -module FinchAPI - module Resources - class HRIS - class Company - class PayStatementItem - class Rules - def create: ( - ?entity_ids: ::Array[String], - ?attributes: FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, - ?conditions: ::Array[FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams::Condition], - ?effective_end_date: String?, - ?effective_start_date: String?, - ?entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::entity_type, - ?request_options: FinchAPI::request_opts - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse - - def update: ( - String rule_id, - ?entity_ids: ::Array[String], - ?optional_property: top, - ?request_options: FinchAPI::request_opts - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse - - def list: ( - ?entity_ids: ::Array[String], - ?request_options: FinchAPI::request_opts - ) -> FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse] - - def delete: ( - String rule_id, - ?entity_ids: ::Array[String], - ?request_options: FinchAPI::request_opts - ) -> FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse - - def initialize: (client: FinchAPI::Client) -> void - end - end - end - end - end -end diff --git a/sig/finch_api/resources/hris/pay_statement_item.rbs b/sig/finch_api/resources/hris/pay_statement_item.rbs new file mode 100644 index 00000000..aee03249 --- /dev/null +++ b/sig/finch_api/resources/hris/pay_statement_item.rbs @@ -0,0 +1,21 @@ +module FinchAPI + module Resources + class HRIS + class PayStatementItem + attr_reader rules: FinchAPI::Resources::HRIS::PayStatementItem::Rules + + def list: ( + ?categories: ::Array[FinchAPI::Models::HRIS::PayStatementItemListParams::category], + ?end_date: Date, + ?entity_ids: ::Array[String], + ?name: String, + ?start_date: Date, + ?type: String, + ?request_options: FinchAPI::request_opts + ) -> FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::PayStatementItemListResponse] + + def initialize: (client: FinchAPI::Client) -> void + end + end + end +end diff --git a/sig/finch_api/resources/hris/pay_statement_item/rules.rbs b/sig/finch_api/resources/hris/pay_statement_item/rules.rbs new file mode 100644 index 00000000..2861f996 --- /dev/null +++ b/sig/finch_api/resources/hris/pay_statement_item/rules.rbs @@ -0,0 +1,39 @@ +module FinchAPI + module Resources + class HRIS + class PayStatementItem + class Rules + def create: ( + ?entity_ids: ::Array[String], + ?attributes: FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Attributes, + ?conditions: ::Array[FinchAPI::HRIS::PayStatementItem::RuleCreateParams::Condition], + ?effective_end_date: String?, + ?effective_start_date: String?, + ?entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateParams::entity_type, + ?request_options: FinchAPI::request_opts + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse + + def update: ( + String rule_id, + ?entity_ids: ::Array[String], + ?optional_property: top, + ?request_options: FinchAPI::request_opts + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse + + def list: ( + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> FinchAPI::Internal::ResponsesPage[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse] + + def delete: ( + String rule_id, + ?entity_ids: ::Array[String], + ?request_options: FinchAPI::request_opts + ) -> FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse + + def initialize: (client: FinchAPI::Client) -> void + end + end + end + end +end diff --git a/test/finch_api/resource_namespaces.rb b/test/finch_api/resource_namespaces.rb index 233c4db5..66c4ae87 100644 --- a/test/finch_api/resource_namespaces.rb +++ b/test/finch_api/resource_namespaces.rb @@ -6,11 +6,6 @@ module Resources module Benefits end - module Company - module PayStatementItem - end - end - module Connect end @@ -21,9 +16,7 @@ module HRIS module Benefits end - module Company - module PayStatementItem - end + module PayStatementItem end end diff --git a/test/finch_api/resources/hris/company/pay_statement_item/rules_test.rb b/test/finch_api/resources/hris/company/pay_statement_item/rules_test.rb deleted file mode 100644 index 9e68894f..00000000 --- a/test/finch_api/resources/hris/company/pay_statement_item/rules_test.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true - -require_relative "../../../../test_helper" - -class FinchAPI::Test::Resources::HRIS::Company::PayStatementItem::RulesTest < FinchAPI::Test::ResourceTest - def test_create - response = @finch.hris.company.pay_statement_item.rules.create - - assert_pattern do - response => FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse - end - - assert_pattern do - response => { - id: String | nil, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Attributes | nil, - conditions: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::Condition]) | nil, - created_at: Time | nil, - effective_end_date: String | nil, - effective_start_date: String | nil, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse::EntityType | nil, - priority: Integer | nil, - updated_at: Time | nil - } - end - end - - def test_update - response = @finch.hris.company.pay_statement_item.rules.update("rule_id") - - assert_pattern do - response => FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse - end - - assert_pattern do - response => { - id: String | nil, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Attributes | nil, - conditions: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::Condition]) | nil, - created_at: Time | nil, - effective_end_date: String | nil, - effective_start_date: String | nil, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse::EntityType | nil, - priority: Integer | nil, - updated_at: Time | nil - } - end - end - - def test_list - response = @finch.hris.company.pay_statement_item.rules.list - - assert_pattern do - response => FinchAPI::Internal::ResponsesPage - end - - row = response.to_enum.first - return if row.nil? - - assert_pattern do - row => FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse - end - - assert_pattern do - row => { - id: String | nil, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Attributes | nil, - conditions: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::Condition]) | nil, - created_at: Time | nil, - effective_end_date: String | nil, - effective_start_date: String | nil, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse::EntityType | nil, - priority: Integer | nil, - updated_at: Time | nil - } - end - end - - def test_delete - response = @finch.hris.company.pay_statement_item.rules.delete("rule_id") - - assert_pattern do - response => FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse - end - - assert_pattern do - response => { - id: String | nil, - attributes: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Attributes | nil, - conditions: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::Condition]) | nil, - created_at: Time | nil, - deleted_at: Time | nil, - effective_end_date: String | nil, - effective_start_date: String | nil, - entity_type: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse::EntityType | nil, - priority: Integer | nil, - updated_at: Time | nil - } - end - end -end diff --git a/test/finch_api/resources/hris/company/pay_statement_item_test.rb b/test/finch_api/resources/hris/company/pay_statement_item_test.rb deleted file mode 100644 index 9f6a30a5..00000000 --- a/test/finch_api/resources/hris/company/pay_statement_item_test.rb +++ /dev/null @@ -1,28 +0,0 @@ -# frozen_string_literal: true - -require_relative "../../../test_helper" - -class FinchAPI::Test::Resources::HRIS::Company::PayStatementItemTest < FinchAPI::Test::ResourceTest - def test_list - response = @finch.hris.company.pay_statement_item.list - - assert_pattern do - response => FinchAPI::Internal::ResponsesPage - end - - row = response.to_enum.first - return if row.nil? - - assert_pattern do - row => FinchAPI::Models::HRIS::Company::PayStatementItemListResponse - end - - assert_pattern do - row => { - attributes: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Attributes, - category: FinchAPI::Models::HRIS::Company::PayStatementItemListResponse::Category, - name: String - } - end - end -end diff --git a/test/finch_api/resources/hris/pay_statement_item/rules_test.rb b/test/finch_api/resources/hris/pay_statement_item/rules_test.rb new file mode 100644 index 00000000..76d938f3 --- /dev/null +++ b/test/finch_api/resources/hris/pay_statement_item/rules_test.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true + +require_relative "../../../test_helper" + +class FinchAPI::Test::Resources::HRIS::PayStatementItem::RulesTest < FinchAPI::Test::ResourceTest + def test_create + response = @finch.hris.pay_statement_item.rules.create + + assert_pattern do + response => FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse + end + + assert_pattern do + response => { + id: String | nil, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Attributes | nil, + conditions: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::Condition]) | nil, + created_at: Time | nil, + effective_end_date: String | nil, + effective_start_date: String | nil, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleCreateResponse::EntityType | nil, + priority: Integer | nil, + updated_at: Time | nil + } + end + end + + def test_update + response = @finch.hris.pay_statement_item.rules.update("rule_id") + + assert_pattern do + response => FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse + end + + assert_pattern do + response => { + id: String | nil, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes | nil, + conditions: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition]) | nil, + created_at: Time | nil, + effective_end_date: String | nil, + effective_start_date: String | nil, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType | nil, + priority: Integer | nil, + updated_at: Time | nil + } + end + end + + def test_list + response = @finch.hris.pay_statement_item.rules.list + + assert_pattern do + response => FinchAPI::Internal::ResponsesPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse + end + + assert_pattern do + row => { + id: String | nil, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes | nil, + conditions: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition]) | nil, + created_at: Time | nil, + effective_end_date: String | nil, + effective_start_date: String | nil, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType | nil, + priority: Integer | nil, + updated_at: Time | nil + } + end + end + + def test_delete + response = @finch.hris.pay_statement_item.rules.delete("rule_id") + + assert_pattern do + response => FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse + end + + assert_pattern do + response => { + id: String | nil, + attributes: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Attributes | nil, + conditions: ^(FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::Condition]) | nil, + created_at: Time | nil, + deleted_at: Time | nil, + effective_end_date: String | nil, + effective_start_date: String | nil, + entity_type: FinchAPI::Models::HRIS::PayStatementItem::RuleDeleteResponse::EntityType | nil, + priority: Integer | nil, + updated_at: Time | nil + } + end + end +end diff --git a/test/finch_api/resources/hris/pay_statement_item_test.rb b/test/finch_api/resources/hris/pay_statement_item_test.rb new file mode 100644 index 00000000..4d9015ed --- /dev/null +++ b/test/finch_api/resources/hris/pay_statement_item_test.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +require_relative "../../test_helper" + +class FinchAPI::Test::Resources::HRIS::PayStatementItemTest < FinchAPI::Test::ResourceTest + def test_list + response = @finch.hris.pay_statement_item.list + + assert_pattern do + response => FinchAPI::Internal::ResponsesPage + end + + row = response.to_enum.first + return if row.nil? + + assert_pattern do + row => FinchAPI::Models::HRIS::PayStatementItemListResponse + end + + assert_pattern do + row => { + attributes: FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes, + category: FinchAPI::Models::HRIS::PayStatementItemListResponse::Category, + name: String + } + end + end +end