fern_gusto 0.0.6.pre.alpha6

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 (515) hide show
  1. checksums.yaml +7 -0
  2. data/lib/base_gusto.rb +175 -0
  3. data/lib/core/file_utilities.rb +27 -0
  4. data/lib/environment.rb +9 -0
  5. data/lib/fern_gusto/ach_transactions/client.rb +119 -0
  6. data/lib/fern_gusto/admins/types/admin.rb +82 -0
  7. data/lib/fern_gusto/companies/attachments/client.rb +335 -0
  8. data/lib/fern_gusto/companies/attachments/types/attachments_create_request_category.rb +15 -0
  9. data/lib/fern_gusto/companies/attachments/types/attachments_get_download_url_response.rb +56 -0
  10. data/lib/fern_gusto/companies/bank_accounts/client.rb +435 -0
  11. data/lib/fern_gusto/companies/bank_accounts/types/bank_accounts_create_request_account_type.rb +15 -0
  12. data/lib/fern_gusto/companies/benefits/client.rb +862 -0
  13. data/lib/fern_gusto/companies/client.rb +1104 -0
  14. data/lib/fern_gusto/companies/departments/client.rb +587 -0
  15. data/lib/fern_gusto/companies/departments/types/departments_add_people_request_contractors_item.rb +59 -0
  16. data/lib/fern_gusto/companies/departments/types/departments_add_people_request_employees_item.rb +59 -0
  17. data/lib/fern_gusto/companies/departments/types/departments_remove_people_request_contractors_item.rb +59 -0
  18. data/lib/fern_gusto/companies/departments/types/departments_remove_people_request_employees_item.rb +59 -0
  19. data/lib/fern_gusto/companies/employees/client.rb +376 -0
  20. data/lib/fern_gusto/companies/external_payrolls/client.rb +605 -0
  21. data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item.rb +98 -0
  22. data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_benefits_item.rb +79 -0
  23. data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_earnings_item.rb +87 -0
  24. data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_earnings_item_earning_type.rb +15 -0
  25. data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_request_external_payroll_items_item_taxes_item.rb +69 -0
  26. data/lib/fern_gusto/companies/external_payrolls/types/external_payrolls_update_tax_liabilities_request_liability_selections_item.rb +80 -0
  27. data/lib/fern_gusto/companies/federal_tax_details/client.rb +212 -0
  28. data/lib/fern_gusto/companies/federal_tax_details/types/federal_tax_details_update_request_tax_payer_type.rb +25 -0
  29. data/lib/fern_gusto/companies/forms/client.rb +345 -0
  30. data/lib/fern_gusto/companies/industry_selection/client.rb +207 -0
  31. data/lib/fern_gusto/companies/locations/client.rb +417 -0
  32. data/lib/fern_gusto/companies/pay_schedules/client.rb +377 -0
  33. data/lib/fern_gusto/companies/payment_configs/client.rb +198 -0
  34. data/lib/fern_gusto/companies/payment_configs/types/payment_configs_update_request_payment_speed.rb +19 -0
  35. data/lib/fern_gusto/companies/signatories/client.rb +513 -0
  36. data/lib/fern_gusto/companies/signatories/types/signatories_create_request_home_address.rb +89 -0
  37. data/lib/fern_gusto/companies/signatories/types/signatories_update_request_home_address.rb +88 -0
  38. data/lib/fern_gusto/companies/tax_requirements/client.rb +367 -0
  39. data/lib/fern_gusto/companies/tax_requirements/types/tax_requirements_list_response_item.rb +75 -0
  40. data/lib/fern_gusto/companies/tax_requirements/types/tax_requirements_update_state_request_requirement_sets_item.rb +88 -0
  41. data/lib/fern_gusto/companies/tax_requirements/types/tax_requirements_update_state_request_requirement_sets_item_requirements_item.rb +70 -0
  42. data/lib/fern_gusto/companies/types/companies_accept_terms_response.rb +56 -0
  43. data/lib/fern_gusto/companies/types/companies_create_request_company.rb +83 -0
  44. data/lib/fern_gusto/companies/types/companies_create_request_user.rb +81 -0
  45. data/lib/fern_gusto/companies/types/companies_create_response.rb +82 -0
  46. data/lib/fern_gusto/companies/types/companies_get_custom_fields_response.rb +59 -0
  47. data/lib/fern_gusto/companies/types/companies_migrate_to_embedded_payroll_response.rb +68 -0
  48. data/lib/fern_gusto/companies/types/companies_retrieve_terms_response.rb +56 -0
  49. data/lib/fern_gusto/companies/types/company.rb +223 -0
  50. data/lib/fern_gusto/companies/types/company_company_status.rb +21 -0
  51. data/lib/fern_gusto/companies/types/company_compensations.rb +85 -0
  52. data/lib/fern_gusto/companies/types/company_compensations_fixed_item.rb +55 -0
  53. data/lib/fern_gusto/companies/types/company_compensations_hourly_item.rb +65 -0
  54. data/lib/fern_gusto/companies/types/company_compensations_paid_time_off_item.rb +55 -0
  55. data/lib/fern_gusto/companies/types/company_entity_type.rb +23 -0
  56. data/lib/fern_gusto/companies/types/company_funding_type.rb +15 -0
  57. data/lib/fern_gusto/companies/types/company_onboarding_status.rb +77 -0
  58. data/lib/fern_gusto/companies/types/company_onboarding_status_onboarding_steps_item.rb +97 -0
  59. data/lib/fern_gusto/companies/types/company_pay_schedule_type.rb +15 -0
  60. data/lib/fern_gusto/companies/types/company_primary_payroll_admin.rb +80 -0
  61. data/lib/fern_gusto/companies/types/company_primary_signatory.rb +100 -0
  62. data/lib/fern_gusto/companies/types/company_primary_signatory_home_address.rb +93 -0
  63. data/lib/fern_gusto/companies/types/company_tier.rb +20 -0
  64. data/lib/fern_gusto/company_attachment/types/company_attachment.rb +81 -0
  65. data/lib/fern_gusto/company_attachment/types/company_attachment_category.rb +13 -0
  66. data/lib/fern_gusto/company_bank_accounts/types/company_bank_account.rb +157 -0
  67. data/lib/fern_gusto/company_bank_accounts/types/company_bank_account_account_type.rb +13 -0
  68. data/lib/fern_gusto/company_bank_accounts/types/company_bank_account_plaid_status.rb +14 -0
  69. data/lib/fern_gusto/company_bank_accounts/types/company_bank_account_verification_status.rb +19 -0
  70. data/lib/fern_gusto/company_bank_accounts/types/company_bank_account_verification_type.rb +17 -0
  71. data/lib/fern_gusto/company_benefits/types/benefit_summary.rb +104 -0
  72. data/lib/fern_gusto/company_benefits/types/benefit_summary_employees.rb +113 -0
  73. data/lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits.rb +107 -0
  74. data/lib/fern_gusto/company_benefits/types/benefit_summary_employees_payroll_benefits_pay_period.rb +67 -0
  75. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements.rb +156 -0
  76. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_catch_up.rb +86 -0
  77. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_catch_up_default_value.rb +67 -0
  78. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_company_contribution_annual_maximum.rb +88 -0
  79. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_company_contribution_annual_maximum_default_value.rb +68 -0
  80. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_contribution.rb +86 -0
  81. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_contribution_default_value.rb +67 -0
  82. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_coverage_amount.rb +87 -0
  83. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_coverage_amount_default_value.rb +67 -0
  84. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_coverage_salary_multiplier.rb +88 -0
  85. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_coverage_salary_multiplier_default_value.rb +67 -0
  86. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_deduct_as_percentage.rb +88 -0
  87. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_deduct_as_percentage_default_value.rb +67 -0
  88. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_employee_deduction.rb +88 -0
  89. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_employee_deduction_default_value.rb +67 -0
  90. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_limit_option.rb +86 -0
  91. data/lib/fern_gusto/company_benefits/types/benefit_type_requirements_limit_option_default_value.rb +67 -0
  92. data/lib/fern_gusto/contractor/types/contractor_onboarding_info.rb +78 -0
  93. data/lib/fern_gusto/contractor/types/contractor_onboarding_status_onboarding_status.rb +14 -0
  94. data/lib/fern_gusto/contractor/types/contractor_onboarding_status_onboarding_steps_item.rb +88 -0
  95. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_for_group.rb +145 -0
  96. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_for_group_payment_method.rb +15 -0
  97. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_for_group_status.rb +16 -0
  98. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_for_group_wage_type.rb +13 -0
  99. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group.rb +127 -0
  100. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_minimal.rb +116 -0
  101. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_minimal_status.rb +16 -0
  102. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_minimal_totals.rb +74 -0
  103. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_status.rb +16 -0
  104. data/lib/fern_gusto/contractor_payment_groups/types/contractor_payment_group_totals.rb +74 -0
  105. data/lib/fern_gusto/contractor_payment_method/types/contractor_bank_account.rb +94 -0
  106. data/lib/fern_gusto/contractor_payment_method/types/contractor_bank_account_account_type.rb +13 -0
  107. data/lib/fern_gusto/contractor_payment_method/types/contractor_payment_method.rb +96 -0
  108. data/lib/fern_gusto/contractor_payment_method/types/contractor_payment_method_split_by.rb +15 -0
  109. data/lib/fern_gusto/contractor_payment_method/types/contractor_payment_method_type.rb +14 -0
  110. data/lib/fern_gusto/contractor_payments/types/contractor_payment.rb +146 -0
  111. data/lib/fern_gusto/contractor_payments/types/contractor_payment_payment_method.rb +15 -0
  112. data/lib/fern_gusto/contractor_payments/types/contractor_payment_status.rb +13 -0
  113. data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary.rb +81 -0
  114. data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates.rb +81 -0
  115. data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_contractor_payments_item.rb +93 -0
  116. data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_by_dates_total.rb +67 -0
  117. data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_contractor_payments_item.rb +86 -0
  118. data/lib/fern_gusto/contractor_payments/types/contractor_payment_summary_total.rb +67 -0
  119. data/lib/fern_gusto/contractor_payments/types/contractor_payment_wage_type.rb +13 -0
  120. data/lib/fern_gusto/contractors/client.rb +1025 -0
  121. data/lib/fern_gusto/contractors/documents/client.rb +269 -0
  122. data/lib/fern_gusto/contractors/documents/types/documents_sign_request_fields_item.rb +67 -0
  123. data/lib/fern_gusto/contractors/forms/client.rb +343 -0
  124. data/lib/fern_gusto/contractors/payment_groups/client.rb +569 -0
  125. data/lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item.rb +102 -0
  126. data/lib/fern_gusto/contractors/payment_groups/types/payment_groups_create_request_contractor_payments_item_payment_method.rb +15 -0
  127. data/lib/fern_gusto/contractors/payment_groups/types/payment_groups_preview_request_contractor_payments_item.rb +102 -0
  128. data/lib/fern_gusto/contractors/payment_groups/types/payment_groups_preview_request_contractor_payments_item_payment_method.rb +15 -0
  129. data/lib/fern_gusto/contractors/payment_method/client.rb +369 -0
  130. data/lib/fern_gusto/contractors/payment_method/types/payment_method_create_bank_account_request_account_type.rb +14 -0
  131. data/lib/fern_gusto/contractors/payment_method/types/payment_method_update_request_type.rb +17 -0
  132. data/lib/fern_gusto/contractors/payments/client.rb +558 -0
  133. data/lib/fern_gusto/contractors/payments/types/payments_create_request_payment_method.rb +15 -0
  134. data/lib/fern_gusto/contractors/payments/types/payments_list_response.rb +62 -0
  135. data/lib/fern_gusto/contractors/types/contractor.rb +227 -0
  136. data/lib/fern_gusto/contractors/types/contractor_address.rb +94 -0
  137. data/lib/fern_gusto/contractors/types/contractor_onboarding_status.rb +18 -0
  138. data/lib/fern_gusto/contractors/types/contractor_type.rb +13 -0
  139. data/lib/fern_gusto/contractors/types/contractor_wage_type.rb +13 -0
  140. data/lib/fern_gusto/custom_fields/types/company_custom_field.rb +88 -0
  141. data/lib/fern_gusto/custom_fields/types/custom_field_type.rb +16 -0
  142. data/lib/fern_gusto/custom_fields/types/employee_custom_field.rb +104 -0
  143. data/lib/fern_gusto/documents/types/document.rb +167 -0
  144. data/lib/fern_gusto/documents/types/document_fields_item.rb +114 -0
  145. data/lib/fern_gusto/documents/types/document_pages_item.rb +65 -0
  146. data/lib/fern_gusto/documents/types/document_recipient_type.rb +15 -0
  147. data/lib/fern_gusto/documents/types/document_signed.rb +137 -0
  148. data/lib/fern_gusto/documents/types/document_signed_recipient_type.rb +15 -0
  149. data/lib/fern_gusto/earning_types/types/earning_type.rb +66 -0
  150. data/lib/fern_gusto/employee_employments/types/unprocessed_termination_pay_period.rb +101 -0
  151. data/lib/fern_gusto/employee_payment_method/types/employee_bank_account.rb +94 -0
  152. data/lib/fern_gusto/employee_payment_method/types/employee_bank_account_account_type.rb +13 -0
  153. data/lib/fern_gusto/employee_payment_method/types/employee_payment_method_info.rb +96 -0
  154. data/lib/fern_gusto/employee_payment_method/types/employee_payment_method_split_by.rb +15 -0
  155. data/lib/fern_gusto/employee_payment_method/types/employee_payment_method_type.rb +14 -0
  156. data/lib/fern_gusto/employee_tax_setup/types/employee_federal_tax.rb +144 -0
  157. data/lib/fern_gusto/employee_tax_setup/types/employee_federal_tax_w4data_type.rb +13 -0
  158. data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax.rb +90 -0
  159. data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax_answer.rb +74 -0
  160. data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax_input_question_format.rb +69 -0
  161. data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax_input_question_format_options_item.rb +67 -0
  162. data/lib/fern_gusto/employee_tax_setup/types/employee_state_tax_question.rb +96 -0
  163. data/lib/fern_gusto/employees/adresses/client.rb +885 -0
  164. data/lib/fern_gusto/employees/benefits/client.rb +656 -0
  165. data/lib/fern_gusto/employees/benefits/types/benefits_create_request_contribution.rb +93 -0
  166. data/lib/fern_gusto/employees/benefits/types/benefits_create_request_contribution_type.rb +23 -0
  167. data/lib/fern_gusto/employees/benefits/types/benefits_create_request_contribution_value.rb +67 -0
  168. data/lib/fern_gusto/employees/benefits/types/benefits_create_request_contribution_value_item.rb +80 -0
  169. data/lib/fern_gusto/employees/benefits/types/benefits_create_request_deduction_reduces_taxable_income.rb +18 -0
  170. data/lib/fern_gusto/employees/benefits/types/benefits_update_request_contribution.rb +93 -0
  171. data/lib/fern_gusto/employees/benefits/types/benefits_update_request_contribution_type.rb +23 -0
  172. data/lib/fern_gusto/employees/benefits/types/benefits_update_request_contribution_value.rb +67 -0
  173. data/lib/fern_gusto/employees/benefits/types/benefits_update_request_contribution_value_item.rb +80 -0
  174. data/lib/fern_gusto/employees/benefits/types/benefits_update_request_deduction_reduces_taxable_income.rb +18 -0
  175. data/lib/fern_gusto/employees/client.rb +822 -0
  176. data/lib/fern_gusto/employees/employments/client.rb +799 -0
  177. data/lib/fern_gusto/employees/employments/types/employments_get_history_response_item.rb +95 -0
  178. data/lib/fern_gusto/employees/employments/types/employments_get_history_response_item_employment_status.rb +20 -0
  179. data/lib/fern_gusto/employees/forms/client.rb +433 -0
  180. data/lib/fern_gusto/employees/forms/types/forms_generate_w2response.rb +132 -0
  181. data/lib/fern_gusto/employees/garnishments/client.rb +558 -0
  182. data/lib/fern_gusto/employees/garnishments/types/garnishments_create_request_garnishment_type.rb +20 -0
  183. data/lib/fern_gusto/employees/jobs_and_compensations/client.rb +938 -0
  184. data/lib/fern_gusto/employees/jobs_and_compensations/types/jobs_and_compensations_create_compensation_request_minimum_wages_item.rb +62 -0
  185. data/lib/fern_gusto/employees/jobs_and_compensations/types/jobs_and_compensations_create_compensation_request_payment_unit.rb +19 -0
  186. data/lib/fern_gusto/employees/jobs_and_compensations/types/jobs_and_compensations_update_compensation_request_minimum_wages_item.rb +62 -0
  187. data/lib/fern_gusto/employees/jobs_and_compensations/types/jobs_and_compensations_update_compensation_request_payment_unit.rb +19 -0
  188. data/lib/fern_gusto/employees/payment_method/client.rb +484 -0
  189. data/lib/fern_gusto/employees/payment_method/types/payment_method_create_bank_account_request_account_type.rb +14 -0
  190. data/lib/fern_gusto/employees/payment_method/types/payment_method_update_bank_account_request_account_type.rb +14 -0
  191. data/lib/fern_gusto/employees/payment_method/types/payment_method_update_request_split_by.rb +17 -0
  192. data/lib/fern_gusto/employees/payment_method/types/payment_method_update_request_splits_item.rb +83 -0
  193. data/lib/fern_gusto/employees/payment_method/types/payment_method_update_request_type.rb +16 -0
  194. data/lib/fern_gusto/employees/tax_setup/client.rb +422 -0
  195. data/lib/fern_gusto/employees/tax_setup/types/tax_setup_update_state_taxes_request_states_item.rb +73 -0
  196. data/lib/fern_gusto/employees/tax_setup/types/tax_setup_update_state_taxes_request_states_item_questions_item.rb +73 -0
  197. data/lib/fern_gusto/employees/tax_setup/types/tax_setup_update_state_taxes_request_states_item_questions_item_answers_item.rb +77 -0
  198. data/lib/fern_gusto/employees/types/employee.rb +281 -0
  199. data/lib/fern_gusto/employees/types/employee_current_employment_status.rb +20 -0
  200. data/lib/fern_gusto/employees/types/employee_onboarding_info.rb +77 -0
  201. data/lib/fern_gusto/employees/types/employee_onboarding_status.rb +19 -0
  202. data/lib/fern_gusto/employees/types/employee_onboarding_status_onboarding_steps_item.rb +88 -0
  203. data/lib/fern_gusto/employees/types/employee_payment_method.rb +13 -0
  204. data/lib/fern_gusto/employees/types/employees_get_custom_fields_response.rb +59 -0
  205. data/lib/fern_gusto/employees/types/employees_get_request_include.rb +12 -0
  206. data/lib/fern_gusto/events/client.rb +144 -0
  207. data/lib/fern_gusto/events/types/events_list_request_sort_order.rb +12 -0
  208. data/lib/fern_gusto/external_payrolls/types/external_payroll.rb +158 -0
  209. data/lib/fern_gusto/external_payrolls/types/external_payroll_applicable_benefits_item.rb +73 -0
  210. data/lib/fern_gusto/external_payrolls/types/external_payroll_applicable_earnings_item.rb +87 -0
  211. data/lib/fern_gusto/external_payrolls/types/external_payroll_applicable_taxes_item.rb +85 -0
  212. data/lib/fern_gusto/external_payrolls/types/external_payroll_basic.rb +101 -0
  213. data/lib/fern_gusto/external_payrolls/types/external_payroll_basic_status.rb +16 -0
  214. data/lib/fern_gusto/external_payrolls/types/external_payroll_external_payroll_items_item.rb +93 -0
  215. data/lib/fern_gusto/external_payrolls/types/external_payroll_external_payroll_items_item_benefits_item.rb +74 -0
  216. data/lib/fern_gusto/external_payrolls/types/external_payroll_external_payroll_items_item_earnings_item.rb +81 -0
  217. data/lib/fern_gusto/external_payrolls/types/external_payroll_external_payroll_items_item_taxes_item.rb +67 -0
  218. data/lib/fern_gusto/external_payrolls/types/external_payroll_metadata.rb +56 -0
  219. data/lib/fern_gusto/external_payrolls/types/external_payroll_status.rb +16 -0
  220. data/lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions.rb +72 -0
  221. data/lib/fern_gusto/external_payrolls/types/external_payroll_tax_suggestions_tax_suggestions.rb +68 -0
  222. data/lib/fern_gusto/external_payrolls/types/tax_liabilities_selections.rb +86 -0
  223. data/lib/fern_gusto/external_payrolls/types/tax_liabilities_selections_possible_liabilities.rb +75 -0
  224. data/lib/fern_gusto/federal_tax_details/types/federal_tax_details.rb +140 -0
  225. data/lib/fern_gusto/flows/client.rb +113 -0
  226. data/lib/fern_gusto/flows/types/flow.rb +66 -0
  227. data/lib/fern_gusto/flows/types/flows_create_request_entity_type.rb +14 -0
  228. data/lib/fern_gusto/forms/types/form.rb +123 -0
  229. data/lib/fern_gusto/forms/types/form1099.rb +126 -0
  230. data/lib/fern_gusto/generated_documents/client.rb +106 -0
  231. data/lib/fern_gusto/holiday_pay_policies/client.rb +599 -0
  232. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_add_employees_request_employees_item.rb +57 -0
  233. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays.rb +198 -0
  234. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_christmas_day.rb +57 -0
  235. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_columbus_day.rb +57 -0
  236. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_independence_day.rb +57 -0
  237. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_juneteenth.rb +57 -0
  238. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_labor_day.rb +57 -0
  239. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_memorial_day.rb +57 -0
  240. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_mlk_day.rb +57 -0
  241. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_new_years_day.rb +57 -0
  242. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_presidents_day.rb +57 -0
  243. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_thanksgiving.rb +57 -0
  244. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_create_request_federal_holidays_veterans_day.rb +57 -0
  245. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_remove_employees_request_employees_item.rb +57 -0
  246. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays.rb +198 -0
  247. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_christmas_day.rb +57 -0
  248. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_columbus_day.rb +57 -0
  249. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_independence_day.rb +57 -0
  250. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_juneteenth.rb +57 -0
  251. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_labor_day.rb +57 -0
  252. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_memorial_day.rb +57 -0
  253. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_mlk_day.rb +57 -0
  254. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_new_years_day.rb +57 -0
  255. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_presidents_day.rb +57 -0
  256. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_thanksgiving.rb +57 -0
  257. data/lib/fern_gusto/holiday_pay_policies/types/holiday_pay_policies_update_request_federal_holidays_veterans_day.rb +57 -0
  258. data/lib/fern_gusto/industry/types/industry.rb +87 -0
  259. data/lib/fern_gusto/invoices/client.rb +132 -0
  260. data/lib/fern_gusto/jobs_and_compensations/types/compensation.rb +120 -0
  261. data/lib/fern_gusto/jobs_and_compensations/types/compensation_payment_unit.rb +17 -0
  262. data/lib/fern_gusto/jobs_and_compensations/types/job.rb +161 -0
  263. data/lib/fern_gusto/locations/types/company_address.rb +103 -0
  264. data/lib/fern_gusto/locations/types/location.rb +171 -0
  265. data/lib/fern_gusto/notifications/client.rb +120 -0
  266. data/lib/fern_gusto/pay_schedules/types/pay_schedule.rb +151 -0
  267. data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment.rb +103 -0
  268. data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_department.rb +65 -0
  269. data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_employee.rb +65 -0
  270. data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_employee_change.rb +105 -0
  271. data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_pay_period.rb +80 -0
  272. data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_preview.rb +71 -0
  273. data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_preview_type.rb +15 -0
  274. data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_transition_pay_period.rb +68 -0
  275. data/lib/fern_gusto/pay_schedules/types/pay_schedule_assignment_type.rb +15 -0
  276. data/lib/fern_gusto/pay_schedules/types/pay_schedule_frequency.rb +17 -0
  277. data/lib/fern_gusto/payment_configs/types/payment_configs.rb +79 -0
  278. data/lib/fern_gusto/payroll/client.rb +1644 -0
  279. data/lib/fern_gusto/payroll/earning_types/client.rb +350 -0
  280. data/lib/fern_gusto/payroll/earning_types/types/earning_types_get_response.rb +74 -0
  281. data/lib/fern_gusto/payroll/external_payrolls/client.rb +199 -0
  282. data/lib/fern_gusto/payroll/pay_schedules/client.rb +584 -0
  283. data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_create_request_frequency.rb +17 -0
  284. data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_request_frequency.rb +16 -0
  285. data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response.rb +72 -0
  286. data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_preview_response_pay_periods_item.rb +83 -0
  287. data/lib/fern_gusto/payroll/pay_schedules/types/pay_schedules_update_request_frequency.rb +17 -0
  288. data/lib/fern_gusto/payroll/types/payroll_create_request_off_cycle_reason.rb +15 -0
  289. data/lib/fern_gusto/payroll/types/payroll_create_request_withholding_pay_period.rb +18 -0
  290. data/lib/fern_gusto/payroll/types/payroll_get_request_include_item.rb +14 -0
  291. data/lib/fern_gusto/payroll/types/payroll_list_request_include_item.rb +13 -0
  292. data/lib/fern_gusto/payroll/types/payroll_list_request_payroll_types_item.rb +13 -0
  293. data/lib/fern_gusto/payroll/types/payroll_list_request_processing_statuses_item.rb +12 -0
  294. data/lib/fern_gusto/payroll/types/payroll_list_request_sort_order.rb +12 -0
  295. data/lib/fern_gusto/payroll/types/payroll_skip_payroll_request_payroll_type.rb +15 -0
  296. data/lib/fern_gusto/payroll/types/payroll_submit_request_submission_blockers_item.rb +67 -0
  297. data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item.rb +133 -0
  298. data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_fixed_compensations_item.rb +79 -0
  299. data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_hourly_compensations_item.rb +79 -0
  300. data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_paid_time_off_item.rb +85 -0
  301. data/lib/fern_gusto/payroll/types/payroll_update_request_employee_compensations_item_payment_method.rb +13 -0
  302. data/lib/fern_gusto/payrolls/types/employee_pay_stub.rb +94 -0
  303. data/lib/fern_gusto/payrolls/types/paid_time_off.rb +123 -0
  304. data/lib/fern_gusto/payrolls/types/paid_time_off_name.rb +14 -0
  305. data/lib/fern_gusto/payrolls/types/pay_period.rb +86 -0
  306. data/lib/fern_gusto/payrolls/types/pay_period_payroll.rb +107 -0
  307. data/lib/fern_gusto/payrolls/types/pay_period_payroll_payroll_type.rb +13 -0
  308. data/lib/fern_gusto/payrolls/types/payroll.rb +285 -0
  309. data/lib/fern_gusto/payrolls/types/payroll_minimal.rb +250 -0
  310. data/lib/fern_gusto/payrolls/types/payroll_prepared.rb +250 -0
  311. data/lib/fern_gusto/recovery_cases/client.rb +198 -0
  312. data/lib/fern_gusto/reports/client.rb +306 -0
  313. data/lib/fern_gusto/reports/types/reports_create_request_columns_item.rb +91 -0
  314. data/lib/fern_gusto/reports/types/reports_create_request_employment_status.rb +18 -0
  315. data/lib/fern_gusto/reports/types/reports_create_request_employment_type.rb +16 -0
  316. data/lib/fern_gusto/reports/types/reports_create_request_file_type.rb +13 -0
  317. data/lib/fern_gusto/reports/types/reports_create_request_groupings_item.rb +14 -0
  318. data/lib/fern_gusto/reports/types/reports_create_request_payment_method.rb +13 -0
  319. data/lib/fern_gusto/signatories/types/signatory.rb +175 -0
  320. data/lib/fern_gusto/signatories/types/signatory_home_address.rb +93 -0
  321. data/lib/fern_gusto/signatories/types/signatory_identity_verification_status.rb +28 -0
  322. data/lib/fern_gusto/terminations/types/termination.rb +109 -0
  323. data/lib/fern_gusto/time_off_policies/client.rb +863 -0
  324. data/lib/fern_gusto/time_off_policies/types/time_off_policies_add_employees_request_employees_item.rb +67 -0
  325. data/lib/fern_gusto/time_off_policies/types/time_off_policies_create_request_accrual_method.rb +19 -0
  326. data/lib/fern_gusto/time_off_policies/types/time_off_policies_remove_employees_request_employees_item.rb +57 -0
  327. data/lib/fern_gusto/time_off_policies/types/time_off_policies_update_balance_request_employees_item.rb +67 -0
  328. data/lib/fern_gusto/time_off_policies/types/time_off_policies_update_request_accrual_method.rb +19 -0
  329. data/lib/fern_gusto/time_off_requests/types/time_off_request.rb +141 -0
  330. data/lib/fern_gusto/time_off_requests/types/time_off_request_approver.rb +66 -0
  331. data/lib/fern_gusto/time_off_requests/types/time_off_request_employee.rb +66 -0
  332. data/lib/fern_gusto/time_off_requests/types/time_off_request_initiator.rb +66 -0
  333. data/lib/fern_gusto/time_off_requests/types/time_off_request_request_type.rb +13 -0
  334. data/lib/fern_gusto/time_off_requests/types/time_off_request_status.rb +14 -0
  335. data/lib/fern_gusto/token/client.rb +270 -0
  336. data/lib/fern_gusto/token/types/token_get_info_response.rb +85 -0
  337. data/lib/fern_gusto/token/types/token_get_info_response_resource.rb +64 -0
  338. data/lib/fern_gusto/token/types/token_get_info_response_resource_owner.rb +65 -0
  339. data/lib/fern_gusto/token/types/token_get_info_response_resource_owner_type.rb +13 -0
  340. data/lib/fern_gusto/token/types/token_get_system_access_token_response.rb +77 -0
  341. data/lib/fern_gusto/types/accruing_time_off_hour.rb +64 -0
  342. data/lib/fern_gusto/types/ach_transaction.rb +162 -0
  343. data/lib/fern_gusto/types/ach_transaction_payment_direction.rb +11 -0
  344. data/lib/fern_gusto/types/ach_transaction_payment_event_type.rb +11 -0
  345. data/lib/fern_gusto/types/ach_transaction_payment_status.rb +13 -0
  346. data/lib/fern_gusto/types/ach_transaction_recipient_type.rb +11 -0
  347. data/lib/fern_gusto/types/address.rb +111 -0
  348. data/lib/fern_gusto/types/authentication.rb +96 -0
  349. data/lib/fern_gusto/types/child_support_data.rb +58 -0
  350. data/lib/fern_gusto/types/child_support_data_agencies_item.rb +104 -0
  351. data/lib/fern_gusto/types/child_support_data_agencies_item_fips_codes_item.rb +67 -0
  352. data/lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item.rb +70 -0
  353. data/lib/fern_gusto/types/child_support_data_agencies_item_required_attributes_item_key.rb +14 -0
  354. data/lib/fern_gusto/types/company_benefit.rb +135 -0
  355. data/lib/fern_gusto/types/company_benefit_with_employee_benefits.rb +148 -0
  356. data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item.rb +115 -0
  357. data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item_contribution.rb +91 -0
  358. data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item_contribution_value.rb +61 -0
  359. data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item_contribution_value_tiers.rb +60 -0
  360. data/lib/fern_gusto/types/company_benefit_with_employee_benefits_employee_benefits_item_contribution_value_tiers_tiers_item.rb +86 -0
  361. data/lib/fern_gusto/types/contractor_address_info.rb +118 -0
  362. data/lib/fern_gusto/types/contractor_body.rb +200 -0
  363. data/lib/fern_gusto/types/contractor_body_type.rb +11 -0
  364. data/lib/fern_gusto/types/contractor_body_wage_type.rb +11 -0
  365. data/lib/fern_gusto/types/contractor_payment_receipt.rb +161 -0
  366. data/lib/fern_gusto/types/contractor_payment_receipt_contractor_payments_item.rb +120 -0
  367. data/lib/fern_gusto/types/contractor_payment_receipt_licensee.rb +92 -0
  368. data/lib/fern_gusto/types/contractor_payment_receipt_totals.rb +54 -0
  369. data/lib/fern_gusto/types/create_report.rb +77 -0
  370. data/lib/fern_gusto/types/department.rb +103 -0
  371. data/lib/fern_gusto/types/department_contractors_item.rb +53 -0
  372. data/lib/fern_gusto/types/department_employees_item.rb +53 -0
  373. data/lib/fern_gusto/types/document_pdf.rb +63 -0
  374. data/lib/fern_gusto/types/employee_address.rb +139 -0
  375. data/lib/fern_gusto/types/employee_benefit.rb +220 -0
  376. data/lib/fern_gusto/types/employee_benefit_base_object.rb +199 -0
  377. data/lib/fern_gusto/types/employee_benefit_base_object_contribution.rb +89 -0
  378. data/lib/fern_gusto/types/employee_benefit_base_object_contribution_value.rb +61 -0
  379. data/lib/fern_gusto/types/employee_benefit_base_object_contribution_value_tiers.rb +59 -0
  380. data/lib/fern_gusto/types/employee_benefit_base_object_contribution_value_tiers_tiers_item.rb +85 -0
  381. data/lib/fern_gusto/types/employee_benefit_base_object_deduction_reduces_taxable_income.rb +14 -0
  382. data/lib/fern_gusto/types/employee_benefit_for_company_benefit.rb +220 -0
  383. data/lib/fern_gusto/types/employee_work_address.rb +137 -0
  384. data/lib/fern_gusto/types/entity_error_object.rb +102 -0
  385. data/lib/fern_gusto/types/entity_error_object_errors_item.rb +89 -0
  386. data/lib/fern_gusto/types/event.rb +99 -0
  387. data/lib/fern_gusto/types/flsa_status_type.rb +23 -0
  388. data/lib/fern_gusto/types/form_pdf.rb +63 -0
  389. data/lib/fern_gusto/types/garnishment.rb +172 -0
  390. data/lib/fern_gusto/types/garnishment_child_support.rb +113 -0
  391. data/lib/fern_gusto/types/garnishment_child_support_payment_period.rb +14 -0
  392. data/lib/fern_gusto/types/garnishment_garnishment_type.rb +16 -0
  393. data/lib/fern_gusto/types/generated_document.rb +70 -0
  394. data/lib/fern_gusto/types/gross_up_pay.rb +53 -0
  395. data/lib/fern_gusto/types/historical_employee_body.rb +156 -0
  396. data/lib/fern_gusto/types/historical_employee_body_employee_state_taxes.rb +80 -0
  397. data/lib/fern_gusto/types/historical_employee_body_home_address.rb +84 -0
  398. data/lib/fern_gusto/types/historical_employee_body_job.rb +53 -0
  399. data/lib/fern_gusto/types/historical_employee_body_termination.rb +53 -0
  400. data/lib/fern_gusto/types/historical_employee_body_work_address.rb +53 -0
  401. data/lib/fern_gusto/types/holiday_pay_policy.rb +88 -0
  402. data/lib/fern_gusto/types/holiday_pay_policy_employees_item.rb +53 -0
  403. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item.rb +179 -0
  404. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_columbus_day.rb +72 -0
  405. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_independence_day.rb +72 -0
  406. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_juneteenth.rb +72 -0
  407. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_labor_day.rb +72 -0
  408. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_memorial_day.rb +72 -0
  409. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_mlk_day.rb +72 -0
  410. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_new_years_day.rb +72 -0
  411. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_presidents_day.rb +72 -0
  412. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_thanksgiving.rb +72 -0
  413. data/lib/fern_gusto/types/holiday_pay_policy_federal_holidays_item_veterans_day.rb +72 -0
  414. data/lib/fern_gusto/types/invoice_data.rb +58 -0
  415. data/lib/fern_gusto/types/invoice_data_active_companies_item.rb +91 -0
  416. data/lib/fern_gusto/types/minimum_wage.rb +96 -0
  417. data/lib/fern_gusto/types/notification.rb +125 -0
  418. data/lib/fern_gusto/types/notification_resources_item.rb +85 -0
  419. data/lib/fern_gusto/types/off_cycle_reason_type.rb +19 -0
  420. data/lib/fern_gusto/types/paid_holidays.rb +61 -0
  421. data/lib/fern_gusto/types/paid_holidays_schema.rb +77 -0
  422. data/lib/fern_gusto/types/pay_schedule_assignment_body.rb +111 -0
  423. data/lib/fern_gusto/types/pay_schedule_assignment_body_departments_item.rb +65 -0
  424. data/lib/fern_gusto/types/pay_schedule_assignment_body_employees_item.rb +64 -0
  425. data/lib/fern_gusto/types/pay_schedule_assignment_body_type.rb +13 -0
  426. data/lib/fern_gusto/types/payment_method_bank_account.rb +87 -0
  427. data/lib/fern_gusto/types/payroll_blocker.rb +63 -0
  428. data/lib/fern_gusto/types/payroll_blockers_error.rb +60 -0
  429. data/lib/fern_gusto/types/payroll_blockers_error_errors_item.rb +83 -0
  430. data/lib/fern_gusto/types/payroll_blockers_error_errors_item_metadata.rb +54 -0
  431. data/lib/fern_gusto/types/payroll_check.rb +84 -0
  432. data/lib/fern_gusto/types/payroll_company_taxes_type.rb +6 -0
  433. data/lib/fern_gusto/types/payroll_company_taxes_type_item.rb +70 -0
  434. data/lib/fern_gusto/types/payroll_credit_blockers_type.rb +6 -0
  435. data/lib/fern_gusto/types/payroll_credit_blockers_type_item.rb +89 -0
  436. data/lib/fern_gusto/types/payroll_credit_blockers_type_item_status.rb +13 -0
  437. data/lib/fern_gusto/types/payroll_credit_blockers_type_item_unblock_options_item.rb +72 -0
  438. data/lib/fern_gusto/types/payroll_employee_compensations_type.rb +6 -0
  439. data/lib/fern_gusto/types/payroll_employee_compensations_type_item.rb +216 -0
  440. data/lib/fern_gusto/types/payroll_employee_compensations_type_item_benefits_item.rb +79 -0
  441. data/lib/fern_gusto/types/payroll_employee_compensations_type_item_deductions_item.rb +65 -0
  442. data/lib/fern_gusto/types/payroll_employee_compensations_type_item_fixed_compensations_item.rb +74 -0
  443. data/lib/fern_gusto/types/payroll_employee_compensations_type_item_hourly_compensations_item.rb +92 -0
  444. data/lib/fern_gusto/types/payroll_employee_compensations_type_item_paid_time_off_item.rb +76 -0
  445. data/lib/fern_gusto/types/payroll_employee_compensations_type_item_payment_method.rb +11 -0
  446. data/lib/fern_gusto/types/payroll_employee_compensations_type_item_taxes_item.rb +70 -0
  447. data/lib/fern_gusto/types/payroll_fixed_compensation_types_type.rb +6 -0
  448. data/lib/fern_gusto/types/payroll_fixed_compensation_types_type_item.rb +54 -0
  449. data/lib/fern_gusto/types/payroll_pay_period_type.rb +70 -0
  450. data/lib/fern_gusto/types/payroll_payment_speed_changed_type.rb +86 -0
  451. data/lib/fern_gusto/types/payroll_payroll_status_meta_type.rb +92 -0
  452. data/lib/fern_gusto/types/payroll_processing_request.rb +68 -0
  453. data/lib/fern_gusto/types/payroll_processing_request_status.rb +14 -0
  454. data/lib/fern_gusto/types/payroll_receipt.rb +177 -0
  455. data/lib/fern_gusto/types/payroll_receipt_employee_compensations_item.rb +116 -0
  456. data/lib/fern_gusto/types/payroll_receipt_licensee.rb +92 -0
  457. data/lib/fern_gusto/types/payroll_receipt_taxes_item.rb +63 -0
  458. data/lib/fern_gusto/types/payroll_receipt_totals.rb +85 -0
  459. data/lib/fern_gusto/types/payroll_reversal.rb +91 -0
  460. data/lib/fern_gusto/types/payroll_submission_blockers_type.rb +6 -0
  461. data/lib/fern_gusto/types/payroll_submission_blockers_type_item.rb +89 -0
  462. data/lib/fern_gusto/types/payroll_submission_blockers_type_item_status.rb +11 -0
  463. data/lib/fern_gusto/types/payroll_submission_blockers_type_item_unblock_options_item.rb +72 -0
  464. data/lib/fern_gusto/types/payroll_totals_type.rb +199 -0
  465. data/lib/fern_gusto/types/payroll_withholding_pay_period_type.rb +17 -0
  466. data/lib/fern_gusto/types/recovery_case.rb +131 -0
  467. data/lib/fern_gusto/types/recovery_case_status.rb +14 -0
  468. data/lib/fern_gusto/types/rehire.rb +116 -0
  469. data/lib/fern_gusto/types/rehire_body.rb +91 -0
  470. data/lib/fern_gusto/types/rehire_body_employment_status.rb +16 -0
  471. data/lib/fern_gusto/types/rehire_employment_status.rb +16 -0
  472. data/lib/fern_gusto/types/report.rb +72 -0
  473. data/lib/fern_gusto/types/report_template.rb +77 -0
  474. data/lib/fern_gusto/types/supported_benefit.rb +122 -0
  475. data/lib/fern_gusto/types/tax_requirement.rb +111 -0
  476. data/lib/fern_gusto/types/tax_requirement_applicable_if_item.rb +69 -0
  477. data/lib/fern_gusto/types/tax_requirement_applicable_if_item_value.rb +72 -0
  478. data/lib/fern_gusto/types/tax_requirement_effective_from.rb +5 -0
  479. data/lib/fern_gusto/types/tax_requirement_metadata.rb +182 -0
  480. data/lib/fern_gusto/types/tax_requirement_metadata_options_item.rb +70 -0
  481. data/lib/fern_gusto/types/tax_requirement_metadata_rate_type.rb +13 -0
  482. data/lib/fern_gusto/types/tax_requirement_metadata_type.rb +31 -0
  483. data/lib/fern_gusto/types/tax_requirement_metadata_validation.rb +81 -0
  484. data/lib/fern_gusto/types/tax_requirement_metadata_validation_type.rb +11 -0
  485. data/lib/fern_gusto/types/tax_requirement_set.rb +90 -0
  486. data/lib/fern_gusto/types/tax_requirements_state.rb +75 -0
  487. data/lib/fern_gusto/types/time_off_activity.rb +107 -0
  488. data/lib/fern_gusto/types/time_off_activity_time_off_type.rb +11 -0
  489. data/lib/fern_gusto/types/time_off_policy.rb +183 -0
  490. data/lib/fern_gusto/types/time_off_policy_employees_item.rb +53 -0
  491. data/lib/fern_gusto/types/time_off_policy_policy_type.rb +11 -0
  492. data/lib/fern_gusto/types/unprocessable_entity_error_body.rb +59 -0
  493. data/lib/fern_gusto/types/unprocessable_entity_error_body_errors.rb +57 -0
  494. data/lib/fern_gusto/types/unprocessable_entity_error_body_errors_base_item.rb +72 -0
  495. data/lib/fern_gusto/types/unprocessable_entity_error_body_item.rb +65 -0
  496. data/lib/fern_gusto/types/unprocessable_entity_error_body_item_questions_item.rb +69 -0
  497. data/lib/fern_gusto/types/unprocessable_entity_error_body_item_questions_item_answers_item.rb +72 -0
  498. data/lib/fern_gusto/types/unprocessable_entity_error_object.rb +63 -0
  499. data/lib/fern_gusto/types/versionable.rb +57 -0
  500. data/lib/fern_gusto/types/versionable_required.rb +55 -0
  501. data/lib/fern_gusto/types/wire_in_request.rb +170 -0
  502. data/lib/fern_gusto/types/wire_in_request_status.rb +14 -0
  503. data/lib/fern_gusto/webhooks/client.rb +627 -0
  504. data/lib/fern_gusto/webhooks/types/webhook_subscription.rb +82 -0
  505. data/lib/fern_gusto/webhooks/types/webhook_subscription_status.rb +14 -0
  506. data/lib/fern_gusto/webhooks/types/webhook_subscription_subscription_types_item.rb +25 -0
  507. data/lib/fern_gusto/webhooks/types/webhooks_create_request_subscription_types_item.rb +25 -0
  508. data/lib/fern_gusto/webhooks/types/webhooks_update_request_subscription_types_item.rb +25 -0
  509. data/lib/fern_gusto/wire_in_requests/client.rb +273 -0
  510. data/lib/fern_gusto.rb +310 -0
  511. data/lib/gemconfig.rb +13 -0
  512. data/lib/gusto_legacy.rb +19 -0
  513. data/lib/requests.rb +206 -0
  514. data/lib/types_export.rb +461 -0
  515. metadata +671 -0
@@ -0,0 +1,862 @@
1
+ # frozen_string_literal: true
2
+ require_relative "../../../requests"
3
+ require_relative "../../types/supported_benefit"
4
+ require "json"
5
+ require_relative "../../types/company_benefit"
6
+ require_relative "../../company_benefits/types/benefit_summary"
7
+ require_relative "../../types/employee_benefit"
8
+ require_relative "../../types/employee_benefit_for_company_benefit"
9
+ require_relative "../../company_benefits/types/benefit_type_requirements"
10
+ require "async"
11
+ require "async"
12
+ require "async"
13
+ require "async"
14
+ require "async"
15
+ require "async"
16
+ require "async"
17
+ require "async"
18
+ require "async"
19
+ require_relative "../../../requests"
20
+
21
+ module Gusto
22
+ module Companies
23
+ class BenefitsClient
24
+ # @return [Gusto::RequestClient]
25
+ attr_reader :request_client
26
+
27
+
28
+ # @param request_client [Gusto::RequestClient]
29
+ # @return [Gusto::Companies::BenefitsClient]
30
+ def initialize(request_client:)
31
+ @request_client = request_client
32
+ end
33
+ # Returns all benefits supported by Gusto.
34
+ # The benefit object in Gusto contains high level information about a particular
35
+ # benefit type and its tax considerations. When companies choose to offer a
36
+ # benefit, they are creating a Company Benefit object associated with a particular
37
+ # benefit.
38
+ # scope: `benefits:read`
39
+ #
40
+ # @param request_options [Gusto::RequestOptions]
41
+ # @return [Array<Gusto::SupportedBenefit>]
42
+ # @example
43
+ # api = Gusto::Client.new(
44
+ # base_url: "https://api.example.com",
45
+ # environment: Gusto::Environment::DEMO,
46
+ # token: "YOUR_AUTH_TOKEN"
47
+ # )
48
+ # api.companies.benefits.list
49
+ def list(request_options: nil)
50
+ response = @request_client.conn.get do | req |
51
+ unless request_options&.timeout_in_seconds.nil?
52
+ req.options.timeout = request_options.timeout_in_seconds
53
+ end
54
+ unless request_options&.token.nil?
55
+ req.headers["Authorization"] = request_options.token
56
+ end
57
+ unless request_options&.gusto_api_version.nil?
58
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
59
+ end
60
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
61
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
62
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
63
+ end
64
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
65
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
66
+ end
67
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits"
68
+ end
69
+ parsed_json = JSON.parse(response.body)
70
+ parsed_json&.map do | item |
71
+ item = item.to_json
72
+ Gusto::SupportedBenefit.from_json(json_object: item)
73
+ end
74
+ end
75
+ # Company benefits represent the benefits that a company is offering to employees.
76
+ # This ties together a particular supported benefit with the company-specific
77
+ # information for the offering of that benefit.
78
+ # Note that company benefits can be deactivated only when no employees are
79
+ # enrolled.
80
+ # scope: `company_benefits:write`
81
+ #
82
+ # @param company_id [String] The UUID of the company
83
+ # @param benefit_type [Float] The ID of the benefit to which the company benefit belongs.
84
+ # @param active [Boolean] Whether this benefit is active for employee participation.
85
+ # @param description [String] The description of the company benefit.For example, a company may offer multiple
86
+ # benefits with an ID of 1 (for Medical Insurance). The description would show
87
+ # something more specific like “Kaiser Permanente” or “Blue Cross/ Blue Shield”.
88
+ # @param responsible_for_employer_taxes [Boolean] Whether the employer is subject to pay employer taxes when an employee is on
89
+ # leave. Only applicable to third party sick pay benefits.
90
+ # @param responsible_for_employee_w2 [Boolean] Whether the employer is subject to file W-2 forms for an employee on leave. Only
91
+ # applicable to third party sick pay benefits.
92
+ # @param request_options [Gusto::RequestOptions]
93
+ # @return [Gusto::CompanyBenefit]
94
+ # @example
95
+ # api = Gusto::Client.new(
96
+ # base_url: "https://api.example.com",
97
+ # environment: Gusto::Environment::DEMO,
98
+ # token: "YOUR_AUTH_TOKEN"
99
+ # )
100
+ # api.companies.benefits.create(company_id: "company_id", description: "description")
101
+ def create(company_id:, benefit_type: nil, active: nil, description:, responsible_for_employer_taxes: nil, responsible_for_employee_w2: nil, request_options: nil)
102
+ response = @request_client.conn.post do | req |
103
+ unless request_options&.timeout_in_seconds.nil?
104
+ req.options.timeout = request_options.timeout_in_seconds
105
+ end
106
+ unless request_options&.token.nil?
107
+ req.headers["Authorization"] = request_options.token
108
+ end
109
+ unless request_options&.gusto_api_version.nil?
110
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
111
+ end
112
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
113
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
114
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
115
+ end
116
+ req.body = { **(request_options&.additional_body_parameters || {}), benefit_type: benefit_type, active: active, description: description, responsible_for_employer_taxes: responsible_for_employer_taxes, responsible_for_employee_w2: responsible_for_employee_w2 }.compact
117
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/company_benefits"
118
+ end
119
+ Gusto::CompanyBenefit.from_json(json_object: response.body)
120
+ end
121
+ # Returns a benefit supported by Gusto.
122
+ # The benefit object in Gusto contains high level information about a particular
123
+ # benefit type and its tax considerations. When companies choose to offer a
124
+ # benefit, they are creating a Company Benefit object associated with a particular
125
+ # benefit.
126
+ # scope: `benefits:read`
127
+ #
128
+ # @param benefit_id [String] The benefit type in Gusto.
129
+ # @param request_options [Gusto::RequestOptions]
130
+ # @return [Gusto::SupportedBenefit]
131
+ # @example
132
+ # api = Gusto::Client.new(
133
+ # base_url: "https://api.example.com",
134
+ # environment: Gusto::Environment::DEMO,
135
+ # token: "YOUR_AUTH_TOKEN"
136
+ # )
137
+ # api.companies.benefits.get(benefit_id: "benefit_id")
138
+ def get(benefit_id:, request_options: nil)
139
+ response = @request_client.conn.get do | req |
140
+ unless request_options&.timeout_in_seconds.nil?
141
+ req.options.timeout = request_options.timeout_in_seconds
142
+ end
143
+ unless request_options&.token.nil?
144
+ req.headers["Authorization"] = request_options.token
145
+ end
146
+ unless request_options&.gusto_api_version.nil?
147
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
148
+ end
149
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
150
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
151
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
152
+ end
153
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
154
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
155
+ end
156
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits/#{benefit_id}"
157
+ end
158
+ Gusto::SupportedBenefit.from_json(json_object: response.body)
159
+ end
160
+ # Company benefits represent the benefits that a company is offering to employees.
161
+ # This ties together a particular supported benefit with the company-specific
162
+ # information for the offering of that benefit.
163
+ # Note that company benefits can be deactivated only when no employees are
164
+ # enrolled.
165
+ # scope: `company_benefits:write`
166
+ #
167
+ # @param company_benefit_id [String] The UUID of the company benefit
168
+ # @param version [String] The current version of the object. See the [versioning
169
+ # guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for
170
+ # information on how to use this field.
171
+ # @param active [Boolean] Whether this benefit is active for employee participation. Company benefits may
172
+ # only be deactivated if no employees are actively participating.
173
+ # @param description [String] The description of the company benefit.For example, a company may offer multiple
174
+ # benefits with an ID of 1 (for Medical Insurance). The description would show
175
+ # something more specific like “Kaiser Permanente” or “Blue Cross/ Blue Shield”.
176
+ # @param request_options [Gusto::RequestOptions]
177
+ # @return [Gusto::CompanyBenefit]
178
+ # @example
179
+ # api = Gusto::Client.new(
180
+ # base_url: "https://api.example.com",
181
+ # environment: Gusto::Environment::DEMO,
182
+ # token: "YOUR_AUTH_TOKEN"
183
+ # )
184
+ # api.companies.benefits.update(
185
+ # company_benefit_id: "company_benefit_id",
186
+ # version: "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872",
187
+ # active: false
188
+ # )
189
+ def update(company_benefit_id:, version:, active: nil, description: nil, request_options: nil)
190
+ response = @request_client.conn.put do | req |
191
+ unless request_options&.timeout_in_seconds.nil?
192
+ req.options.timeout = request_options.timeout_in_seconds
193
+ end
194
+ unless request_options&.token.nil?
195
+ req.headers["Authorization"] = request_options.token
196
+ end
197
+ unless request_options&.gusto_api_version.nil?
198
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
199
+ end
200
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
201
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
202
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
203
+ end
204
+ req.body = { **(request_options&.additional_body_parameters || {}), version: version, active: active, description: description }.compact
205
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}"
206
+ end
207
+ Gusto::CompanyBenefit.from_json(json_object: response.body)
208
+ end
209
+ # The following must be true in order to delete a company benefit
210
+ # - There are no employee benefits associated with the company benefit
211
+ # - There are no payroll items associated with the company benefit
212
+ # - The benefit is not managed by a Partner or by Gusto (type must be 'External')
213
+ # scope: `company_benefits:write`
214
+ #
215
+ # @param company_benefit_id [String] The UUID of the company benefit
216
+ # @param request_options [Gusto::RequestOptions]
217
+ # @return [Void]
218
+ # @example
219
+ # api = Gusto::Client.new(
220
+ # base_url: "https://api.example.com",
221
+ # environment: Gusto::Environment::DEMO,
222
+ # token: "YOUR_AUTH_TOKEN"
223
+ # )
224
+ # api.companies.benefits.delete(company_benefit_id: "company_benefit_id")
225
+ def delete(company_benefit_id:, request_options: nil)
226
+ response = @request_client.conn.delete do | req |
227
+ unless request_options&.timeout_in_seconds.nil?
228
+ req.options.timeout = request_options.timeout_in_seconds
229
+ end
230
+ unless request_options&.token.nil?
231
+ req.headers["Authorization"] = request_options.token
232
+ end
233
+ unless request_options&.gusto_api_version.nil?
234
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
235
+ end
236
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
237
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
238
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
239
+ end
240
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
241
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
242
+ end
243
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}"
244
+ end
245
+ end
246
+ # Returns summary benefit data for the requested company benefit id.
247
+ # Benefits containing PHI are only visible to applications with the
248
+ # `company_benefits:read:phi` scope.
249
+ # scope: `company_benefits:read`
250
+ #
251
+ # @param company_benefit_id [String] The UUID of the company benefit
252
+ # @param start_date [String] The start date for which to retrieve company benefit summary
253
+ # @param end_date [String] The end date for which to retrieve company benefit summary. If left empty,
254
+ # defaults to today's date.
255
+ # @param detailed [Boolean] Display employee payroll item summary
256
+ # @param request_options [Gusto::RequestOptions]
257
+ # @return [Gusto::CompanyBenefits::BenefitSummary]
258
+ # @example
259
+ # api = Gusto::Client.new(
260
+ # base_url: "https://api.example.com",
261
+ # environment: Gusto::Environment::DEMO,
262
+ # token: "YOUR_AUTH_TOKEN"
263
+ # )
264
+ # api.companies.benefits.get_summary(
265
+ # company_benefit_id: "company_benefit_id",
266
+ # start_date: "2022-01-01",
267
+ # end_date: "2022-12-31"
268
+ # )
269
+ def get_summary(company_benefit_id:, start_date: nil, end_date: nil, detailed: nil, request_options: nil)
270
+ response = @request_client.conn.get do | req |
271
+ unless request_options&.timeout_in_seconds.nil?
272
+ req.options.timeout = request_options.timeout_in_seconds
273
+ end
274
+ unless request_options&.token.nil?
275
+ req.headers["Authorization"] = request_options.token
276
+ end
277
+ unless request_options&.gusto_api_version.nil?
278
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
279
+ end
280
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
281
+ req.params = { **(request_options&.additional_query_parameters || {}), "start_date": start_date, "end_date": end_date, "detailed": detailed }.compact
282
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
283
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
284
+ end
285
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/summary"
286
+ end
287
+ Gusto::CompanyBenefits::BenefitSummary.from_json(json_object: response.body)
288
+ end
289
+ # Employee benefits represent an employee enrolled in a particular company
290
+ # benefit. It includes information specific to that employee’s enrollment.
291
+ # Returns an array of all employee benefits enrolled for this company benefit.
292
+ # Benefits containing PHI are only visible to applications with the
293
+ # `employee_benefits:read:phi` scope.
294
+ # scope: `employee_benefits:read`
295
+ #
296
+ # @param company_benefit_id [String] The UUID of the company benefit
297
+ # @param page [Float] The page that is requested. When unspecified, will load all objects unless
298
+ # endpoint forces pagination.
299
+ # @param per [Float] Number of objects per page. For majority of endpoints will default to 25
300
+ # @param request_options [Gusto::RequestOptions]
301
+ # @return [Array<Gusto::EmployeeBenefit>]
302
+ # @example
303
+ # api = Gusto::Client.new(
304
+ # base_url: "https://api.example.com",
305
+ # environment: Gusto::Environment::DEMO,
306
+ # token: "YOUR_AUTH_TOKEN"
307
+ # )
308
+ # api.companies.benefits.list_employee_benefits(company_benefit_id: "company_benefit_id")
309
+ def list_employee_benefits(company_benefit_id:, page: nil, per: nil, request_options: nil)
310
+ response = @request_client.conn.get do | req |
311
+ unless request_options&.timeout_in_seconds.nil?
312
+ req.options.timeout = request_options.timeout_in_seconds
313
+ end
314
+ unless request_options&.token.nil?
315
+ req.headers["Authorization"] = request_options.token
316
+ end
317
+ unless request_options&.gusto_api_version.nil?
318
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
319
+ end
320
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
321
+ req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per }.compact
322
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
323
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
324
+ end
325
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/employee_benefits"
326
+ end
327
+ parsed_json = JSON.parse(response.body)
328
+ parsed_json&.map do | item |
329
+ item = item.to_json
330
+ Gusto::EmployeeBenefit.from_json(json_object: item)
331
+ end
332
+ end
333
+ # Employee benefits represent an employee enrolled in a particular company
334
+ # benefit. It includes information specific to that employee’s enrollment.
335
+ # Create or update(if the employee is already enrolled in the company benefit
336
+ # previously) an employee benefit for the company benefit.
337
+ # Benefits containing PHI are only visible to applications with the
338
+ # `employee_benefits:read:phi` scope.
339
+ # scope: `employee_benefits:write`
340
+ #
341
+ # @param company_benefit_id [String] The UUID of the company benefit
342
+ # @param employee_benefits [Array<Hash>] The list of employee benefits to create or updateRequest of type Array<Gusto::EmployeeBenefitForCompanyBenefit>, as a Hash
343
+ # * :employee_uuid (String)
344
+ # * :company_benefit_uuid (String)
345
+ # * :uuid (String)
346
+ # * :version (String)
347
+ # * :active (Boolean)
348
+ # * :employee_deduction (String)
349
+ # * :deduct_as_percentage (Boolean)
350
+ # * :employee_deduction_annual_maximum (String)
351
+ # * :contribution (Hash)
352
+ # * :type (String)
353
+ # * :value (Hash)
354
+ # * :elective (Boolean)
355
+ # * :company_contribution_annual_maximum (String)
356
+ # * :limit_option (String)
357
+ # * :catch_up (Boolean)
358
+ # * :retirement_loan_identifier (String)
359
+ # * :coverage_amount (String)
360
+ # * :deduction_reduces_taxable_income (Gusto::EmployeeBenefitBaseObjectDeductionReducesTaxableIncome)
361
+ # * :coverage_salary_multiplier (String)
362
+ # * :company_contribution (String)
363
+ # * :contribute_as_percentage (Boolean)
364
+ # @param request_options [Gusto::RequestOptions]
365
+ # @return [Array<Gusto::EmployeeBenefit>]
366
+ # @example
367
+ # api = Gusto::Client.new(
368
+ # base_url: "https://api.example.com",
369
+ # environment: Gusto::Environment::DEMO,
370
+ # token: "YOUR_AUTH_TOKEN"
371
+ # )
372
+ # api.companies.benefits.update_employee_benefits(company_benefit_id: "company_benefit_id", employee_benefits: [{ version: "09j3d29jqdpj92109j9j2d90dq", active: true, employee_deduction: "250.00", employee_uuid: "8f9f3f68-8fd3-499d-ade7-4a052e56494e" }])
373
+ def update_employee_benefits(company_benefit_id:, employee_benefits: nil, request_options: nil)
374
+ response = @request_client.conn.put do | req |
375
+ unless request_options&.timeout_in_seconds.nil?
376
+ req.options.timeout = request_options.timeout_in_seconds
377
+ end
378
+ unless request_options&.token.nil?
379
+ req.headers["Authorization"] = request_options.token
380
+ end
381
+ unless request_options&.gusto_api_version.nil?
382
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
383
+ end
384
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
385
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
386
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
387
+ end
388
+ req.body = { **(request_options&.additional_body_parameters || {}), employee_benefits: employee_benefits }.compact
389
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/employee_benefits"
390
+ end
391
+ parsed_json = JSON.parse(response.body)
392
+ parsed_json&.map do | item |
393
+ item = item.to_json
394
+ Gusto::EmployeeBenefit.from_json(json_object: item)
395
+ end
396
+ end
397
+ # Returns field requirements for the requested benefit type.
398
+ # scope: `benefits:read`
399
+ #
400
+ # @param benefit_id [String] The benefit type in Gusto.
401
+ # @param request_options [Gusto::RequestOptions]
402
+ # @return [Gusto::CompanyBenefits::BenefitTypeRequirements]
403
+ # @example
404
+ # api = Gusto::Client.new(
405
+ # base_url: "https://api.example.com",
406
+ # environment: Gusto::Environment::DEMO,
407
+ # token: "YOUR_AUTH_TOKEN"
408
+ # )
409
+ # api.companies.benefits.get_requirements(benefit_id: "benefit_id")
410
+ def get_requirements(benefit_id:, request_options: nil)
411
+ response = @request_client.conn.get do | req |
412
+ unless request_options&.timeout_in_seconds.nil?
413
+ req.options.timeout = request_options.timeout_in_seconds
414
+ end
415
+ unless request_options&.token.nil?
416
+ req.headers["Authorization"] = request_options.token
417
+ end
418
+ unless request_options&.gusto_api_version.nil?
419
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
420
+ end
421
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
422
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
423
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
424
+ end
425
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
426
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
427
+ end
428
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits/#{benefit_id}/requirements"
429
+ end
430
+ Gusto::CompanyBenefits::BenefitTypeRequirements.from_json(json_object: response.body)
431
+ end
432
+ end
433
+ class AsyncBenefitsClient
434
+ # @return [Gusto::AsyncRequestClient]
435
+ attr_reader :request_client
436
+
437
+
438
+ # @param request_client [Gusto::RequestClient]
439
+ # @return [Gusto::Companies::AsyncBenefitsClient]
440
+ def initialize(request_client:)
441
+ @request_client = request_client
442
+ end
443
+ # Returns all benefits supported by Gusto.
444
+ # The benefit object in Gusto contains high level information about a particular
445
+ # benefit type and its tax considerations. When companies choose to offer a
446
+ # benefit, they are creating a Company Benefit object associated with a particular
447
+ # benefit.
448
+ # scope: `benefits:read`
449
+ #
450
+ # @param request_options [Gusto::RequestOptions]
451
+ # @return [Array<Gusto::SupportedBenefit>]
452
+ # @example
453
+ # api = Gusto::Client.new(
454
+ # base_url: "https://api.example.com",
455
+ # environment: Gusto::Environment::DEMO,
456
+ # token: "YOUR_AUTH_TOKEN"
457
+ # )
458
+ # api.companies.benefits.list
459
+ def list(request_options: nil)
460
+ Async do
461
+ response = @request_client.conn.get do | req |
462
+ unless request_options&.timeout_in_seconds.nil?
463
+ req.options.timeout = request_options.timeout_in_seconds
464
+ end
465
+ unless request_options&.token.nil?
466
+ req.headers["Authorization"] = request_options.token
467
+ end
468
+ unless request_options&.gusto_api_version.nil?
469
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
470
+ end
471
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
472
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
473
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
474
+ end
475
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
476
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
477
+ end
478
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits"
479
+ end
480
+ parsed_json = JSON.parse(response.body)
481
+ parsed_json&.map do | item |
482
+ item = item.to_json
483
+ Gusto::SupportedBenefit.from_json(json_object: item)
484
+ end
485
+ end
486
+ end
487
+ # Company benefits represent the benefits that a company is offering to employees.
488
+ # This ties together a particular supported benefit with the company-specific
489
+ # information for the offering of that benefit.
490
+ # Note that company benefits can be deactivated only when no employees are
491
+ # enrolled.
492
+ # scope: `company_benefits:write`
493
+ #
494
+ # @param company_id [String] The UUID of the company
495
+ # @param benefit_type [Float] The ID of the benefit to which the company benefit belongs.
496
+ # @param active [Boolean] Whether this benefit is active for employee participation.
497
+ # @param description [String] The description of the company benefit.For example, a company may offer multiple
498
+ # benefits with an ID of 1 (for Medical Insurance). The description would show
499
+ # something more specific like “Kaiser Permanente” or “Blue Cross/ Blue Shield”.
500
+ # @param responsible_for_employer_taxes [Boolean] Whether the employer is subject to pay employer taxes when an employee is on
501
+ # leave. Only applicable to third party sick pay benefits.
502
+ # @param responsible_for_employee_w2 [Boolean] Whether the employer is subject to file W-2 forms for an employee on leave. Only
503
+ # applicable to third party sick pay benefits.
504
+ # @param request_options [Gusto::RequestOptions]
505
+ # @return [Gusto::CompanyBenefit]
506
+ # @example
507
+ # api = Gusto::Client.new(
508
+ # base_url: "https://api.example.com",
509
+ # environment: Gusto::Environment::DEMO,
510
+ # token: "YOUR_AUTH_TOKEN"
511
+ # )
512
+ # api.companies.benefits.create(company_id: "company_id", description: "description")
513
+ def create(company_id:, benefit_type: nil, active: nil, description:, responsible_for_employer_taxes: nil, responsible_for_employee_w2: nil, request_options: nil)
514
+ Async do
515
+ response = @request_client.conn.post do | req |
516
+ unless request_options&.timeout_in_seconds.nil?
517
+ req.options.timeout = request_options.timeout_in_seconds
518
+ end
519
+ unless request_options&.token.nil?
520
+ req.headers["Authorization"] = request_options.token
521
+ end
522
+ unless request_options&.gusto_api_version.nil?
523
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
524
+ end
525
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
526
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
527
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
528
+ end
529
+ req.body = { **(request_options&.additional_body_parameters || {}), benefit_type: benefit_type, active: active, description: description, responsible_for_employer_taxes: responsible_for_employer_taxes, responsible_for_employee_w2: responsible_for_employee_w2 }.compact
530
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/company_benefits"
531
+ end
532
+ Gusto::CompanyBenefit.from_json(json_object: response.body)
533
+ end
534
+ end
535
+ # Returns a benefit supported by Gusto.
536
+ # The benefit object in Gusto contains high level information about a particular
537
+ # benefit type and its tax considerations. When companies choose to offer a
538
+ # benefit, they are creating a Company Benefit object associated with a particular
539
+ # benefit.
540
+ # scope: `benefits:read`
541
+ #
542
+ # @param benefit_id [String] The benefit type in Gusto.
543
+ # @param request_options [Gusto::RequestOptions]
544
+ # @return [Gusto::SupportedBenefit]
545
+ # @example
546
+ # api = Gusto::Client.new(
547
+ # base_url: "https://api.example.com",
548
+ # environment: Gusto::Environment::DEMO,
549
+ # token: "YOUR_AUTH_TOKEN"
550
+ # )
551
+ # api.companies.benefits.get(benefit_id: "benefit_id")
552
+ def get(benefit_id:, request_options: nil)
553
+ Async do
554
+ response = @request_client.conn.get do | req |
555
+ unless request_options&.timeout_in_seconds.nil?
556
+ req.options.timeout = request_options.timeout_in_seconds
557
+ end
558
+ unless request_options&.token.nil?
559
+ req.headers["Authorization"] = request_options.token
560
+ end
561
+ unless request_options&.gusto_api_version.nil?
562
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
563
+ end
564
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
565
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
566
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
567
+ end
568
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
569
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
570
+ end
571
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits/#{benefit_id}"
572
+ end
573
+ Gusto::SupportedBenefit.from_json(json_object: response.body)
574
+ end
575
+ end
576
+ # Company benefits represent the benefits that a company is offering to employees.
577
+ # This ties together a particular supported benefit with the company-specific
578
+ # information for the offering of that benefit.
579
+ # Note that company benefits can be deactivated only when no employees are
580
+ # enrolled.
581
+ # scope: `company_benefits:write`
582
+ #
583
+ # @param company_benefit_id [String] The UUID of the company benefit
584
+ # @param version [String] The current version of the object. See the [versioning
585
+ # guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for
586
+ # information on how to use this field.
587
+ # @param active [Boolean] Whether this benefit is active for employee participation. Company benefits may
588
+ # only be deactivated if no employees are actively participating.
589
+ # @param description [String] The description of the company benefit.For example, a company may offer multiple
590
+ # benefits with an ID of 1 (for Medical Insurance). The description would show
591
+ # something more specific like “Kaiser Permanente” or “Blue Cross/ Blue Shield”.
592
+ # @param request_options [Gusto::RequestOptions]
593
+ # @return [Gusto::CompanyBenefit]
594
+ # @example
595
+ # api = Gusto::Client.new(
596
+ # base_url: "https://api.example.com",
597
+ # environment: Gusto::Environment::DEMO,
598
+ # token: "YOUR_AUTH_TOKEN"
599
+ # )
600
+ # api.companies.benefits.update(
601
+ # company_benefit_id: "company_benefit_id",
602
+ # version: "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872",
603
+ # active: false
604
+ # )
605
+ def update(company_benefit_id:, version:, active: nil, description: nil, request_options: nil)
606
+ Async do
607
+ response = @request_client.conn.put do | req |
608
+ unless request_options&.timeout_in_seconds.nil?
609
+ req.options.timeout = request_options.timeout_in_seconds
610
+ end
611
+ unless request_options&.token.nil?
612
+ req.headers["Authorization"] = request_options.token
613
+ end
614
+ unless request_options&.gusto_api_version.nil?
615
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
616
+ end
617
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
618
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
619
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
620
+ end
621
+ req.body = { **(request_options&.additional_body_parameters || {}), version: version, active: active, description: description }.compact
622
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}"
623
+ end
624
+ Gusto::CompanyBenefit.from_json(json_object: response.body)
625
+ end
626
+ end
627
+ # The following must be true in order to delete a company benefit
628
+ # - There are no employee benefits associated with the company benefit
629
+ # - There are no payroll items associated with the company benefit
630
+ # - The benefit is not managed by a Partner or by Gusto (type must be 'External')
631
+ # scope: `company_benefits:write`
632
+ #
633
+ # @param company_benefit_id [String] The UUID of the company benefit
634
+ # @param request_options [Gusto::RequestOptions]
635
+ # @return [Void]
636
+ # @example
637
+ # api = Gusto::Client.new(
638
+ # base_url: "https://api.example.com",
639
+ # environment: Gusto::Environment::DEMO,
640
+ # token: "YOUR_AUTH_TOKEN"
641
+ # )
642
+ # api.companies.benefits.delete(company_benefit_id: "company_benefit_id")
643
+ def delete(company_benefit_id:, request_options: nil)
644
+ Async do
645
+ response = @request_client.conn.delete do | req |
646
+ unless request_options&.timeout_in_seconds.nil?
647
+ req.options.timeout = request_options.timeout_in_seconds
648
+ end
649
+ unless request_options&.token.nil?
650
+ req.headers["Authorization"] = request_options.token
651
+ end
652
+ unless request_options&.gusto_api_version.nil?
653
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
654
+ end
655
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
656
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
657
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
658
+ end
659
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
660
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
661
+ end
662
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}"
663
+ end
664
+ end
665
+ end
666
+ # Returns summary benefit data for the requested company benefit id.
667
+ # Benefits containing PHI are only visible to applications with the
668
+ # `company_benefits:read:phi` scope.
669
+ # scope: `company_benefits:read`
670
+ #
671
+ # @param company_benefit_id [String] The UUID of the company benefit
672
+ # @param start_date [String] The start date for which to retrieve company benefit summary
673
+ # @param end_date [String] The end date for which to retrieve company benefit summary. If left empty,
674
+ # defaults to today's date.
675
+ # @param detailed [Boolean] Display employee payroll item summary
676
+ # @param request_options [Gusto::RequestOptions]
677
+ # @return [Gusto::CompanyBenefits::BenefitSummary]
678
+ # @example
679
+ # api = Gusto::Client.new(
680
+ # base_url: "https://api.example.com",
681
+ # environment: Gusto::Environment::DEMO,
682
+ # token: "YOUR_AUTH_TOKEN"
683
+ # )
684
+ # api.companies.benefits.get_summary(
685
+ # company_benefit_id: "company_benefit_id",
686
+ # start_date: "2022-01-01",
687
+ # end_date: "2022-12-31"
688
+ # )
689
+ def get_summary(company_benefit_id:, start_date: nil, end_date: nil, detailed: nil, request_options: nil)
690
+ Async do
691
+ response = @request_client.conn.get do | req |
692
+ unless request_options&.timeout_in_seconds.nil?
693
+ req.options.timeout = request_options.timeout_in_seconds
694
+ end
695
+ unless request_options&.token.nil?
696
+ req.headers["Authorization"] = request_options.token
697
+ end
698
+ unless request_options&.gusto_api_version.nil?
699
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
700
+ end
701
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
702
+ req.params = { **(request_options&.additional_query_parameters || {}), "start_date": start_date, "end_date": end_date, "detailed": detailed }.compact
703
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
704
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
705
+ end
706
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/summary"
707
+ end
708
+ Gusto::CompanyBenefits::BenefitSummary.from_json(json_object: response.body)
709
+ end
710
+ end
711
+ # Employee benefits represent an employee enrolled in a particular company
712
+ # benefit. It includes information specific to that employee’s enrollment.
713
+ # Returns an array of all employee benefits enrolled for this company benefit.
714
+ # Benefits containing PHI are only visible to applications with the
715
+ # `employee_benefits:read:phi` scope.
716
+ # scope: `employee_benefits:read`
717
+ #
718
+ # @param company_benefit_id [String] The UUID of the company benefit
719
+ # @param page [Float] The page that is requested. When unspecified, will load all objects unless
720
+ # endpoint forces pagination.
721
+ # @param per [Float] Number of objects per page. For majority of endpoints will default to 25
722
+ # @param request_options [Gusto::RequestOptions]
723
+ # @return [Array<Gusto::EmployeeBenefit>]
724
+ # @example
725
+ # api = Gusto::Client.new(
726
+ # base_url: "https://api.example.com",
727
+ # environment: Gusto::Environment::DEMO,
728
+ # token: "YOUR_AUTH_TOKEN"
729
+ # )
730
+ # api.companies.benefits.list_employee_benefits(company_benefit_id: "company_benefit_id")
731
+ def list_employee_benefits(company_benefit_id:, page: nil, per: nil, request_options: nil)
732
+ Async do
733
+ response = @request_client.conn.get do | req |
734
+ unless request_options&.timeout_in_seconds.nil?
735
+ req.options.timeout = request_options.timeout_in_seconds
736
+ end
737
+ unless request_options&.token.nil?
738
+ req.headers["Authorization"] = request_options.token
739
+ end
740
+ unless request_options&.gusto_api_version.nil?
741
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
742
+ end
743
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
744
+ req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per }.compact
745
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
746
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
747
+ end
748
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/employee_benefits"
749
+ end
750
+ parsed_json = JSON.parse(response.body)
751
+ parsed_json&.map do | item |
752
+ item = item.to_json
753
+ Gusto::EmployeeBenefit.from_json(json_object: item)
754
+ end
755
+ end
756
+ end
757
+ # Employee benefits represent an employee enrolled in a particular company
758
+ # benefit. It includes information specific to that employee’s enrollment.
759
+ # Create or update(if the employee is already enrolled in the company benefit
760
+ # previously) an employee benefit for the company benefit.
761
+ # Benefits containing PHI are only visible to applications with the
762
+ # `employee_benefits:read:phi` scope.
763
+ # scope: `employee_benefits:write`
764
+ #
765
+ # @param company_benefit_id [String] The UUID of the company benefit
766
+ # @param employee_benefits [Array<Hash>] The list of employee benefits to create or updateRequest of type Array<Gusto::EmployeeBenefitForCompanyBenefit>, as a Hash
767
+ # * :employee_uuid (String)
768
+ # * :company_benefit_uuid (String)
769
+ # * :uuid (String)
770
+ # * :version (String)
771
+ # * :active (Boolean)
772
+ # * :employee_deduction (String)
773
+ # * :deduct_as_percentage (Boolean)
774
+ # * :employee_deduction_annual_maximum (String)
775
+ # * :contribution (Hash)
776
+ # * :type (String)
777
+ # * :value (Hash)
778
+ # * :elective (Boolean)
779
+ # * :company_contribution_annual_maximum (String)
780
+ # * :limit_option (String)
781
+ # * :catch_up (Boolean)
782
+ # * :retirement_loan_identifier (String)
783
+ # * :coverage_amount (String)
784
+ # * :deduction_reduces_taxable_income (Gusto::EmployeeBenefitBaseObjectDeductionReducesTaxableIncome)
785
+ # * :coverage_salary_multiplier (String)
786
+ # * :company_contribution (String)
787
+ # * :contribute_as_percentage (Boolean)
788
+ # @param request_options [Gusto::RequestOptions]
789
+ # @return [Array<Gusto::EmployeeBenefit>]
790
+ # @example
791
+ # api = Gusto::Client.new(
792
+ # base_url: "https://api.example.com",
793
+ # environment: Gusto::Environment::DEMO,
794
+ # token: "YOUR_AUTH_TOKEN"
795
+ # )
796
+ # api.companies.benefits.update_employee_benefits(company_benefit_id: "company_benefit_id", employee_benefits: [{ version: "09j3d29jqdpj92109j9j2d90dq", active: true, employee_deduction: "250.00", employee_uuid: "8f9f3f68-8fd3-499d-ade7-4a052e56494e" }])
797
+ def update_employee_benefits(company_benefit_id:, employee_benefits: nil, request_options: nil)
798
+ Async do
799
+ response = @request_client.conn.put do | req |
800
+ unless request_options&.timeout_in_seconds.nil?
801
+ req.options.timeout = request_options.timeout_in_seconds
802
+ end
803
+ unless request_options&.token.nil?
804
+ req.headers["Authorization"] = request_options.token
805
+ end
806
+ unless request_options&.gusto_api_version.nil?
807
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
808
+ end
809
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
810
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
811
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
812
+ end
813
+ req.body = { **(request_options&.additional_body_parameters || {}), employee_benefits: employee_benefits }.compact
814
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/employee_benefits"
815
+ end
816
+ parsed_json = JSON.parse(response.body)
817
+ parsed_json&.map do | item |
818
+ item = item.to_json
819
+ Gusto::EmployeeBenefit.from_json(json_object: item)
820
+ end
821
+ end
822
+ end
823
+ # Returns field requirements for the requested benefit type.
824
+ # scope: `benefits:read`
825
+ #
826
+ # @param benefit_id [String] The benefit type in Gusto.
827
+ # @param request_options [Gusto::RequestOptions]
828
+ # @return [Gusto::CompanyBenefits::BenefitTypeRequirements]
829
+ # @example
830
+ # api = Gusto::Client.new(
831
+ # base_url: "https://api.example.com",
832
+ # environment: Gusto::Environment::DEMO,
833
+ # token: "YOUR_AUTH_TOKEN"
834
+ # )
835
+ # api.companies.benefits.get_requirements(benefit_id: "benefit_id")
836
+ def get_requirements(benefit_id:, request_options: nil)
837
+ Async do
838
+ response = @request_client.conn.get do | req |
839
+ unless request_options&.timeout_in_seconds.nil?
840
+ req.options.timeout = request_options.timeout_in_seconds
841
+ end
842
+ unless request_options&.token.nil?
843
+ req.headers["Authorization"] = request_options.token
844
+ end
845
+ unless request_options&.gusto_api_version.nil?
846
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
847
+ end
848
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
849
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
850
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
851
+ end
852
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
853
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
854
+ end
855
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits/#{benefit_id}/requirements"
856
+ end
857
+ Gusto::CompanyBenefits::BenefitTypeRequirements.from_json(json_object: response.body)
858
+ end
859
+ end
860
+ end
861
+ end
862
+ end