finch-api 0.1.0.pre.alpha.30 → 0.1.0.pre.alpha.31

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 (205) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -0
  3. data/README.md +1 -1
  4. data/lib/finch_api/errors.rb +25 -11
  5. data/lib/finch_api/file_part.rb +10 -7
  6. data/lib/finch_api/internal/individuals_page.rb +1 -1
  7. data/lib/finch_api/internal/page.rb +1 -1
  8. data/lib/finch_api/internal/responses_page.rb +1 -1
  9. data/lib/finch_api/internal/single_page.rb +1 -1
  10. data/lib/finch_api/internal/transport/base_client.rb +11 -7
  11. data/lib/finch_api/internal/transport/pooled_net_requester.rb +34 -31
  12. data/lib/finch_api/internal/type/base_page.rb +1 -1
  13. data/lib/finch_api/internal/type/file_input.rb +7 -4
  14. data/lib/finch_api/internal/util.rb +8 -7
  15. data/lib/finch_api/models/connect/session_new_params.rb +66 -50
  16. data/lib/finch_api/models/connect/session_reauthenticate_params.rb +10 -10
  17. data/lib/finch_api/models/create_access_token_response.rb +9 -1
  18. data/lib/finch_api/models/hris/benefit_contribution.rb +124 -29
  19. data/lib/finch_api/models/hris/benefit_create_params.rb +9 -1
  20. data/lib/finch_api/models/hris/benefit_list_params.rb +9 -1
  21. data/lib/finch_api/models/hris/benefit_list_supported_benefits_params.rb +9 -1
  22. data/lib/finch_api/models/hris/benefit_retrieve_params.rb +9 -1
  23. data/lib/finch_api/models/hris/benefit_update_params.rb +9 -1
  24. data/lib/finch_api/models/hris/benefits/individual_benefit.rb +222 -6
  25. data/lib/finch_api/models/hris/benefits/individual_enroll_many_params.rb +40 -2
  26. data/lib/finch_api/models/hris/benefits/individual_enrolled_ids_params.rb +9 -1
  27. data/lib/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rb +9 -1
  28. data/lib/finch_api/models/hris/benefits/individual_unenroll_many_params.rb +9 -1
  29. data/lib/finch_api/models/hris/company/pay_statement_item/rule_create_params.rb +9 -1
  30. data/lib/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rb +9 -1
  31. data/lib/finch_api/models/hris/company/pay_statement_item/rule_list_params.rb +9 -1
  32. data/lib/finch_api/models/hris/company/pay_statement_item/rule_update_params.rb +10 -1
  33. data/lib/finch_api/models/hris/company/pay_statement_item_list_params.rb +9 -1
  34. data/lib/finch_api/models/hris/company_retrieve_params.rb +9 -1
  35. data/lib/finch_api/models/hris/directory_list_individuals_params.rb +9 -1
  36. data/lib/finch_api/models/hris/directory_list_params.rb +9 -1
  37. data/lib/finch_api/models/hris/document_list_params.rb +9 -1
  38. data/lib/finch_api/models/hris/document_response.rb +11 -11
  39. data/lib/finch_api/models/hris/document_retreive_params.rb +9 -1
  40. data/lib/finch_api/models/hris/employment_retrieve_many_params.rb +9 -1
  41. data/lib/finch_api/models/hris/individual_retrieve_many_params.rb +11 -1
  42. data/lib/finch_api/models/hris/pay_statement.rb +11 -15
  43. data/lib/finch_api/models/hris/pay_statement_retrieve_many_params.rb +9 -1
  44. data/lib/finch_api/models/hris/payment_list_params.rb +9 -1
  45. data/lib/finch_api/models/hris/supported_benefit.rb +1 -0
  46. data/lib/finch_api/models/hris/w42005.rb +20 -20
  47. data/lib/finch_api/models/hris/w42020.rb +30 -30
  48. data/lib/finch_api/models/introspection.rb +38 -23
  49. data/lib/finch_api/models/jobs/automated_list_params.rb +1 -14
  50. data/lib/finch_api/models/jobs/automated_retrieve_params.rb +1 -14
  51. data/lib/finch_api/models/jobs/manual_retrieve_params.rb +1 -14
  52. data/lib/finch_api/models/payroll/pay_group_list_params.rb +11 -1
  53. data/lib/finch_api/models/payroll/pay_group_retrieve_params.rb +9 -1
  54. data/lib/finch_api/models/provider.rb +42 -1092
  55. data/lib/finch_api/models/provider_list_response.rb +143 -0
  56. data/lib/finch_api/models/request_forwarding_forward_params.rb +10 -6
  57. data/lib/finch_api/models/request_forwarding_forward_response.rb +69 -48
  58. data/lib/finch_api/resources/connect/sessions.rb +12 -12
  59. data/lib/finch_api/resources/hris/benefits/individuals.rb +24 -10
  60. data/lib/finch_api/resources/hris/benefits.rb +37 -16
  61. data/lib/finch_api/resources/hris/company/pay_statement_item/rules.rb +38 -15
  62. data/lib/finch_api/resources/hris/company/pay_statement_item.rb +3 -1
  63. data/lib/finch_api/resources/hris/company.rb +6 -2
  64. data/lib/finch_api/resources/hris/directory.rb +3 -1
  65. data/lib/finch_api/resources/hris/documents.rb +9 -3
  66. data/lib/finch_api/resources/hris/employments.rb +7 -3
  67. data/lib/finch_api/resources/hris/individuals.rb +10 -4
  68. data/lib/finch_api/resources/hris/pay_statements.rb +7 -3
  69. data/lib/finch_api/resources/hris/payments.rb +3 -1
  70. data/lib/finch_api/resources/jobs/automated.rb +3 -16
  71. data/lib/finch_api/resources/jobs/manual.rb +2 -10
  72. data/lib/finch_api/resources/payroll/pay_groups.rb +12 -3
  73. data/lib/finch_api/resources/providers.rb +2 -2
  74. data/lib/finch_api/resources/request_forwarding.rb +2 -2
  75. data/lib/finch_api/version.rb +1 -1
  76. data/lib/finch_api.rb +1 -0
  77. data/rbi/finch_api/errors.rbi +29 -2
  78. data/rbi/finch_api/file_part.rbi +1 -1
  79. data/rbi/finch_api/internal/transport/base_client.rbi +4 -5
  80. data/rbi/finch_api/internal/type/base_page.rbi +1 -1
  81. data/rbi/finch_api/internal/util.rbi +1 -1
  82. data/rbi/finch_api/models/connect/session_new_params.rbi +124 -98
  83. data/rbi/finch_api/models/connect/session_reauthenticate_params.rbi +23 -23
  84. data/rbi/finch_api/models/create_access_token_response.rbi +8 -0
  85. data/rbi/finch_api/models/hris/benefit_contribution.rbi +270 -52
  86. data/rbi/finch_api/models/hris/benefit_create_params.rbi +11 -0
  87. data/rbi/finch_api/models/hris/benefit_list_params.rbi +24 -5
  88. data/rbi/finch_api/models/hris/benefit_list_supported_benefits_params.rbi +24 -5
  89. data/rbi/finch_api/models/hris/benefit_retrieve_params.rbi +24 -5
  90. data/rbi/finch_api/models/hris/benefit_update_params.rbi +15 -1
  91. data/rbi/finch_api/models/hris/benefits/individual_benefit.rbi +515 -20
  92. data/rbi/finch_api/models/hris/benefits/individual_enroll_many_params.rbi +87 -0
  93. data/rbi/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbi +22 -5
  94. data/rbi/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbi +11 -0
  95. data/rbi/finch_api/models/hris/benefits/individual_unenroll_many_params.rbi +11 -0
  96. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbi +11 -0
  97. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbi +22 -5
  98. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbi +22 -5
  99. data/rbi/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbi +15 -1
  100. data/rbi/finch_api/models/hris/company/pay_statement_item_list_params.rbi +11 -0
  101. data/rbi/finch_api/models/hris/company_retrieve_params.rbi +24 -5
  102. data/rbi/finch_api/models/hris/directory_list_individuals_params.rbi +11 -0
  103. data/rbi/finch_api/models/hris/directory_list_params.rbi +11 -0
  104. data/rbi/finch_api/models/hris/document_list_params.rbi +11 -0
  105. data/rbi/finch_api/models/hris/document_response.rbi +14 -29
  106. data/rbi/finch_api/models/hris/document_retreive_params.rbi +24 -5
  107. data/rbi/finch_api/models/hris/employment_retrieve_many_params.rbi +11 -0
  108. data/rbi/finch_api/models/hris/individual_retrieve_many_params.rbi +16 -1
  109. data/rbi/finch_api/models/hris/pay_statement.rbi +9 -34
  110. data/rbi/finch_api/models/hris/pay_statement_retrieve_many_params.rbi +11 -0
  111. data/rbi/finch_api/models/hris/payment_list_params.rbi +11 -0
  112. data/rbi/finch_api/models/hris/supported_benefit.rbi +5 -0
  113. data/rbi/finch_api/models/hris/w42005.rbi +28 -38
  114. data/rbi/finch_api/models/hris/w42020.rbi +37 -43
  115. data/rbi/finch_api/models/introspection.rbi +57 -33
  116. data/rbi/finch_api/models/jobs/automated_list_params.rbi +0 -15
  117. data/rbi/finch_api/models/jobs/automated_retrieve_params.rbi +5 -25
  118. data/rbi/finch_api/models/jobs/manual_retrieve_params.rbi +5 -25
  119. data/rbi/finch_api/models/payroll/pay_group_list_params.rbi +11 -0
  120. data/rbi/finch_api/models/payroll/pay_group_retrieve_params.rbi +24 -5
  121. data/rbi/finch_api/models/provider.rbi +75 -2507
  122. data/rbi/finch_api/models/provider_list_response.rbi +280 -0
  123. data/rbi/finch_api/models/request_forwarding_forward_params.rbi +6 -6
  124. data/rbi/finch_api/models/request_forwarding_forward_response.rbi +93 -60
  125. data/rbi/finch_api/resources/connect/sessions.rbi +22 -14
  126. data/rbi/finch_api/resources/hris/benefits/individuals.rbi +20 -3
  127. data/rbi/finch_api/resources/hris/benefits.rbi +39 -12
  128. data/rbi/finch_api/resources/hris/company/pay_statement_item/rules.rbi +35 -8
  129. data/rbi/finch_api/resources/hris/company/pay_statement_item.rbi +3 -0
  130. data/rbi/finch_api/resources/hris/company.rbi +9 -4
  131. data/rbi/finch_api/resources/hris/directory.rbi +3 -0
  132. data/rbi/finch_api/resources/hris/documents.rbi +6 -0
  133. data/rbi/finch_api/resources/hris/employments.rbi +4 -1
  134. data/rbi/finch_api/resources/hris/individuals.rbi +10 -1
  135. data/rbi/finch_api/resources/hris/pay_statements.rbi +4 -1
  136. data/rbi/finch_api/resources/hris/payments.rbi +3 -0
  137. data/rbi/finch_api/resources/jobs/automated.rbi +1 -14
  138. data/rbi/finch_api/resources/jobs/manual.rbi +1 -9
  139. data/rbi/finch_api/resources/payroll/pay_groups.rbi +15 -2
  140. data/rbi/finch_api/resources/providers.rbi +1 -1
  141. data/rbi/finch_api/resources/request_forwarding.rbi +2 -2
  142. data/sig/finch_api/errors.rbs +7 -0
  143. data/sig/finch_api/file_part.rbs +1 -1
  144. data/sig/finch_api/models/connect/session_new_params.rbs +45 -45
  145. data/sig/finch_api/models/connect/session_reauthenticate_params.rbs +15 -15
  146. data/sig/finch_api/models/create_access_token_response.rbs +5 -0
  147. data/sig/finch_api/models/hris/benefit_contribution.rbs +107 -21
  148. data/sig/finch_api/models/hris/benefit_create_params.rbs +7 -0
  149. data/sig/finch_api/models/hris/benefit_list_params.rbs +14 -3
  150. data/sig/finch_api/models/hris/benefit_list_supported_benefits_params.rbs +14 -3
  151. data/sig/finch_api/models/hris/benefit_retrieve_params.rbs +14 -3
  152. data/sig/finch_api/models/hris/benefit_update_params.rbs +8 -1
  153. data/sig/finch_api/models/hris/benefits/individual_benefit.rbs +201 -8
  154. data/sig/finch_api/models/hris/benefits/individual_enroll_many_params.rbs +30 -1
  155. data/sig/finch_api/models/hris/benefits/individual_enrolled_ids_params.rbs +14 -3
  156. data/sig/finch_api/models/hris/benefits/individual_retrieve_many_benefits_params.rbs +7 -1
  157. data/sig/finch_api/models/hris/benefits/individual_unenroll_many_params.rbs +7 -1
  158. data/sig/finch_api/models/hris/benfit_contribution.rbs +1 -1
  159. data/sig/finch_api/models/hris/company/pay_statement_item/rule_create_params.rbs +7 -0
  160. data/sig/finch_api/models/hris/company/pay_statement_item/rule_delete_params.rbs +14 -3
  161. data/sig/finch_api/models/hris/company/pay_statement_item/rule_list_params.rbs +14 -3
  162. data/sig/finch_api/models/hris/company/pay_statement_item/rule_update_params.rbs +7 -1
  163. data/sig/finch_api/models/hris/company/pay_statement_item_list_params.rbs +7 -0
  164. data/sig/finch_api/models/hris/company_retrieve_params.rbs +14 -3
  165. data/sig/finch_api/models/hris/directory_list_individuals_params.rbs +7 -1
  166. data/sig/finch_api/models/hris/directory_list_params.rbs +7 -1
  167. data/sig/finch_api/models/hris/document_list_params.rbs +7 -0
  168. data/sig/finch_api/models/hris/document_response.rbs +11 -19
  169. data/sig/finch_api/models/hris/document_retreive_params.rbs +14 -3
  170. data/sig/finch_api/models/hris/employment_retrieve_many_params.rbs +8 -1
  171. data/sig/finch_api/models/hris/individual_retrieve_many_params.rbs +7 -0
  172. data/sig/finch_api/models/hris/pay_statement.rbs +12 -12
  173. data/sig/finch_api/models/hris/pay_statement_retrieve_many_params.rbs +8 -1
  174. data/sig/finch_api/models/hris/payment_list_params.rbs +7 -1
  175. data/sig/finch_api/models/hris/supported_benefit.rbs +2 -1
  176. data/sig/finch_api/models/hris/w42005.rbs +23 -37
  177. data/sig/finch_api/models/hris/w42020.rbs +35 -45
  178. data/sig/finch_api/models/introspection.rbs +29 -20
  179. data/sig/finch_api/models/jobs/automated_list_params.rbs +1 -7
  180. data/sig/finch_api/models/jobs/automated_retrieve_params.rbs +3 -13
  181. data/sig/finch_api/models/jobs/manual_retrieve_params.rbs +3 -13
  182. data/sig/finch_api/models/payroll/pay_group_list_params.rbs +11 -1
  183. data/sig/finch_api/models/payroll/pay_group_retrieve_params.rbs +14 -3
  184. data/sig/finch_api/models/provider.rbs +31 -1366
  185. data/sig/finch_api/models/provider_list_response.rbs +128 -0
  186. data/sig/finch_api/models/request_forwarding_forward_params.rbs +8 -8
  187. data/sig/finch_api/models/request_forwarding_forward_response.rbs +40 -30
  188. data/sig/finch_api/resources/connect/sessions.rbs +9 -9
  189. data/sig/finch_api/resources/hris/benefits/individuals.rbs +4 -0
  190. data/sig/finch_api/resources/hris/benefits.rbs +5 -0
  191. data/sig/finch_api/resources/hris/company/pay_statement_item/rules.rbs +4 -0
  192. data/sig/finch_api/resources/hris/company/pay_statement_item.rbs +1 -0
  193. data/sig/finch_api/resources/hris/company.rbs +1 -0
  194. data/sig/finch_api/resources/hris/directory.rbs +1 -0
  195. data/sig/finch_api/resources/hris/documents.rbs +2 -0
  196. data/sig/finch_api/resources/hris/employments.rbs +1 -0
  197. data/sig/finch_api/resources/hris/individuals.rbs +1 -0
  198. data/sig/finch_api/resources/hris/pay_statements.rbs +1 -0
  199. data/sig/finch_api/resources/hris/payments.rbs +1 -0
  200. data/sig/finch_api/resources/jobs/automated.rbs +0 -2
  201. data/sig/finch_api/resources/jobs/manual.rbs +0 -1
  202. data/sig/finch_api/resources/payroll/pay_groups.rbs +2 -0
  203. data/sig/finch_api/resources/providers.rbs +1 -1
  204. data/sig/finch_api/resources/request_forwarding.rbs +2 -2
  205. metadata +5 -2
@@ -6,6 +6,10 @@ module FinchAPI
6
6
  class Company
7
7
  class PayStatementItem
8
8
  class Rules
9
+ # Some parameter documentations has been truncated, see
10
+ # {FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams} for more
11
+ # details.
12
+ #
9
13
  # **Beta:** this endpoint currently serves employers onboarded after March 4th and
10
14
  # historical support will be added soon Custom rules can be created to associate
11
15
  # specific attributes to pay statement items depending on the use case. For
@@ -13,17 +17,19 @@ module FinchAPI
13
17
  # pre-tax 401k. This metadata can be retrieved where pay statement item
14
18
  # information is available.
15
19
  #
16
- # @overload create(attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {})
20
+ # @overload create(entity_ids: nil, attributes: nil, conditions: nil, effective_end_date: nil, effective_start_date: nil, entity_type: nil, request_options: {})
21
+ #
22
+ # @param entity_ids [Array<String>] Query param: The entity IDs to create the rule for.
17
23
  #
18
- # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Specifies the fields to be applied when the condition is met.
24
+ # @param attributes [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Attributes] Body param: Specifies the fields to be applied when the condition is met.
19
25
  #
20
- # @param conditions [Array<FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition>]
26
+ # @param conditions [Array<FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::Condition>] Body param:
21
27
  #
22
- # @param effective_end_date [String, nil] Specifies when the rules should stop applying rules based on the date.
28
+ # @param effective_end_date [String, nil] Body param: Specifies when the rules should stop applying rules based on the dat
23
29
  #
24
- # @param effective_start_date [String, nil] Specifies when the rule should begin applying based on the date.
30
+ # @param effective_start_date [String, nil] Body param: Specifies when the rule should begin applying based on the date.
25
31
  #
26
- # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] The entity type to which the rule is applied.
32
+ # @param entity_type [Symbol, FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams::EntityType] Body param: The entity type to which the rule is applied.
27
33
  #
28
34
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
29
35
  #
@@ -32,10 +38,12 @@ module FinchAPI
32
38
  # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateParams
33
39
  def create(params = {})
34
40
  parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleCreateParams.dump_request(params)
41
+ query_params = [:entity_ids]
35
42
  @client.request(
36
43
  method: :post,
37
44
  path: "employer/pay-statement-item/rule",
38
- body: parsed,
45
+ query: parsed.slice(*query_params),
46
+ body: parsed.except(*query_params),
39
47
  model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleCreateResponse,
40
48
  options: options
41
49
  )
@@ -44,10 +52,14 @@ module FinchAPI
44
52
  # **Beta:** this endpoint currently serves employers onboarded after March 4th and
45
53
  # historical support will be added soon Update a rule for a pay statement item.
46
54
  #
47
- # @overload update(rule_id, optional_property: nil, request_options: {})
55
+ # @overload update(rule_id, entity_ids: nil, optional_property: nil, request_options: {})
56
+ #
57
+ # @param rule_id [String] Path param:
58
+ #
59
+ # @param entity_ids [Array<String>] Query param: The entity IDs to update the rule for.
60
+ #
61
+ # @param optional_property [Object] Body param:
48
62
  #
49
- # @param rule_id [String]
50
- # @param optional_property [Object]
51
63
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
52
64
  #
53
65
  # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse]
@@ -55,10 +67,12 @@ module FinchAPI
55
67
  # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateParams
56
68
  def update(rule_id, params = {})
57
69
  parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleUpdateParams.dump_request(params)
70
+ query_params = [:entity_ids]
58
71
  @client.request(
59
72
  method: :put,
60
73
  path: ["employer/pay-statement-item/rule/%1$s", rule_id],
61
- body: parsed,
74
+ query: parsed.slice(*query_params),
75
+ body: parsed.except(*query_params),
62
76
  model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleUpdateResponse,
63
77
  options: options
64
78
  )
@@ -67,7 +81,9 @@ module FinchAPI
67
81
  # **Beta:** this endpoint currently serves employers onboarded after March 4th and
68
82
  # historical support will be added soon List all rules of a connection account.
69
83
  #
70
- # @overload list(request_options: {})
84
+ # @overload list(entity_ids: nil, request_options: {})
85
+ #
86
+ # @param entity_ids [Array<String>] The entity IDs to retrieve rules for.
71
87
  #
72
88
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
73
89
  #
@@ -75,32 +91,39 @@ module FinchAPI
75
91
  #
76
92
  # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListParams
77
93
  def list(params = {})
94
+ parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleListParams.dump_request(params)
78
95
  @client.request(
79
96
  method: :get,
80
97
  path: "employer/pay-statement-item/rule",
98
+ query: parsed,
81
99
  page: FinchAPI::Internal::ResponsesPage,
82
100
  model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleListResponse,
83
- options: params[:request_options]
101
+ options: options
84
102
  )
85
103
  end
86
104
 
87
105
  # **Beta:** this endpoint currently serves employers onboarded after March 4th and
88
106
  # historical support will be added soon Delete a rule for a pay statement item.
89
107
  #
90
- # @overload delete(rule_id, request_options: {})
108
+ # @overload delete(rule_id, entity_ids: nil, request_options: {})
91
109
  #
92
110
  # @param rule_id [String]
111
+ #
112
+ # @param entity_ids [Array<String>] The entity IDs to delete the rule for.
113
+ #
93
114
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
94
115
  #
95
116
  # @return [FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse]
96
117
  #
97
118
  # @see FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteParams
98
119
  def delete(rule_id, params = {})
120
+ parsed, options = FinchAPI::HRIS::Company::PayStatementItem::RuleDeleteParams.dump_request(params)
99
121
  @client.request(
100
122
  method: :delete,
101
123
  path: ["employer/pay-statement-item/rule/%1$s", rule_id],
124
+ query: parsed,
102
125
  model: FinchAPI::Models::HRIS::Company::PayStatementItem::RuleDeleteResponse,
103
- options: params[:request_options]
126
+ options: options
104
127
  )
105
128
  end
106
129
 
@@ -15,12 +15,14 @@ module FinchAPI
15
15
  # historical support will be added soon Retrieve a list of detailed pay statement
16
16
  # items for the access token's connection account.
17
17
  #
18
- # @overload list(categories: nil, end_date: nil, name: nil, start_date: nil, type: nil, request_options: {})
18
+ # @overload list(categories: nil, end_date: nil, entity_ids: nil, name: nil, start_date: nil, type: nil, request_options: {})
19
19
  #
20
20
  # @param categories [Array<Symbol, FinchAPI::Models::HRIS::Company::PayStatementItemListParams::Category>] Comma-delimited list of pay statement item categories to filter on. If empty, de
21
21
  #
22
22
  # @param end_date [Date] The end date to retrieve pay statement items by via their last seen pay date in
23
23
  #
24
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
25
+ #
24
26
  # @param name [String] Case-insensitive partial match search by pay statement item name.
25
27
  #
26
28
  # @param start_date [Date] The start date to retrieve pay statement items by via their last seen pay date (
@@ -9,7 +9,9 @@ module FinchAPI
9
9
 
10
10
  # Read basic company data
11
11
  #
12
- # @overload retrieve(request_options: {})
12
+ # @overload retrieve(entity_ids: nil, request_options: {})
13
+ #
14
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
13
15
  #
14
16
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
15
17
  #
@@ -17,11 +19,13 @@ module FinchAPI
17
19
  #
18
20
  # @see FinchAPI::Models::HRIS::CompanyRetrieveParams
19
21
  def retrieve(params = {})
22
+ parsed, options = FinchAPI::HRIS::CompanyRetrieveParams.dump_request(params)
20
23
  @client.request(
21
24
  method: :get,
22
25
  path: "employer/company",
26
+ query: parsed,
23
27
  model: FinchAPI::HRIS::HRISCompany,
24
- options: params[:request_options]
28
+ options: options
25
29
  )
26
30
  end
27
31
 
@@ -6,7 +6,9 @@ module FinchAPI
6
6
  class Directory
7
7
  # Read company directory and organization structure
8
8
  #
9
- # @overload list(limit: nil, offset: nil, request_options: {})
9
+ # @overload list(entity_ids: nil, limit: nil, offset: nil, request_options: {})
10
+ #
11
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
10
12
  #
11
13
  # @param limit [Integer] Number of employees to return (defaults to all)
12
14
  #
@@ -10,7 +10,9 @@ module FinchAPI
10
10
  # **Beta:** This endpoint is in beta and may change. Retrieve a list of
11
11
  # company-wide documents.
12
12
  #
13
- # @overload list(individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {})
13
+ # @overload list(entity_ids: nil, individual_ids: nil, limit: nil, offset: nil, types: nil, request_options: {})
14
+ #
15
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
14
16
  #
15
17
  # @param individual_ids [Array<String>] Comma-delimited list of stable Finch uuids for each individual. If empty, defaul
16
18
  #
@@ -39,21 +41,25 @@ module FinchAPI
39
41
  # **Beta:** This endpoint is in beta and may change. Retrieve details of a
40
42
  # specific document by its ID.
41
43
  #
42
- # @overload retreive(document_id, request_options: {})
44
+ # @overload retreive(document_id, entity_ids: nil, request_options: {})
43
45
  #
44
46
  # @param document_id [String] The unique identifier of the document.
45
47
  #
48
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
49
+ #
46
50
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
47
51
  #
48
52
  # @return [FinchAPI::Models::HRIS::W42020, FinchAPI::Models::HRIS::W42005]
49
53
  #
50
54
  # @see FinchAPI::Models::HRIS::DocumentRetreiveParams
51
55
  def retreive(document_id, params = {})
56
+ parsed, options = FinchAPI::HRIS::DocumentRetreiveParams.dump_request(params)
52
57
  @client.request(
53
58
  method: :get,
54
59
  path: ["employer/documents/%1$s", document_id],
60
+ query: parsed,
55
61
  model: FinchAPI::Models::HRIS::DocumentRetreiveResponse,
56
- options: params[:request_options]
62
+ options: options
57
63
  )
58
64
  end
59
65
 
@@ -6,9 +6,11 @@ module FinchAPI
6
6
  class Employments
7
7
  # Read individual employment and income data
8
8
  #
9
- # @overload retrieve_many(requests:, request_options: {})
9
+ # @overload retrieve_many(requests:, entity_ids: nil, request_options: {})
10
10
  #
11
- # @param requests [Array<FinchAPI::Models::HRIS::EmploymentRetrieveManyParams::Request>] The array of batch requests.
11
+ # @param requests [Array<FinchAPI::Models::HRIS::EmploymentRetrieveManyParams::Request>] Body param: The array of batch requests.
12
+ #
13
+ # @param entity_ids [Array<String>] Query param: The entity IDs to specify which entities' data to access.
12
14
  #
13
15
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
14
16
  #
@@ -17,10 +19,12 @@ module FinchAPI
17
19
  # @see FinchAPI::Models::HRIS::EmploymentRetrieveManyParams
18
20
  def retrieve_many(params)
19
21
  parsed, options = FinchAPI::HRIS::EmploymentRetrieveManyParams.dump_request(params)
22
+ query_params = [:entity_ids]
20
23
  @client.request(
21
24
  method: :post,
22
25
  path: "employer/employment",
23
- body: parsed,
26
+ query: parsed.slice(*query_params),
27
+ body: parsed.except(*query_params),
24
28
  page: FinchAPI::Internal::ResponsesPage,
25
29
  model: FinchAPI::HRIS::EmploymentDataResponse,
26
30
  options: options
@@ -6,10 +6,14 @@ module FinchAPI
6
6
  class Individuals
7
7
  # Read individual data, excluding income and employment data
8
8
  #
9
- # @overload retrieve_many(options: nil, requests: nil, request_options: {})
9
+ # @overload retrieve_many(entity_ids: nil, options: nil, requests: nil, request_options: {})
10
+ #
11
+ # @param entity_ids [Array<String>] Query param: The entity IDs to specify which entities' data to access.
12
+ #
13
+ # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil] Body param:
14
+ #
15
+ # @param requests [Array<FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Request>] Body param:
10
16
  #
11
- # @param options [FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Options, nil]
12
- # @param requests [Array<FinchAPI::Models::HRIS::IndividualRetrieveManyParams::Request>]
13
17
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
14
18
  #
15
19
  # @return [FinchAPI::Internal::ResponsesPage<FinchAPI::Models::HRIS::IndividualResponse>]
@@ -17,10 +21,12 @@ module FinchAPI
17
21
  # @see FinchAPI::Models::HRIS::IndividualRetrieveManyParams
18
22
  def retrieve_many(params = {})
19
23
  parsed, options = FinchAPI::HRIS::IndividualRetrieveManyParams.dump_request(params)
24
+ query_params = [:entity_ids]
20
25
  @client.request(
21
26
  method: :post,
22
27
  path: "employer/individual",
23
- body: parsed,
28
+ query: parsed.slice(*query_params),
29
+ body: parsed.except(*query_params),
24
30
  page: FinchAPI::Internal::ResponsesPage,
25
31
  model: FinchAPI::HRIS::IndividualResponse,
26
32
  options: options
@@ -9,9 +9,11 @@ module FinchAPI
9
9
  # Deduction and contribution types are supported by the payroll systems that
10
10
  # supports Benefits.
11
11
  #
12
- # @overload retrieve_many(requests:, request_options: {})
12
+ # @overload retrieve_many(requests:, entity_ids: nil, request_options: {})
13
13
  #
14
- # @param requests [Array<FinchAPI::Models::HRIS::PayStatementRetrieveManyParams::Request>] The array of batch requests.
14
+ # @param requests [Array<FinchAPI::Models::HRIS::PayStatementRetrieveManyParams::Request>] Body param: The array of batch requests.
15
+ #
16
+ # @param entity_ids [Array<String>] Query param: The entity IDs to specify which entities' data to access.
15
17
  #
16
18
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
17
19
  #
@@ -20,10 +22,12 @@ module FinchAPI
20
22
  # @see FinchAPI::Models::HRIS::PayStatementRetrieveManyParams
21
23
  def retrieve_many(params)
22
24
  parsed, options = FinchAPI::HRIS::PayStatementRetrieveManyParams.dump_request(params)
25
+ query_params = [:entity_ids]
23
26
  @client.request(
24
27
  method: :post,
25
28
  path: "employer/pay-statement",
26
- body: parsed,
29
+ query: parsed.slice(*query_params),
30
+ body: parsed.except(*query_params),
27
31
  page: FinchAPI::Internal::ResponsesPage,
28
32
  model: FinchAPI::HRIS::PayStatementResponse,
29
33
  options: options
@@ -9,12 +9,14 @@ module FinchAPI
9
9
  #
10
10
  # Read payroll and contractor related payments by the company.
11
11
  #
12
- # @overload list(end_date:, start_date:, request_options: {})
12
+ # @overload list(end_date:, start_date:, entity_ids: nil, request_options: {})
13
13
  #
14
14
  # @param end_date [Date] The end date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` forma
15
15
  #
16
16
  # @param start_date [Date] The start date to retrieve payments by a company (inclusive) in `YYYY-MM-DD` for
17
17
  #
18
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
19
+ #
18
20
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
19
21
  #
20
22
  # @return [FinchAPI::Internal::SinglePage<FinchAPI::Models::HRIS::Payment>]
@@ -41,43 +41,30 @@ module FinchAPI
41
41
  )
42
42
  end
43
43
 
44
- # Some parameter documentations has been truncated, see
45
- # {FinchAPI::Models::Jobs::AutomatedRetrieveParams} for more details.
46
- #
47
44
  # Get an automated job by `job_id`.
48
45
  #
49
- # @overload retrieve(job_id, entity_id: nil, request_options: {})
46
+ # @overload retrieve(job_id, request_options: {})
50
47
  #
51
48
  # @param job_id [String]
52
- #
53
- # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh
54
- #
55
49
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
56
50
  #
57
51
  # @return [FinchAPI::Models::Jobs::AutomatedAsyncJob]
58
52
  #
59
53
  # @see FinchAPI::Models::Jobs::AutomatedRetrieveParams
60
54
  def retrieve(job_id, params = {})
61
- parsed, options = FinchAPI::Jobs::AutomatedRetrieveParams.dump_request(params)
62
55
  @client.request(
63
56
  method: :get,
64
57
  path: ["jobs/automated/%1$s", job_id],
65
- query: parsed,
66
58
  model: FinchAPI::Jobs::AutomatedAsyncJob,
67
- options: options
59
+ options: params[:request_options]
68
60
  )
69
61
  end
70
62
 
71
- # Some parameter documentations has been truncated, see
72
- # {FinchAPI::Models::Jobs::AutomatedListParams} for more details.
73
- #
74
63
  # Get all automated jobs. Automated jobs are completed by a machine. By default,
75
64
  # jobs are sorted in descending order by submission time. For scheduled jobs such
76
65
  # as data syncs, only the next scheduled job is shown.
77
66
  #
78
- # @overload list(entity_id: nil, limit: nil, offset: nil, request_options: {})
79
- #
80
- # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh
67
+ # @overload list(limit: nil, offset: nil, request_options: {})
81
68
  #
82
69
  # @param limit [Integer] Number of items to return
83
70
  #
@@ -4,31 +4,23 @@ module FinchAPI
4
4
  module Resources
5
5
  class Jobs
6
6
  class Manual
7
- # Some parameter documentations has been truncated, see
8
- # {FinchAPI::Models::Jobs::ManualRetrieveParams} for more details.
9
- #
10
7
  # Get a manual job by `job_id`. Manual jobs are completed by a human and include
11
8
  # Assisted Benefits jobs.
12
9
  #
13
- # @overload retrieve(job_id, entity_id: nil, request_options: {})
10
+ # @overload retrieve(job_id, request_options: {})
14
11
  #
15
12
  # @param job_id [String]
16
- #
17
- # @param entity_id [String] The entity ID to use when authenticating with a multi-account token. Required wh
18
- #
19
13
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
20
14
  #
21
15
  # @return [FinchAPI::Models::Jobs::ManualAsyncJob]
22
16
  #
23
17
  # @see FinchAPI::Models::Jobs::ManualRetrieveParams
24
18
  def retrieve(job_id, params = {})
25
- parsed, options = FinchAPI::Jobs::ManualRetrieveParams.dump_request(params)
26
19
  @client.request(
27
20
  method: :get,
28
21
  path: ["jobs/manual/%1$s", job_id],
29
- query: parsed,
30
22
  model: FinchAPI::Jobs::ManualAsyncJob,
31
- options: options
23
+ options: params[:request_options]
32
24
  )
33
25
  end
34
26
 
@@ -6,29 +6,38 @@ module FinchAPI
6
6
  class PayGroups
7
7
  # Read information from a single pay group
8
8
  #
9
- # @overload retrieve(pay_group_id, request_options: {})
9
+ # @overload retrieve(pay_group_id, entity_ids: nil, request_options: {})
10
10
  #
11
11
  # @param pay_group_id [String]
12
+ #
13
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
14
+ #
12
15
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
13
16
  #
14
17
  # @return [FinchAPI::Models::Payroll::PayGroupRetrieveResponse]
15
18
  #
16
19
  # @see FinchAPI::Models::Payroll::PayGroupRetrieveParams
17
20
  def retrieve(pay_group_id, params = {})
21
+ parsed, options = FinchAPI::Payroll::PayGroupRetrieveParams.dump_request(params)
18
22
  @client.request(
19
23
  method: :get,
20
24
  path: ["employer/pay-groups/%1$s", pay_group_id],
25
+ query: parsed,
21
26
  model: FinchAPI::Models::Payroll::PayGroupRetrieveResponse,
22
- options: params[:request_options]
27
+ options: options
23
28
  )
24
29
  end
25
30
 
26
31
  # Read company pay groups and frequencies
27
32
  #
28
- # @overload list(individual_id: nil, pay_frequencies: nil, request_options: {})
33
+ # @overload list(entity_ids: nil, individual_id: nil, pay_frequencies: nil, request_options: {})
34
+ #
35
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
29
36
  #
30
37
  # @param individual_id [String]
38
+ #
31
39
  # @param pay_frequencies [Array<String>]
40
+ #
32
41
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
33
42
  #
34
43
  # @return [FinchAPI::Internal::SinglePage<FinchAPI::Models::Payroll::PayGroupListResponse>]
@@ -9,7 +9,7 @@ module FinchAPI
9
9
  #
10
10
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
11
11
  #
12
- # @return [FinchAPI::Internal::SinglePage<FinchAPI::Models::Provider>]
12
+ # @return [FinchAPI::Internal::SinglePage<FinchAPI::Models::ProviderListResponse>]
13
13
  #
14
14
  # @see FinchAPI::Models::ProviderListParams
15
15
  def list(params = {})
@@ -17,7 +17,7 @@ module FinchAPI
17
17
  method: :get,
18
18
  path: "providers",
19
19
  page: FinchAPI::Internal::SinglePage,
20
- model: FinchAPI::Provider,
20
+ model: FinchAPI::Models::ProviderListResponse,
21
21
  options: params[:request_options]
22
22
  )
23
23
  end
@@ -19,9 +19,9 @@ module FinchAPI
19
19
  #
20
20
  # @param data [String, nil] The body for the forwarded request. This value must be specified as either a str
21
21
  #
22
- # @param headers [Object, nil] The HTTP headers to include on the forwarded request. This value must be specifi
22
+ # @param headers [Hash{Symbol=>Object, nil}, nil] The HTTP headers to include on the forwarded request. This value must be specifi
23
23
  #
24
- # @param params [Object, nil] The query parameters for the forwarded request. This value must be specified as
24
+ # @param params [Hash{Symbol=>Object, nil}, nil] The query parameters for the forwarded request. This value must be specified as
25
25
  #
26
26
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
27
27
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FinchAPI
4
- VERSION = "0.1.0.pre.alpha.30"
4
+ VERSION = "0.1.0.pre.alpha.31"
5
5
  end
data/lib/finch_api.rb CHANGED
@@ -154,6 +154,7 @@ require_relative "finch_api/models/payroll/pay_group_retrieve_response"
154
154
  require_relative "finch_api/models/pay_statement_event"
155
155
  require_relative "finch_api/models/provider"
156
156
  require_relative "finch_api/models/provider_list_params"
157
+ require_relative "finch_api/models/provider_list_response"
157
158
  require_relative "finch_api/models/request_forwarding_forward_params"
158
159
  require_relative "finch_api/models/request_forwarding_forward_response"
159
160
  require_relative "finch_api/models/sandbox/company_update_params"
@@ -33,6 +33,9 @@ module FinchAPI
33
33
  sig { returns(T.nilable(Integer)) }
34
34
  attr_accessor :status
35
35
 
36
+ sig { returns(T.nilable(T::Hash[String, String])) }
37
+ attr_accessor :headers
38
+
36
39
  sig { returns(T.nilable(T.anything)) }
37
40
  attr_accessor :body
38
41
 
@@ -41,6 +44,7 @@ module FinchAPI
41
44
  params(
42
45
  url: URI::Generic,
43
46
  status: T.nilable(Integer),
47
+ headers: T.nilable(T::Hash[String, String]),
44
48
  body: T.nilable(Object),
45
49
  request: NilClass,
46
50
  response: NilClass,
@@ -50,6 +54,7 @@ module FinchAPI
50
54
  def self.new(
51
55
  url:,
52
56
  status: nil,
57
+ headers: nil,
53
58
  body: nil,
54
59
  request: nil,
55
60
  response: nil,
@@ -70,6 +75,7 @@ module FinchAPI
70
75
  params(
71
76
  url: URI::Generic,
72
77
  status: NilClass,
78
+ headers: T.nilable(T::Hash[String, String]),
73
79
  body: NilClass,
74
80
  request: NilClass,
75
81
  response: NilClass,
@@ -79,6 +85,7 @@ module FinchAPI
79
85
  def self.new(
80
86
  url:,
81
87
  status: nil,
88
+ headers: nil,
82
89
  body: nil,
83
90
  request: nil,
84
91
  response: nil,
@@ -93,6 +100,7 @@ module FinchAPI
93
100
  params(
94
101
  url: URI::Generic,
95
102
  status: NilClass,
103
+ headers: T.nilable(T::Hash[String, String]),
96
104
  body: NilClass,
97
105
  request: NilClass,
98
106
  response: NilClass,
@@ -102,6 +110,7 @@ module FinchAPI
102
110
  def self.new(
103
111
  url:,
104
112
  status: nil,
113
+ headers: nil,
105
114
  body: nil,
106
115
  request: nil,
107
116
  response: nil,
@@ -116,13 +125,22 @@ module FinchAPI
116
125
  params(
117
126
  url: URI::Generic,
118
127
  status: Integer,
128
+ headers: T.nilable(T::Hash[String, String]),
119
129
  body: T.nilable(Object),
120
130
  request: NilClass,
121
131
  response: NilClass,
122
132
  message: T.nilable(String)
123
133
  ).returns(T.attached_class)
124
134
  end
125
- def self.for(url:, status:, body:, request:, response:, message: nil)
135
+ def self.for(
136
+ url:,
137
+ status:,
138
+ headers:,
139
+ body:,
140
+ request:,
141
+ response:,
142
+ message: nil
143
+ )
126
144
  end
127
145
 
128
146
  sig { returns(Integer) }
@@ -133,13 +151,22 @@ module FinchAPI
133
151
  params(
134
152
  url: URI::Generic,
135
153
  status: Integer,
154
+ headers: T.nilable(T::Hash[String, String]),
136
155
  body: T.nilable(Object),
137
156
  request: NilClass,
138
157
  response: NilClass,
139
158
  message: T.nilable(String)
140
159
  ).returns(T.attached_class)
141
160
  end
142
- def self.new(url:, status:, body:, request:, response:, message: nil)
161
+ def self.new(
162
+ url:,
163
+ status:,
164
+ headers:,
165
+ body:,
166
+ request:,
167
+ response:,
168
+ message: nil
169
+ )
143
170
  end
144
171
  end
145
172
 
@@ -27,7 +27,7 @@ module FinchAPI
27
27
  sig do
28
28
  params(
29
29
  content: T.any(Pathname, StringIO, IO, String),
30
- filename: T.nilable(String),
30
+ filename: T.nilable(T.any(Pathname, String)),
31
31
  content_type: T.nilable(String)
32
32
  ).returns(T.attached_class)
33
33
  end
@@ -84,10 +84,9 @@ module FinchAPI
84
84
 
85
85
  # @api private
86
86
  sig do
87
- params(
88
- status: Integer,
89
- headers: T.any(T::Hash[String, String], Net::HTTPHeader)
90
- ).returns(T::Boolean)
87
+ params(status: Integer, headers: T::Hash[String, String]).returns(
88
+ T::Boolean
89
+ )
91
90
  end
92
91
  def should_retry?(status, headers:)
93
92
  end
@@ -97,7 +96,7 @@ module FinchAPI
97
96
  params(
98
97
  request: FinchAPI::Internal::Transport::BaseClient::RequestInput,
99
98
  status: Integer,
100
- response_headers: T.any(T::Hash[String, String], Net::HTTPHeader)
99
+ response_headers: T::Hash[String, String]
101
100
  ).returns(FinchAPI::Internal::Transport::BaseClient::RequestInput)
102
101
  end
103
102
  def follow_redirect(request, status:, response_headers:)
@@ -30,7 +30,7 @@ module FinchAPI
30
30
  params(
31
31
  client: FinchAPI::Internal::Transport::BaseClient,
32
32
  req: FinchAPI::Internal::Transport::BaseClient::RequestComponents,
33
- headers: T.any(T::Hash[String, String], Net::HTTPHeader),
33
+ headers: T::Hash[String, String],
34
34
  page_data: T.anything
35
35
  ).void
36
36
  end