|
| 1 | +# frozen_string_literal: true |
| 2 | + |
| 3 | +module FinchAPI |
| 4 | + module Models |
| 5 | + module HRIS |
| 6 | + module Company |
| 7 | + module PayStatementItem |
| 8 | + # @see FinchAPI::Resources::HRIS::Company::PayStatementItem::Rules#create |
| 9 | + class RuleCreateParams < FinchAPI::Internal::Type::BaseModel |
| 10 | + # @!parse |
| 11 | + # extend FinchAPI::Internal::Type::RequestParameters::Converter |
| 12 | + include FinchAPI::Internal::Type::RequestParameters |
| 13 | + |
| 14 | + # @!attribute [r] attributes |
| 15 | + # Specifies the fields to be applied when the condition is met. |
| 16 | + # |
| 17 | + # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes, nil] |
| 18 | + optional :attributes, |
| 19 | + -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes } |
| 20 | + |
| 21 | + # @!parse |
| 22 | + # # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] |
| 23 | + # attr_writer :attributes |
| 24 | + |
| 25 | + # @!attribute [r] conditions |
| 26 | + # |
| 27 | + # @return [Array<FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition>, nil] |
| 28 | + optional :conditions, |
| 29 | + -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition] } |
| 30 | + |
| 31 | + # @!parse |
| 32 | + # # @return [Array<FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition>] |
| 33 | + # attr_writer :conditions |
| 34 | + |
| 35 | + # @!attribute effective_end_date |
| 36 | + # Specifies when the rules should stop applying rules based on the date. |
| 37 | + # |
| 38 | + # @return [String, nil] |
| 39 | + optional :effective_end_date, String, nil?: true |
| 40 | + |
| 41 | + # @!attribute effective_start_date |
| 42 | + # Specifies when the rule should begin applying based on the date. |
| 43 | + # |
| 44 | + # @return [String, nil] |
| 45 | + optional :effective_start_date, String, nil?: true |
| 46 | + |
| 47 | + # @!attribute [r] entity_type |
| 48 | + # The entity type to which the rule is applied. |
| 49 | + # |
| 50 | + # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType, nil] |
| 51 | + optional :entity_type, |
| 52 | + enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType } |
| 53 | + |
| 54 | + # @!parse |
| 55 | + # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] |
| 56 | + # attr_writer :entity_type |
| 57 | + |
| 58 | + # @!parse |
| 59 | + # # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] |
| 60 | + # # @param conditions [Array<FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition>] |
| 61 | + # # @param effective_end_date [String, nil] |
| 62 | + # # @param effective_start_date [String, nil] |
| 63 | + # # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] |
| 64 | + # # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}] |
| 65 | + # # |
| 66 | + # def initialize( |
| 67 | + # attributes: nil, |
| 68 | + # conditions: nil, |
| 69 | + # effective_end_date: nil, |
| 70 | + # effective_start_date: nil, |
| 71 | + # entity_type: nil, |
| 72 | + # request_options: {}, |
| 73 | + # ** |
| 74 | + # ) |
| 75 | + # super |
| 76 | + # end |
| 77 | + |
| 78 | + # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void |
| 79 | + |
| 80 | + class Attributes < FinchAPI::Internal::Type::BaseModel |
| 81 | + # @!attribute [r] metadata |
| 82 | + # The metadata to be attached in the entity. It is a key-value pairs where the |
| 83 | + # values can be of any type (string, number, boolean, object, array, etc.). |
| 84 | + # |
| 85 | + # @return [Hash{Symbol=>Object}, nil] |
| 86 | + optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown] |
| 87 | + |
| 88 | + # @!parse |
| 89 | + # # @return [Hash{Symbol=>Object}] |
| 90 | + # attr_writer :metadata |
| 91 | + |
| 92 | + # @!parse |
| 93 | + # # Specifies the fields to be applied when the condition is met. |
| 94 | + # # |
| 95 | + # # @param metadata [Hash{Symbol=>Object}] |
| 96 | + # # |
| 97 | + # def initialize(metadata: nil, **) = super |
| 98 | + |
| 99 | + # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void |
| 100 | + end |
| 101 | + |
| 102 | + class Condition < FinchAPI::Internal::Type::BaseModel |
| 103 | + # @!attribute [r] field |
| 104 | + # The field to be checked in the rule. |
| 105 | + # |
| 106 | + # @return [String, nil] |
| 107 | + optional :field, String |
| 108 | + |
| 109 | + # @!parse |
| 110 | + # # @return [String] |
| 111 | + # attr_writer :field |
| 112 | + |
| 113 | + # @!attribute [r] operator |
| 114 | + # The operator to be used in the rule. |
| 115 | + # |
| 116 | + # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator, nil] |
| 117 | + optional :operator, |
| 118 | + enum: -> { FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator } |
| 119 | + |
| 120 | + # @!parse |
| 121 | + # # @return [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator] |
| 122 | + # attr_writer :operator |
| 123 | + |
| 124 | + # @!attribute [r] value |
| 125 | + # The value of the field to be checked in the rule. |
| 126 | + # |
| 127 | + # @return [String, nil] |
| 128 | + optional :value, String |
| 129 | + |
| 130 | + # @!parse |
| 131 | + # # @return [String] |
| 132 | + # attr_writer :value |
| 133 | + |
| 134 | + # @!parse |
| 135 | + # # @param field [String] |
| 136 | + # # @param operator [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition::Operator] |
| 137 | + # # @param value [String] |
| 138 | + # # |
| 139 | + # def initialize(field: nil, operator: nil, value: nil, **) = super |
| 140 | + |
| 141 | + # def initialize: (Hash | FinchAPI::Internal::Type::BaseModel) -> void |
| 142 | + |
| 143 | + # The operator to be used in the rule. |
| 144 | + # |
| 145 | + # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition#operator |
| 146 | + module Operator |
| 147 | + extend FinchAPI::Internal::Type::Enum |
| 148 | + |
| 149 | + EQUALS = :equals |
| 150 | + |
| 151 | + finalize! |
| 152 | + |
| 153 | + # @!parse |
| 154 | + # # @return [Array<Symbol>] |
| 155 | + # def self.values; end |
| 156 | + end |
| 157 | + end |
| 158 | + |
| 159 | + # The entity type to which the rule is applied. |
| 160 | + module EntityType |
| 161 | + extend FinchAPI::Internal::Type::Enum |
| 162 | + |
| 163 | + PAY_STATEMENT_ITEM = :pay_statement_item |
| 164 | + |
| 165 | + finalize! |
| 166 | + |
| 167 | + # @!parse |
| 168 | + # # @return [Array<Symbol>] |
| 169 | + # def self.values; end |
| 170 | + end |
| 171 | + end |
| 172 | + end |
| 173 | + end |
| 174 | + end |
| 175 | + end |
| 176 | +end |
0 commit comments