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
@@ -0,0 +1,143 @@
1
+ # frozen_string_literal: true
2
+
3
+ module FinchAPI
4
+ module Models
5
+ # @see FinchAPI::Resources::Providers#list
6
+ class ProviderListResponse < FinchAPI::Internal::Type::BaseModel
7
+ # @!attribute id
8
+ # The id of the payroll provider used in Connect.
9
+ #
10
+ # @return [String]
11
+ required :id, String
12
+
13
+ # @!attribute display_name
14
+ # The display name of the payroll provider.
15
+ #
16
+ # @return [String]
17
+ required :display_name, String
18
+
19
+ # @!attribute products
20
+ # The list of Finch products supported on this payroll provider.
21
+ #
22
+ # @return [Array<String>]
23
+ required :products, FinchAPI::Internal::Type::ArrayOf[String]
24
+
25
+ # @!attribute authentication_methods
26
+ # The authentication methods supported by the provider.
27
+ #
28
+ # @return [Array<FinchAPI::Models::ProviderListResponse::AuthenticationMethod>, nil]
29
+ optional :authentication_methods,
30
+ -> { FinchAPI::Internal::Type::ArrayOf[FinchAPI::Models::ProviderListResponse::AuthenticationMethod] }
31
+
32
+ # @!attribute beta
33
+ # `true` if the integration is in a beta state, `false` otherwise
34
+ #
35
+ # @return [Boolean, nil]
36
+ optional :beta, FinchAPI::Internal::Type::Boolean
37
+
38
+ # @!attribute icon
39
+ # The url to the official icon of the payroll provider.
40
+ #
41
+ # @return [String, nil]
42
+ optional :icon, String
43
+
44
+ # @!attribute logo
45
+ # The url to the official logo of the payroll provider.
46
+ #
47
+ # @return [String, nil]
48
+ optional :logo, String
49
+
50
+ # @!attribute manual
51
+ # @deprecated
52
+ #
53
+ # [DEPRECATED] Whether the Finch integration with this provider uses the Assisted
54
+ # Connect Flow by default. This field is now deprecated. Please check for a `type`
55
+ # of `assisted` in the `authentication_methods` field instead.
56
+ #
57
+ # @return [Boolean, nil]
58
+ optional :manual, FinchAPI::Internal::Type::Boolean
59
+
60
+ # @!attribute mfa_required
61
+ # whether MFA is required for the provider.
62
+ #
63
+ # @return [Boolean, nil]
64
+ optional :mfa_required, FinchAPI::Internal::Type::Boolean
65
+
66
+ # @!attribute primary_color
67
+ # The hex code for the primary color of the payroll provider.
68
+ #
69
+ # @return [String, nil]
70
+ optional :primary_color, String
71
+
72
+ # @!method initialize(id:, display_name:, products:, authentication_methods: nil, beta: nil, icon: nil, logo: nil, manual: nil, mfa_required: nil, primary_color: nil)
73
+ # Some parameter documentations has been truncated, see
74
+ # {FinchAPI::Models::ProviderListResponse} for more details.
75
+ #
76
+ # @param id [String] The id of the payroll provider used in Connect.
77
+ #
78
+ # @param display_name [String] The display name of the payroll provider.
79
+ #
80
+ # @param products [Array<String>] The list of Finch products supported on this payroll provider.
81
+ #
82
+ # @param authentication_methods [Array<FinchAPI::Models::ProviderListResponse::AuthenticationMethod>] The authentication methods supported by the provider.
83
+ #
84
+ # @param beta [Boolean] `true` if the integration is in a beta state, `false` otherwise
85
+ #
86
+ # @param icon [String] The url to the official icon of the payroll provider.
87
+ #
88
+ # @param logo [String] The url to the official logo of the payroll provider.
89
+ #
90
+ # @param manual [Boolean] [DEPRECATED] Whether the Finch integration with this provider uses the Assisted
91
+ #
92
+ # @param mfa_required [Boolean] whether MFA is required for the provider.
93
+ #
94
+ # @param primary_color [String] The hex code for the primary color of the payroll provider.
95
+
96
+ class AuthenticationMethod < FinchAPI::Internal::Type::BaseModel
97
+ # @!attribute type
98
+ # The type of authentication method
99
+ #
100
+ # @return [Symbol, FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type]
101
+ required :type, enum: -> { FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type }
102
+
103
+ # @!attribute benefits_support
104
+ # The supported benefit types and their configurations
105
+ #
106
+ # @return [Hash{Symbol=>Object, nil}, nil]
107
+ optional :benefits_support,
108
+ FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true]
109
+
110
+ # @!attribute supported_fields
111
+ # The supported fields for each Finch product
112
+ #
113
+ # @return [Hash{Symbol=>Object, nil}, nil]
114
+ optional :supported_fields,
115
+ FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true]
116
+
117
+ # @!method initialize(type:, benefits_support: nil, supported_fields: nil)
118
+ # @param type [Symbol, FinchAPI::Models::ProviderListResponse::AuthenticationMethod::Type] The type of authentication method
119
+ #
120
+ # @param benefits_support [Hash{Symbol=>Object, nil}] The supported benefit types and their configurations
121
+ #
122
+ # @param supported_fields [Hash{Symbol=>Object, nil}] The supported fields for each Finch product
123
+
124
+ # The type of authentication method
125
+ #
126
+ # @see FinchAPI::Models::ProviderListResponse::AuthenticationMethod#type
127
+ module Type
128
+ extend FinchAPI::Internal::Type::Enum
129
+
130
+ ASSISTED = :assisted
131
+ CREDENTIAL = :credential
132
+ API_TOKEN = :api_token
133
+ API_CREDENTIAL = :api_credential
134
+ OAUTH = :oauth
135
+ API = :api
136
+
137
+ # @!method self.values
138
+ # @return [Array<Symbol>]
139
+ end
140
+ end
141
+ end
142
+ end
143
+ end
@@ -34,15 +34,19 @@ module FinchAPI
34
34
  # specified as an object of key-value pairs. Example:
35
35
  # `{"Content-Type": "application/xml", "X-API-Version": "v1" }`
36
36
  #
37
- # @return [Object, nil]
38
- optional :headers, FinchAPI::Internal::Type::Unknown, nil?: true
37
+ # @return [Hash{Symbol=>Object, nil}, nil]
38
+ optional :headers,
39
+ FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true],
40
+ nil?: true
39
41
 
40
42
  # @!attribute params
41
43
  # The query parameters for the forwarded request. This value must be specified as
42
44
  # a valid JSON object rather than a query string.
43
45
  #
44
- # @return [Object, nil]
45
- optional :params, FinchAPI::Internal::Type::Unknown, nil?: true
46
+ # @return [Hash{Symbol=>Object, nil}, nil]
47
+ optional :params,
48
+ FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true],
49
+ nil?: true
46
50
 
47
51
  # @!method initialize(method_:, route:, data: nil, headers: nil, params: nil, request_options: {})
48
52
  # Some parameter documentations has been truncated, see
@@ -54,9 +58,9 @@ module FinchAPI
54
58
  #
55
59
  # @param data [String, nil] The body for the forwarded request. This value must be specified as either a str
56
60
  #
57
- # @param headers [Object, nil] The HTTP headers to include on the forwarded request. This value must be specifi
61
+ # @param headers [Hash{Symbol=>Object, nil}, nil] The HTTP headers to include on the forwarded request. This value must be specifi
58
62
  #
59
- # @param params [Object, nil] The query parameters for the forwarded request. This value must be specified as
63
+ # @param params [Hash{Symbol=>Object, nil}, nil] The query parameters for the forwarded request. This value must be specified as
60
64
  #
61
65
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}]
62
66
  end
@@ -4,21 +4,6 @@ module FinchAPI
4
4
  module Models
5
5
  # @see FinchAPI::Resources::RequestForwarding#forward
6
6
  class RequestForwardingForwardResponse < FinchAPI::Internal::Type::BaseModel
7
- # @!attribute data
8
- # A string representation of the HTTP response body of the forwarded request's
9
- # response received from the underlying integration's API. This field may be null
10
- # in the case where the upstream system's response is empty.
11
- #
12
- # @return [String, nil]
13
- required :data, String, nil?: true
14
-
15
- # @!attribute headers
16
- # The HTTP headers of the forwarded request's response, exactly as received from
17
- # the underlying integration's API.
18
- #
19
- # @return [Object, nil]
20
- required :headers, FinchAPI::Internal::Type::Unknown, nil?: true
21
-
22
7
  # @!attribute request
23
8
  # An object containing details of your original forwarded request, for your ease
24
9
  # of reference.
@@ -33,35 +18,37 @@ module FinchAPI
33
18
  # @return [Integer]
34
19
  required :status_code, Integer, api_name: :statusCode
35
20
 
36
- # @!method initialize(data:, headers:, request:, status_code:)
37
- # Some parameter documentations has been truncated, see
38
- # {FinchAPI::Models::RequestForwardingForwardResponse} for more details.
21
+ # @!attribute data
22
+ # A string representation of the HTTP response body of the forwarded request's
23
+ # response received from the underlying integration's API. This field may be null
24
+ # in the case where the upstream system's response is empty.
39
25
  #
40
- # @param data [String, nil] A string representation of the HTTP response body of the forwarded request's res
26
+ # @return [String, nil]
27
+ optional :data, String, nil?: true
28
+
29
+ # @!attribute headers
30
+ # The HTTP headers of the forwarded request's response, exactly as received from
31
+ # the underlying integration's API.
41
32
  #
42
- # @param headers [Object, nil] The HTTP headers of the forwarded request's response, exactly as received from t
33
+ # @return [Hash{Symbol=>Object, nil}, nil]
34
+ optional :headers,
35
+ FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true],
36
+ nil?: true
37
+
38
+ # @!method initialize(request:, status_code:, data: nil, headers: nil)
39
+ # Some parameter documentations has been truncated, see
40
+ # {FinchAPI::Models::RequestForwardingForwardResponse} for more details.
43
41
  #
44
42
  # @param request [FinchAPI::Models::RequestForwardingForwardResponse::Request] An object containing details of your original forwarded request, for your ease o
45
43
  #
46
44
  # @param status_code [Integer] The HTTP status code of the forwarded request's response, exactly received from
45
+ #
46
+ # @param data [String, nil] A string representation of the HTTP response body of the forwarded request's res
47
+ #
48
+ # @param headers [Hash{Symbol=>Object, nil}, nil] The HTTP headers of the forwarded request's response, exactly as received from t
47
49
 
48
50
  # @see FinchAPI::Models::RequestForwardingForwardResponse#request
49
51
  class Request < FinchAPI::Internal::Type::BaseModel
50
- # @!attribute data
51
- # The body that was specified for the forwarded request. If a value was not
52
- # specified in the original request, this value will be returned as null ;
53
- # otherwise, this value will always be returned as a string.
54
- #
55
- # @return [String, nil]
56
- required :data, String, nil?: true
57
-
58
- # @!attribute headers
59
- # The specified HTTP headers that were included in the forwarded request. If no
60
- # headers were specified, this will be returned as `null`.
61
- #
62
- # @return [Object, nil]
63
- required :headers, FinchAPI::Internal::Type::Unknown, nil?: true
64
-
65
52
  # @!attribute method_
66
53
  # The HTTP method that was specified for the forwarded request. Valid values
67
54
  # include: `GET` , `POST` , `PUT` , `DELETE` , and `PATCH`.
@@ -69,35 +56,69 @@ module FinchAPI
69
56
  # @return [String]
70
57
  required :method_, String, api_name: :method
71
58
 
72
- # @!attribute params
73
- # The query parameters that were included in the forwarded request. If no query
74
- # parameters were specified, this will be returned as `null`.
75
- #
76
- # @return [Object, nil]
77
- required :params, FinchAPI::Internal::Type::Unknown, nil?: true
78
-
79
59
  # @!attribute route
80
60
  # The URL route path that was specified for the forwarded request.
81
61
  #
82
62
  # @return [String]
83
63
  required :route, String
84
64
 
85
- # @!method initialize(data:, headers:, method_:, params:, route:)
65
+ # @!attribute data
66
+ # The body that was specified for the forwarded request.
67
+ #
68
+ # @return [String, Hash{Symbol=>Object, nil}, nil]
69
+ optional :data,
70
+ union: -> { FinchAPI::Models::RequestForwardingForwardResponse::Request::Data },
71
+ nil?: true
72
+
73
+ # @!attribute headers
74
+ # The HTTP headers that were specified for the forwarded request.
75
+ #
76
+ # @return [Hash{Symbol=>Object, nil}, nil]
77
+ optional :headers,
78
+ FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true],
79
+ nil?: true
80
+
81
+ # @!attribute params
82
+ # The query parameters that were specified for the forwarded request.
83
+ #
84
+ # @return [Hash{Symbol=>Object, nil}, nil]
85
+ optional :params,
86
+ FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true],
87
+ nil?: true
88
+
89
+ # @!method initialize(method_:, route:, data: nil, headers: nil, params: nil)
86
90
  # Some parameter documentations has been truncated, see
87
91
  # {FinchAPI::Models::RequestForwardingForwardResponse::Request} for more details.
88
92
  #
89
93
  # An object containing details of your original forwarded request, for your ease
90
94
  # of reference.
91
95
  #
92
- # @param data [String, nil] The body that was specified for the forwarded request. If a value was not specif
96
+ # @param method_ [String] The HTTP method that was specified for the forwarded request. Valid values inclu
93
97
  #
94
- # @param headers [Object, nil] The specified HTTP headers that were included in the forwarded request. If no he
98
+ # @param route [String] The URL route path that was specified for the forwarded request.
95
99
  #
96
- # @param method_ [String] The HTTP method that was specified for the forwarded request. Valid values inclu
100
+ # @param data [String, Hash{Symbol=>Object, nil}, nil] The body that was specified for the forwarded request.
97
101
  #
98
- # @param params [Object, nil] The query parameters that were included in the forwarded request. If no query pa
102
+ # @param headers [Hash{Symbol=>Object, nil}, nil] The HTTP headers that were specified for the forwarded request.
99
103
  #
100
- # @param route [String] The URL route path that was specified for the forwarded request.
104
+ # @param params [Hash{Symbol=>Object, nil}, nil] The query parameters that were specified for the forwarded request.
105
+
106
+ # The body that was specified for the forwarded request.
107
+ #
108
+ # @see FinchAPI::Models::RequestForwardingForwardResponse::Request#data
109
+ module Data
110
+ extend FinchAPI::Internal::Type::Union
111
+
112
+ variant String
113
+
114
+ variant -> { FinchAPI::Models::RequestForwardingForwardResponse::Request::Data::UnionMember1Map }
115
+
116
+ # @!method self.variants
117
+ # @return [Array(String, Hash{Symbol=>Object, nil})]
118
+
119
+ # @type [FinchAPI::Internal::Type::Converter]
120
+ UnionMember1Map = FinchAPI::Internal::Type::HashOf[FinchAPI::Internal::Type::Unknown, nil?: true]
121
+ end
101
122
  end
102
123
  end
103
124
  end
@@ -9,25 +9,25 @@ module FinchAPI
9
9
  #
10
10
  # Create a new connect session for an employer
11
11
  #
12
- # @overload new(customer_id:, customer_name:, products:, customer_email: nil, integration: nil, manual: nil, minutes_to_expire: nil, redirect_uri: nil, sandbox: nil, request_options: {})
12
+ # @overload new(customer_email:, customer_id:, customer_name:, integration:, manual:, minutes_to_expire:, products:, redirect_uri:, sandbox:, request_options: {})
13
13
  #
14
- # @param customer_id [String]
14
+ # @param customer_email [String, nil] Email address of the customer
15
15
  #
16
- # @param customer_name [String]
16
+ # @param customer_id [String] Unique identifier for the customer
17
17
  #
18
- # @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>]
18
+ # @param customer_name [String] Name of the customer
19
19
  #
20
- # @param customer_email [String, nil]
20
+ # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil] Integration configuration for the connect session
21
21
  #
22
- # @param integration [FinchAPI::Models::Connect::SessionNewParams::Integration, nil]
23
- #
24
- # @param manual [Boolean, nil]
22
+ # @param manual [Boolean, nil] Enable manual authentication mode
25
23
  #
26
24
  # @param minutes_to_expire [Float, nil] The number of minutes until the session expires (defaults to 129,600, which is 9
27
25
  #
28
- # @param redirect_uri [String, nil]
26
+ # @param products [Array<Symbol, FinchAPI::Models::Connect::SessionNewParams::Product>] The Finch products to request access to
27
+ #
28
+ # @param redirect_uri [String, nil] The URI to redirect to after the Connect flow is completed
29
29
  #
30
- # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil]
30
+ # @param sandbox [Symbol, FinchAPI::Models::Connect::SessionNewParams::Sandbox, nil] Sandbox mode for testing
31
31
  #
32
32
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
33
33
  #
@@ -50,11 +50,11 @@ module FinchAPI
50
50
  #
51
51
  # Create a new Connect session for reauthenticating an existing connection
52
52
  #
53
- # @overload reauthenticate(connection_id:, minutes_to_expire: nil, products: nil, redirect_uri: nil, request_options: {})
53
+ # @overload reauthenticate(connection_id:, minutes_to_expire:, products:, redirect_uri:, request_options: {})
54
54
  #
55
55
  # @param connection_id [String] The ID of the existing connection to reauthenticate
56
56
  #
57
- # @param minutes_to_expire [Integer, nil] The number of minutes until the session expires (defaults to 43,200, which is 30
57
+ # @param minutes_to_expire [Integer] The number of minutes until the session expires (defaults to 43,200, which is 30
58
58
  #
59
59
  # @param products [Array<Symbol, FinchAPI::Models::Connect::SessionReauthenticateParams::Product>, nil] The products to request access to (optional for reauthentication)
60
60
  #
@@ -10,11 +10,13 @@ module FinchAPI
10
10
  # adjusted. Making the same request multiple times will not create new
11
11
  # enrollments, but will continue to set the state of the existing enrollment.
12
12
  #
13
- # @overload enroll_many(benefit_id, individuals: nil, request_options: {})
13
+ # @overload enroll_many(benefit_id, entity_ids: nil, individuals: nil, request_options: {})
14
14
  #
15
- # @param benefit_id [String]
15
+ # @param benefit_id [String] Path param:
16
+ #
17
+ # @param entity_ids [Array<String>] Query param: The entity IDs to specify which entities' data to access.
16
18
  #
17
- # @param individuals [Array<FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual>] Array of the individual_id to enroll and a configuration object.
19
+ # @param individuals [Array<FinchAPI::Models::HRIS::Benefits::IndividualEnrollManyParams::Individual>] Body param: Array of the individual_id to enroll and a configuration object.
18
20
  #
19
21
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
20
22
  #
@@ -26,6 +28,7 @@ module FinchAPI
26
28
  @client.request(
27
29
  method: :post,
28
30
  path: ["employer/benefits/%1$s/individuals", benefit_id],
31
+ query: parsed.except(:individuals),
29
32
  body: parsed[:individuals],
30
33
  model: FinchAPI::HRIS::Benefits::EnrolledIndividualBenefitResponse,
31
34
  options: options
@@ -34,20 +37,25 @@ module FinchAPI
34
37
 
35
38
  # Lists individuals currently enrolled in a given deduction.
36
39
  #
37
- # @overload enrolled_ids(benefit_id, request_options: {})
40
+ # @overload enrolled_ids(benefit_id, entity_ids: nil, request_options: {})
38
41
  #
39
42
  # @param benefit_id [String]
43
+ #
44
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
45
+ #
40
46
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
41
47
  #
42
48
  # @return [FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse]
43
49
  #
44
50
  # @see FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsParams
45
51
  def enrolled_ids(benefit_id, params = {})
52
+ parsed, options = FinchAPI::HRIS::Benefits::IndividualEnrolledIDsParams.dump_request(params)
46
53
  @client.request(
47
54
  method: :get,
48
55
  path: ["employer/benefits/%1$s/enrolled", benefit_id],
56
+ query: parsed,
49
57
  model: FinchAPI::Models::HRIS::Benefits::IndividualEnrolledIDsResponse,
50
- options: params[:request_options]
58
+ options: options
51
59
  )
52
60
  end
53
61
 
@@ -57,10 +65,12 @@ module FinchAPI
57
65
  #
58
66
  # Get enrollment information for the given individuals.
59
67
  #
60
- # @overload retrieve_many_benefits(benefit_id, individual_ids: nil, request_options: {})
68
+ # @overload retrieve_many_benefits(benefit_id, entity_ids: nil, individual_ids: nil, request_options: {})
61
69
  #
62
70
  # @param benefit_id [String]
63
71
  #
72
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
73
+ #
64
74
  # @param individual_ids [String] comma-delimited list of stable Finch uuids for each individual. If empty, defaul
65
75
  #
66
76
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -82,11 +92,13 @@ module FinchAPI
82
92
 
83
93
  # Unenroll individuals from a deduction or contribution
84
94
  #
85
- # @overload unenroll_many(benefit_id, individual_ids: nil, request_options: {})
95
+ # @overload unenroll_many(benefit_id, entity_ids: nil, individual_ids: nil, request_options: {})
86
96
  #
87
- # @param benefit_id [String]
97
+ # @param benefit_id [String] Path param:
98
+ #
99
+ # @param entity_ids [Array<String>] Query param: The entity IDs to specify which entities' data to access.
88
100
  #
89
- # @param individual_ids [Array<String>] Array of individual_ids to unenroll.
101
+ # @param individual_ids [Array<String>] Body param: Array of individual_ids to unenroll.
90
102
  #
91
103
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
92
104
  #
@@ -95,10 +107,12 @@ module FinchAPI
95
107
  # @see FinchAPI::Models::HRIS::Benefits::IndividualUnenrollManyParams
96
108
  def unenroll_many(benefit_id, params = {})
97
109
  parsed, options = FinchAPI::HRIS::Benefits::IndividualUnenrollManyParams.dump_request(params)
110
+ query_params = [:entity_ids]
98
111
  @client.request(
99
112
  method: :delete,
100
113
  path: ["employer/benefits/%1$s/individuals", benefit_id],
101
- body: parsed,
114
+ query: parsed.slice(*query_params),
115
+ body: parsed.except(*query_params),
102
116
  model: FinchAPI::HRIS::Benefits::UnenrolledIndividualBenefitResponse,
103
117
  options: options
104
118
  )
@@ -13,15 +13,17 @@ module FinchAPI
13
13
  # Creates a new company-wide deduction or contribution. Please use the
14
14
  # `/providers` endpoint to view available types for each provider.
15
15
  #
16
- # @overload create(company_contribution: nil, description: nil, frequency: nil, type: nil, request_options: {})
16
+ # @overload create(entity_ids: nil, company_contribution: nil, description: nil, frequency: nil, type: nil, request_options: {})
17
17
  #
18
- # @param company_contribution [FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, nil] The company match for this benefit.
18
+ # @param entity_ids [Array<String>] Query param: The entity IDs to specify which entities' data to access.
19
19
  #
20
- # @param description [String] Name of the benefit as it appears in the provider and pay statements. Recommend
20
+ # @param company_contribution [FinchAPI::Models::HRIS::BenefitCreateParams::CompanyContribution, nil] Body param: The company match for this benefit.
21
21
  #
22
- # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] The frequency of the benefit deduction/contribution.
22
+ # @param description [String] Body param: Name of the benefit as it appears in the provider and pay statements
23
23
  #
24
- # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Type of benefit.
24
+ # @param frequency [Symbol, FinchAPI::Models::HRIS::BenefitFrequency, nil] Body param: The frequency of the benefit deduction/contribution.
25
+ #
26
+ # @param type [Symbol, FinchAPI::Models::HRIS::BenefitType, nil] Body param: Type of benefit.
25
27
  #
26
28
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
27
29
  #
@@ -30,10 +32,12 @@ module FinchAPI
30
32
  # @see FinchAPI::Models::HRIS::BenefitCreateParams
31
33
  def create(params = {})
32
34
  parsed, options = FinchAPI::HRIS::BenefitCreateParams.dump_request(params)
35
+ query_params = [:entity_ids]
33
36
  @client.request(
34
37
  method: :post,
35
38
  path: "employer/benefits",
36
- body: parsed,
39
+ query: parsed.slice(*query_params),
40
+ body: parsed.except(*query_params),
37
41
  model: FinchAPI::HRIS::CreateCompanyBenefitsResponse,
38
42
  options: options
39
43
  )
@@ -41,30 +45,37 @@ module FinchAPI
41
45
 
42
46
  # Lists deductions and contributions information for a given item
43
47
  #
44
- # @overload retrieve(benefit_id, request_options: {})
48
+ # @overload retrieve(benefit_id, entity_ids: nil, request_options: {})
45
49
  #
46
50
  # @param benefit_id [String]
51
+ #
52
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
53
+ #
47
54
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
48
55
  #
49
56
  # @return [FinchAPI::Models::HRIS::CompanyBenefit]
50
57
  #
51
58
  # @see FinchAPI::Models::HRIS::BenefitRetrieveParams
52
59
  def retrieve(benefit_id, params = {})
60
+ parsed, options = FinchAPI::HRIS::BenefitRetrieveParams.dump_request(params)
53
61
  @client.request(
54
62
  method: :get,
55
63
  path: ["employer/benefits/%1$s", benefit_id],
64
+ query: parsed,
56
65
  model: FinchAPI::HRIS::CompanyBenefit,
57
- options: params[:request_options]
66
+ options: options
58
67
  )
59
68
  end
60
69
 
61
70
  # Updates an existing company-wide deduction or contribution
62
71
  #
63
- # @overload update(benefit_id, description: nil, request_options: {})
72
+ # @overload update(benefit_id, entity_ids: nil, description: nil, request_options: {})
64
73
  #
65
- # @param benefit_id [String]
74
+ # @param benefit_id [String] Path param:
66
75
  #
67
- # @param description [String] Updated name or description.
76
+ # @param entity_ids [Array<String>] Query param: The entity IDs to specify which entities' data to access.
77
+ #
78
+ # @param description [String] Body param: Updated name or description.
68
79
  #
69
80
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
70
81
  #
@@ -73,10 +84,12 @@ module FinchAPI
73
84
  # @see FinchAPI::Models::HRIS::BenefitUpdateParams
74
85
  def update(benefit_id, params = {})
75
86
  parsed, options = FinchAPI::HRIS::BenefitUpdateParams.dump_request(params)
87
+ query_params = [:entity_ids]
76
88
  @client.request(
77
89
  method: :post,
78
90
  path: ["employer/benefits/%1$s", benefit_id],
79
- body: parsed,
91
+ query: parsed.slice(*query_params),
92
+ body: parsed.except(*query_params),
80
93
  model: FinchAPI::HRIS::UpdateCompanyBenefitResponse,
81
94
  options: options
82
95
  )
@@ -84,7 +97,9 @@ module FinchAPI
84
97
 
85
98
  # List all company-wide deductions and contributions.
86
99
  #
87
- # @overload list(request_options: {})
100
+ # @overload list(entity_ids: nil, request_options: {})
101
+ #
102
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
88
103
  #
89
104
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
90
105
  #
@@ -92,18 +107,22 @@ module FinchAPI
92
107
  #
93
108
  # @see FinchAPI::Models::HRIS::BenefitListParams
94
109
  def list(params = {})
110
+ parsed, options = FinchAPI::HRIS::BenefitListParams.dump_request(params)
95
111
  @client.request(
96
112
  method: :get,
97
113
  path: "employer/benefits",
114
+ query: parsed,
98
115
  page: FinchAPI::Internal::SinglePage,
99
116
  model: FinchAPI::HRIS::CompanyBenefit,
100
- options: params[:request_options]
117
+ options: options
101
118
  )
102
119
  end
103
120
 
104
121
  # Get deductions metadata
105
122
  #
106
- # @overload list_supported_benefits(request_options: {})
123
+ # @overload list_supported_benefits(entity_ids: nil, request_options: {})
124
+ #
125
+ # @param entity_ids [Array<String>] The entity IDs to specify which entities' data to access.
107
126
  #
108
127
  # @param request_options [FinchAPI::RequestOptions, Hash{Symbol=>Object}, nil]
109
128
  #
@@ -111,12 +130,14 @@ module FinchAPI
111
130
  #
112
131
  # @see FinchAPI::Models::HRIS::BenefitListSupportedBenefitsParams
113
132
  def list_supported_benefits(params = {})
133
+ parsed, options = FinchAPI::HRIS::BenefitListSupportedBenefitsParams.dump_request(params)
114
134
  @client.request(
115
135
  method: :get,
116
136
  path: "employer/benefits/meta",
137
+ query: parsed,
117
138
  page: FinchAPI::Internal::SinglePage,
118
139
  model: FinchAPI::HRIS::SupportedBenefit,
119
- options: params[:request_options]
140
+ options: options
120
141
  )
121
142
  end
122
143