finch-api 0.1.0.pre.alpha.44 → 0.1.0.pre.alpha.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/finch_api/models/hris/pay_statement_item/rule_create_params.rb +133 -0
  5. data/lib/finch_api/models/hris/pay_statement_item/rule_create_response.rb +157 -0
  6. data/lib/finch_api/models/hris/pay_statement_item/rule_delete_params.rb +33 -0
  7. data/lib/finch_api/models/hris/pay_statement_item/rule_delete_response.rb +165 -0
  8. data/lib/finch_api/models/hris/pay_statement_item/rule_list_params.rb +26 -0
  9. data/lib/finch_api/models/hris/pay_statement_item/rule_list_response.rb +156 -0
  10. data/lib/finch_api/models/hris/pay_statement_item/rule_update_params.rb +40 -0
  11. data/lib/finch_api/models/hris/pay_statement_item/rule_update_response.rb +157 -0
  12. data/lib/finch_api/models/hris/pay_statement_item_list_params.rb +83 -0
  13. data/lib/finch_api/models/hris/pay_statement_item_list_response.rb +97 -0
  14. data/lib/finch_api/resources/hris/company.rb +0 -4
  15. data/lib/finch_api/resources/hris/pay_statement_item/rules.rb +141 -0
  16. data/lib/finch_api/resources/hris/pay_statement_item.rb +59 -0
  17. data/lib/finch_api/resources/hris.rb +4 -0
  18. data/lib/finch_api/version.rb +1 -1
  19. data/lib/finch_api.rb +12 -12
  20. data/rbi/finch_api/models/hris/pay_statement_item/rule_create_params.rbi +315 -0
  21. data/rbi/finch_api/models/hris/pay_statement_item/rule_create_response.rbi +342 -0
  22. data/rbi/finch_api/models/hris/pay_statement_item/rule_delete_params.rbi +59 -0
  23. data/rbi/finch_api/models/hris/pay_statement_item/rule_delete_response.rbi +353 -0
  24. data/rbi/finch_api/models/hris/pay_statement_item/rule_list_params.rbi +53 -0
  25. data/rbi/finch_api/models/hris/pay_statement_item/rule_list_response.rbi +342 -0
  26. data/rbi/finch_api/models/hris/pay_statement_item/rule_update_params.rbi +68 -0
  27. data/rbi/finch_api/models/hris/pay_statement_item/rule_update_response.rbi +342 -0
  28. data/rbi/finch_api/models/hris/pay_statement_item_list_params.rbi +177 -0
  29. data/rbi/finch_api/models/hris/pay_statement_item_list_response.rbi +189 -0
  30. data/rbi/finch_api/resources/hris/company.rbi +0 -3
  31. data/rbi/finch_api/resources/hris/pay_statement_item/rules.rbi +114 -0
  32. data/rbi/finch_api/resources/hris/pay_statement_item.rbi +57 -0
  33. data/rbi/finch_api/resources/hris.rbi +3 -0
  34. data/sig/finch_api/models/hris/pay_statement_item/rule_create_params.rbs +136 -0
  35. data/sig/finch_api/models/hris/pay_statement_item/rule_create_response.rbs +151 -0
  36. data/sig/finch_api/models/hris/pay_statement_item/rule_delete_params.rbs +34 -0
  37. data/sig/finch_api/models/hris/pay_statement_item/rule_delete_response.rbs +158 -0
  38. data/sig/finch_api/models/hris/pay_statement_item/rule_list_params.rbs +30 -0
  39. data/sig/finch_api/models/hris/pay_statement_item/rule_list_response.rbs +151 -0
  40. data/sig/finch_api/models/hris/pay_statement_item/rule_update_params.rbs +44 -0
  41. data/sig/finch_api/models/hris/pay_statement_item/rule_update_response.rbs +151 -0
  42. data/sig/finch_api/models/hris/pay_statement_item_list_params.rbs +81 -0
  43. data/sig/finch_api/models/hris/pay_statement_item_list_response.rbs +78 -0
  44. data/sig/finch_api/resources/hris/company.rbs +0 -2
  45. data/sig/finch_api/resources/hris/pay_statement_item/rules.rbs +39 -0
  46. data/sig/finch_api/resources/hris/pay_statement_item.rbs +21 -0
  47. data/sig/finch_api/resources/hris.rbs +2 -0
  48. metadata +37 -37
  49. data/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb +0 -137
  50. data/lib/finch_api/models/hris/company/pay_statement_item/rule_create_response.rb +0 -160
  51. data/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb +0 -35
  52. data/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rb +0 -168
  53. data/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rb +0 -28
  54. data/lib/finch_api/models/hris/company/pay_statement_item/rule_list_response.rb +0 -160
  55. data/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb +0 -42
  56. data/lib/finch_api/models/hris/company/pay_statement_item/rule_update_response.rb +0 -160
  57. data/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb +0 -85
  58. data/lib/finch_api/models/hris/company/pay_statement_item_list_response.rb +0 -99
  59. data/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb +0 -144
  60. data/lib/finch_api/resources/hris/company/pay_statement_item.rb +0 -61
  61. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi +0 -319
  62. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbi +0 -346
  63. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi +0 -61
  64. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbi +0 -357
  65. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi +0 -55
  66. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbi +0 -346
  67. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi +0 -70
  68. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbi +0 -346
  69. data/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi +0 -179
  70. data/rbi/finch_api/models/hris/company/pay_statement_item_list_response.rbi +0 -191
  71. data/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi +0 -116
  72. data/rbi/finch_api/resources/hris/company/pay_statement_item.rbi +0 -61
  73. data/sig/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbs +0 -138
  74. data/sig/finch_api/models/hris/company/pay_statement_item/rule_create_response.rbs +0 -153
  75. data/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs +0 -36
  76. data/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_response.rbs +0 -160
  77. data/sig/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbs +0 -32
  78. data/sig/finch_api/models/hris/company/pay_statement_item/rule_list_response.rbs +0 -153
  79. data/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs +0 -46
  80. data/sig/finch_api/models/hris/company/pay_statement_item/rule_update_response.rbs +0 -153
  81. data/sig/finch_api/models/hris/company/pay_statement_item_list_params.rbs +0 -83
  82. data/sig/finch_api/models/hris/company/pay_statement_item_list_response.rbs +0 -80
  83. data/sig/finch_api/resources/hris/company/pay_statement_item/rules.rbs +0 -41
  84. data/sig/finch_api/resources/hris/company/pay_statement_item.rbs +0 -23
@@ -0,0 +1,156 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinchAPI
4
+ module Models
5
+ module HRIS
6
+ module PayStatementItem
7
+ # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#list
8
+ class RuleListResponse < FinchAPI::Internal::Type::BaseModel
9
+ # @!attribute id
10
+ # Finch id (uuidv4) for the rule.
11
+ #
12
+ # @return [String, nil]
13
+ optional :id, String
14
+
15
+ # @!attribute attributes
16
+ # Specifies the fields to be applied when the condition is met.
17
+ #
18
+ # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes, nil]
19
+ optional :attributes, -> { FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes }
20
+
21
+ # @!attribute conditions
22
+ #
23
+ # @return [Array<FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition>, nil]
24
+ optional :conditions,
25
+ -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition] }
26
+
27
+ # @!attribute created_at
28
+ # The datetime when the rule was created.
29
+ #
30
+ # @return [Time, nil]
31
+ optional :created_at, Time
32
+
33
+ # @!attribute effective_end_date
34
+ # Specifies when the rules should stop applying rules based on the date.
35
+ #
36
+ # @return [String, nil]
37
+ optional :effective_end_date, String, nil?: true
38
+
39
+ # @!attribute effective_start_date
40
+ # Specifies when the rule should begin applying based on the date.
41
+ #
42
+ # @return [String, nil]
43
+ optional :effective_start_date, String, nil?: true
44
+
45
+ # @!attribute entity_type
46
+ # The entity type to which the rule is applied.
47
+ #
48
+ # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType, nil]
49
+ optional :entity_type, enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType }
50
+
51
+ # @!attribute priority
52
+ # The priority of the rule.
53
+ #
54
+ # @return [Integer, nil]
55
+ optional :priority, Integer
56
+
57
+ # @!attribute updated_at
58
+ # The datetime when the rule was last updated.
59
+ #
60
+ # @return [Time, nil]
61
+ optional :updated_at, Time
62
+
63
+ # @!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)
64
+ # @param id [String] Finch id (uuidv4) for the rule.
65
+ #
66
+ # @param attributes [FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes] Specifies the fields to be applied when the condition is met.
67
+ #
68
+ # @param conditions [Array<FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition>]
69
+ #
70
+ # @param created_at [Time] The datetime when the rule was created.
71
+ #
72
+ # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date.
73
+ #
74
+ # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date.
75
+ #
76
+ # @param entity_type [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::EntityType] The entity type to which the rule is applied.
77
+ #
78
+ # @param priority [Integer] The priority of the rule.
79
+ #
80
+ # @param updated_at [Time] The datetime when the rule was last updated.
81
+
82
+ # @see FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse#attributes
83
+ class Attributes < FinchAPI::Internal::Type::BaseModel
84
+ # @!attribute metadata
85
+ # The metadata to be attached in the entity. It is a key-value pairs where the
86
+ # values can be of any type (string, number, boolean, object, array, etc.).
87
+ #
88
+ # @return [Hash{Symbol=>Object}, nil]
89
+ optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown]
90
+
91
+ # @!method initialize(metadata: nil)
92
+ # Some parameter documentations has been truncated, see
93
+ # {FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Attributes} for
94
+ # more details.
95
+ #
96
+ # Specifies the fields to be applied when the condition is met.
97
+ #
98
+ # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val
99
+ end
100
+
101
+ class Condition < FinchAPI::Internal::Type::BaseModel
102
+ # @!attribute field
103
+ # The field to be checked in the rule.
104
+ #
105
+ # @return [String, nil]
106
+ optional :field, String
107
+
108
+ # @!attribute operator
109
+ # The operator to be used in the rule.
110
+ #
111
+ # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator, nil]
112
+ optional :operator,
113
+ enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator }
114
+
115
+ # @!attribute value
116
+ # The value of the field to be checked in the rule.
117
+ #
118
+ # @return [String, nil]
119
+ optional :value, String
120
+
121
+ # @!method initialize(field: nil, operator: nil, value: nil)
122
+ # @param field [String] The field to be checked in the rule.
123
+ #
124
+ # @param operator [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition::Operator] The operator to be used in the rule.
125
+ #
126
+ # @param value [String] The value of the field to be checked in the rule.
127
+
128
+ # The operator to be used in the rule.
129
+ #
130
+ # @see FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse::Condition#operator
131
+ module Operator
132
+ extend FinchAPI::Internal::Type::Enum
133
+
134
+ EQUALS = :equals
135
+
136
+ # @!method self.values
137
+ # @return [Array<Symbol>]
138
+ end
139
+ end
140
+
141
+ # The entity type to which the rule is applied.
142
+ #
143
+ # @see FinchAPI::Models::HRIS::PayStatementItem::RuleListResponse#entity_type
144
+ module EntityType
145
+ extend FinchAPI::Internal::Type::Enum
146
+
147
+ PAY_STATEMENT_ITEM = :pay_statement_item
148
+
149
+ # @!method self.values
150
+ # @return [Array<Symbol>]
151
+ end
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinchAPI
4
+ module Models
5
+ module HRIS
6
+ module PayStatementItem
7
+ # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#update
8
+ class RuleUpdateParams < FinchAPI::Internal::Type::BaseModel
9
+ extend FinchAPI::Internal::Type::RequestParameters::Converter
10
+ include FinchAPI::Internal::Type::RequestParameters
11
+
12
+ # @!attribute rule_id
13
+ #
14
+ # @return [String]
15
+ required :rule_id, String
16
+
17
+ # @!attribute entity_ids
18
+ # The entity IDs to update the rule for.
19
+ #
20
+ # @return [Array<String>, nil]
21
+ optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
22
+
23
+ # @!attribute optional_property
24
+ #
25
+ # @return [Object, nil]
26
+ optional :optional_property, FinchAPI::Internal::Type::Unknown, api_name: :optionalProperty
27
+
28
+ # @!method initialize(rule_id:, entity_ids: nil, optional_property: nil, request_options: {})
29
+ # @param rule_id [String]
30
+ #
31
+ # @param entity_ids [Array<String>] The entity IDs to update the rule for.
32
+ #
33
+ # @param optional_property [Object]
34
+ #
35
+ # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,157 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinchAPI
4
+ module Models
5
+ module HRIS
6
+ module PayStatementItem
7
+ # @see FinchAPI::Resources::HRIS::PayStatementItem::Rules#update
8
+ class RuleUpdateResponse < FinchAPI::Internal::Type::BaseModel
9
+ # @!attribute id
10
+ # Finch id (uuidv4) for the rule.
11
+ #
12
+ # @return [String, nil]
13
+ optional :id, String
14
+
15
+ # @!attribute attributes
16
+ # Specifies the fields to be applied when the condition is met.
17
+ #
18
+ # @return [FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes, nil]
19
+ optional :attributes, -> { FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes }
20
+
21
+ # @!attribute conditions
22
+ #
23
+ # @return [Array<FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition>, nil]
24
+ optional :conditions,
25
+ -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition] }
26
+
27
+ # @!attribute created_at
28
+ # The datetime when the rule was created.
29
+ #
30
+ # @return [Time, nil]
31
+ optional :created_at, Time
32
+
33
+ # @!attribute effective_end_date
34
+ # Specifies when the rules should stop applying rules based on the date.
35
+ #
36
+ # @return [String, nil]
37
+ optional :effective_end_date, String, nil?: true
38
+
39
+ # @!attribute effective_start_date
40
+ # Specifies when the rule should begin applying based on the date.
41
+ #
42
+ # @return [String, nil]
43
+ optional :effective_start_date, String, nil?: true
44
+
45
+ # @!attribute entity_type
46
+ # The entity type to which the rule is applied.
47
+ #
48
+ # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType, nil]
49
+ optional :entity_type,
50
+ enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType }
51
+
52
+ # @!attribute priority
53
+ # The priority of the rule.
54
+ #
55
+ # @return [Integer, nil]
56
+ optional :priority, Integer
57
+
58
+ # @!attribute updated_at
59
+ # The datetime when the rule was last updated.
60
+ #
61
+ # @return [Time, nil]
62
+ optional :updated_at, Time
63
+
64
+ # @!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)
65
+ # @param id [String] Finch id (uuidv4) for the rule.
66
+ #
67
+ # @param attributes [FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes] Specifies the fields to be applied when the condition is met.
68
+ #
69
+ # @param conditions [Array<FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition>]
70
+ #
71
+ # @param created_at [Time] The datetime when the rule was created.
72
+ #
73
+ # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date.
74
+ #
75
+ # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date.
76
+ #
77
+ # @param entity_type [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::EntityType] The entity type to which the rule is applied.
78
+ #
79
+ # @param priority [Integer] The priority of the rule.
80
+ #
81
+ # @param updated_at [Time] The datetime when the rule was last updated.
82
+
83
+ # @see FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse#attributes
84
+ class Attributes < FinchAPI::Internal::Type::BaseModel
85
+ # @!attribute metadata
86
+ # The metadata to be attached in the entity. It is a key-value pairs where the
87
+ # values can be of any type (string, number, boolean, object, array, etc.).
88
+ #
89
+ # @return [Hash{Symbol=>Object}, nil]
90
+ optional :metadata, FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown]
91
+
92
+ # @!method initialize(metadata: nil)
93
+ # Some parameter documentations has been truncated, see
94
+ # {FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Attributes} for
95
+ # more details.
96
+ #
97
+ # Specifies the fields to be applied when the condition is met.
98
+ #
99
+ # @param metadata [Hash{Symbol=>Object}] The metadata to be attached in the entity. It is a key-value pairs where the val
100
+ end
101
+
102
+ class Condition < FinchAPI::Internal::Type::BaseModel
103
+ # @!attribute field
104
+ # The field to be checked in the rule.
105
+ #
106
+ # @return [String, nil]
107
+ optional :field, String
108
+
109
+ # @!attribute operator
110
+ # The operator to be used in the rule.
111
+ #
112
+ # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator, nil]
113
+ optional :operator,
114
+ enum: -> { FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator }
115
+
116
+ # @!attribute value
117
+ # The value of the field to be checked in the rule.
118
+ #
119
+ # @return [String, nil]
120
+ optional :value, String
121
+
122
+ # @!method initialize(field: nil, operator: nil, value: nil)
123
+ # @param field [String] The field to be checked in the rule.
124
+ #
125
+ # @param operator [Symbol, FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition::Operator] The operator to be used in the rule.
126
+ #
127
+ # @param value [String] The value of the field to be checked in the rule.
128
+
129
+ # The operator to be used in the rule.
130
+ #
131
+ # @see FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse::Condition#operator
132
+ module Operator
133
+ extend FinchAPI::Internal::Type::Enum
134
+
135
+ EQUALS = :equals
136
+
137
+ # @!method self.values
138
+ # @return [Array<Symbol>]
139
+ end
140
+ end
141
+
142
+ # The entity type to which the rule is applied.
143
+ #
144
+ # @see FinchAPI::Models::HRIS::PayStatementItem::RuleUpdateResponse#entity_type
145
+ module EntityType
146
+ extend FinchAPI::Internal::Type::Enum
147
+
148
+ PAY_STATEMENT_ITEM = :pay_statement_item
149
+
150
+ # @!method self.values
151
+ # @return [Array<Symbol>]
152
+ end
153
+ end
154
+ end
155
+ end
156
+ end
157
+ end
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinchAPI
4
+ module Models
5
+ module HRIS
6
+ # @see FinchAPI::Resources::HRIS::PayStatementItem#list
7
+ class PayStatementItemListParams < FinchAPI::Internal::Type::BaseModel
8
+ extend FinchAPI::Internal::Type::RequestParameters::Converter
9
+ include FinchAPI::Internal::Type::RequestParameters
10
+
11
+ # @!attribute categories
12
+ # Comma-delimited list of pay statement item categories to filter on. If empty,
13
+ # defaults to all categories.
14
+ #
15
+ # @return [Array<Symbol, FinchAPI::Models::HRIS::PayStatementItemListParams::Category>, nil]
16
+ optional :categories,
17
+ -> { FinchAPI::Internal::Type::ArrayOf[enum: FinchAPI::HRIS::PayStatementItemListParams::Category] }
18
+
19
+ # @!attribute end_date
20
+ # The end date to retrieve pay statement items by via their last seen pay date in
21
+ # `YYYY-MM-DD` format.
22
+ #
23
+ # @return [Date, nil]
24
+ optional :end_date, Date
25
+
26
+ # @!attribute entity_ids
27
+ # The entity IDs to specify which entities' data to access.
28
+ #
29
+ # @return [Array<String>, nil]
30
+ optional :entity_ids, FinchAPI::Internal::Type::ArrayOf[String]
31
+
32
+ # @!attribute name
33
+ # Case-insensitive partial match search by pay statement item name.
34
+ #
35
+ # @return [String, nil]
36
+ optional :name, String
37
+
38
+ # @!attribute start_date
39
+ # The start date to retrieve pay statement items by via their last seen pay date
40
+ # (inclusive) in `YYYY-MM-DD` format.
41
+ #
42
+ # @return [Date, nil]
43
+ optional :start_date, Date
44
+
45
+ # @!attribute type
46
+ # String search by pay statement item type.
47
+ #
48
+ # @return [String, nil]
49
+ optional :type, String
50
+
51
+ # @!method initialize(categories: nil, end_date: nil, entity_ids: nil, name: nil, start_date: nil, type: nil, request_options: {})
52
+ # Some parameter documentations has been truncated, see
53
+ # {FinchAPI::Models::HRIS::PayStatementItemListParams} for more details.
54
+ #
55
+ # @param categories [Array<Symbol, FinchAPI::Models::HRIS::PayStatementItemListParams::Category>] Comma-delimited list of pay statement item categories to filter on. If empty, de
56
+ #
57
+ # @param end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in
58
+ #
59
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
60
+ #
61
+ # @param name [String] Case-insensitive partial match search by pay statement item name.
62
+ #
63
+ # @param start_date [Date] The start date to retrieve pay statement items by via their last seen pay date (
64
+ #
65
+ # @param type [String] String search by pay statement item type.
66
+ #
67
+ # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
68
+
69
+ module Category
70
+ extend FinchAPI::Internal::Type::Enum
71
+
72
+ EARNINGS = :earnings
73
+ TAXES = :taxes
74
+ EMPLOYEE_DEDUCTIONS = :employee_deductions
75
+ EMPLOYER_CONTRIBUTIONS = :employer_contributions
76
+
77
+ # @!method self.values
78
+ # @return [Array<Symbol>]
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,97 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinchAPI
4
+ module Models
5
+ module HRIS
6
+ # @see FinchAPI::Resources::HRIS::PayStatementItem#list
7
+ class PayStatementItemListResponse < FinchAPI::Internal::Type::BaseModel
8
+ # @!attribute attributes
9
+ # The attributes of the pay statement item.
10
+ #
11
+ # @return [FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes]
12
+ required :attributes, -> { FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes }
13
+
14
+ # @!attribute category
15
+ # The category of the pay statement item.
16
+ #
17
+ # @return [Symbol, FinchAPI::Models::HRIS::PayStatementItemListResponse::Category]
18
+ required :category, enum: -> { FinchAPI::Models::HRIS::PayStatementItemListResponse::Category }
19
+
20
+ # @!attribute name
21
+ # The name of the pay statement item.
22
+ #
23
+ # @return [String]
24
+ required :name, String
25
+
26
+ # @!method initialize(attributes:, category:, name:)
27
+ # @param attributes [FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes] The attributes of the pay statement item.
28
+ #
29
+ # @param category [Symbol, FinchAPI::Models::HRIS::PayStatementItemListResponse::Category] The category of the pay statement item.
30
+ #
31
+ # @param name [String] The name of the pay statement item.
32
+
33
+ # @see FinchAPI::Models::HRIS::PayStatementItemListResponse#attributes
34
+ class Attributes < FinchAPI::Internal::Type::BaseModel
35
+ # @!attribute metadata
36
+ # The metadata of the pay statement item derived by the rules engine if available.
37
+ # Each attribute will be a key-value pair defined by a rule.
38
+ #
39
+ # @return [Hash{Symbol=>Object, nil}, nil]
40
+ required :metadata,
41
+ FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true],
42
+ nil?: true
43
+
44
+ # @!attribute employer
45
+ # `true` if the amount is paid by the employers. This field is only available for
46
+ # taxes.
47
+ #
48
+ # @return [Boolean, nil]
49
+ optional :employer, FinchAPI::Internal::Type::Boolean, nil?: true
50
+
51
+ # @!attribute pre_tax
52
+ # `true` if the pay statement item is pre-tax. This field is only available for
53
+ # employee deductions.
54
+ #
55
+ # @return [Boolean, nil]
56
+ optional :pre_tax, FinchAPI::Internal::Type::Boolean, nil?: true
57
+
58
+ # @!attribute type
59
+ # The type of the pay statement item.
60
+ #
61
+ # @return [String, nil]
62
+ optional :type, String, nil?: true
63
+
64
+ # @!method initialize(metadata:, employer: nil, pre_tax: nil, type: nil)
65
+ # Some parameter documentations has been truncated, see
66
+ # {FinchAPI::Models::HRIS::PayStatementItemListResponse::Attributes} for more
67
+ # details.
68
+ #
69
+ # The attributes of the pay statement item.
70
+ #
71
+ # @param metadata [Hash{Symbol=>Object, nil}, nil] The metadata of the pay statement item derived by the rules engine if available.
72
+ #
73
+ # @param employer [Boolean, nil] `true` if the amount is paid by the employers. This field is only available for
74
+ #
75
+ # @param pre_tax [Boolean, nil] `true` if the pay statement item is pre-tax. This field is only available for em
76
+ #
77
+ # @param type [String, nil] The type of the pay statement item.
78
+ end
79
+
80
+ # The category of the pay statement item.
81
+ #
82
+ # @see FinchAPI::Models::HRIS::PayStatementItemListResponse#category
83
+ module Category
84
+ extend FinchAPI::Internal::Type::Enum
85
+
86
+ EARNINGS = :earnings
87
+ TAXES = :taxes
88
+ EMPLOYEE_DEDUCTIONS = :employee_deductions
89
+ EMPLOYER_CONTRIBUTIONS = :employer_contributions
90
+
91
+ # @!method self.values
92
+ # @return [Array<Symbol>]
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
@@ -4,9 +4,6 @@ module FinchAPI
4
4
  module Resources
5
5
  class HRIS
6
6
  class Company
7
- # @return [FinchAPI::Resources::HRIS::Company::PayStatementItem]
8
- attr_reader :pay_statement_item
9
-
10
7
  # Read basic company data
11
8
  #
12
9
  # @overload retrieve(entity_ids: nil, request_options: {})
@@ -36,7 +33,6 @@ module FinchAPI
36
33
  # @param client [FinchAPI::Client]
37
34
  def initialize(client:)
38
35
  @client = client
39
- @pay_statement_item = FinchAPI::Resources::HRIS::Company::PayStatementItem.new(client: client)
40
36
  end
41
37
  end
42
38
  end