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,863 @@
1
+ # frozen_string_literal: true
2
+ require_relative "../../requests"
3
+ require_relative "../types/accruing_time_off_hour"
4
+ require "json"
5
+ require_relative "../types/time_off_policy"
6
+ require_relative "types/time_off_policies_update_request_accrual_method"
7
+ require_relative "types/time_off_policies_create_request_accrual_method"
8
+ require_relative "types/time_off_policies_add_employees_request_employees_item"
9
+ require_relative "types/time_off_policies_remove_employees_request_employees_item"
10
+ require_relative "types/time_off_policies_update_balance_request_employees_item"
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 "async"
20
+ require_relative "../../requests"
21
+
22
+ module Gusto
23
+ class TimeOffPoliciesClient
24
+ # @return [Gusto::RequestClient]
25
+ attr_reader :request_client
26
+
27
+
28
+ # @param request_client [Gusto::RequestClient]
29
+ # @return [Gusto::TimeOffPoliciesClient]
30
+ def initialize(request_client:)
31
+ @request_client = request_client
32
+ end
33
+ # Returns a list of accruing time off for each time off policy associated with the
34
+ # employee.
35
+ # Factors affecting the accrued hours:
36
+ # - the time off policy accrual method (whether they get pay per hour worked, per
37
+ # hour paid, with / without overtime, accumulate time off based on pay period /
38
+ # calendar year / anniversary)
39
+ # - how many hours of work during this pay period
40
+ # - how many hours of PTO / sick hours taken during this pay period (for per hour
41
+ # paid policies only)
42
+ # - company pay schedule frequency (for per pay period)
43
+ # If none of the parameters is passed in, the accrued time off hour will be 0.
44
+ # scope: `payrolls:read`
45
+ #
46
+ # @param payroll_id [String] The UUID of the payroll
47
+ # @param employee_id [String] The UUID of the employee
48
+ # @param regular_hours_worked [Float] regular hours worked in this pay period
49
+ # @param overtime_hours_worked [Float] overtime hours worked in this pay period
50
+ # @param double_overtime_hours_worked [Float] double overtime hours worked in this pay period
51
+ # @param pto_hours_used [Float] paid time off hours used in this pay period
52
+ # @param sick_hours_used [Float] sick hours used in this pay period
53
+ # @param request_options [Gusto::RequestOptions]
54
+ # @return [Array<Gusto::AccruingTimeOffHour>]
55
+ # @example
56
+ # api = Gusto::Client.new(
57
+ # base_url: "https://api.example.com",
58
+ # environment: Gusto::Environment::DEMO,
59
+ # token: "YOUR_AUTH_TOKEN"
60
+ # )
61
+ # api.time_off_policies.calculate_accruing_time_off_hours(
62
+ # payroll_id: "payroll_id",
63
+ # employee_id: "employee_id",
64
+ # regular_hours_worked: 30.25,
65
+ # overtime_hours_worked: 10,
66
+ # double_overtime_hours_worked: 0,
67
+ # pto_hours_used: 5.5,
68
+ # sick_hours_used: 0
69
+ # )
70
+ def calculate_accruing_time_off_hours(payroll_id:, employee_id:, regular_hours_worked: nil, overtime_hours_worked: nil, double_overtime_hours_worked: nil, pto_hours_used: nil, sick_hours_used: nil, request_options: nil)
71
+ response = @request_client.conn.post do | req |
72
+ unless request_options&.timeout_in_seconds.nil?
73
+ req.options.timeout = request_options.timeout_in_seconds
74
+ end
75
+ unless request_options&.token.nil?
76
+ req.headers["Authorization"] = request_options.token
77
+ end
78
+ unless request_options&.gusto_api_version.nil?
79
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
80
+ end
81
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
82
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
83
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
84
+ end
85
+ req.body = { **(request_options&.additional_body_parameters || {}), regular_hours_worked: regular_hours_worked, overtime_hours_worked: overtime_hours_worked, double_overtime_hours_worked: double_overtime_hours_worked, pto_hours_used: pto_hours_used, sick_hours_used: sick_hours_used }.compact
86
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/payrolls/#{payroll_id}/employees/#{employee_id}/calculate_accruing_time_off_hours"
87
+ end
88
+ parsed_json = JSON.parse(response.body)
89
+ parsed_json&.map do | item |
90
+ item = item.to_json
91
+ Gusto::AccruingTimeOffHour.from_json(json_object: item)
92
+ end
93
+ end
94
+ # Get a time off policy
95
+ # scope: `time_off_policies:read`
96
+ #
97
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
98
+ # @param request_options [Gusto::RequestOptions]
99
+ # @return [Gusto::TimeOffPolicy]
100
+ # @example
101
+ # api = Gusto::Client.new(
102
+ # base_url: "https://api.example.com",
103
+ # environment: Gusto::Environment::DEMO,
104
+ # token: "YOUR_AUTH_TOKEN"
105
+ # )
106
+ # api.time_off_policies.get(time_off_policy_uuid: "time_off_policy_uuid")
107
+ def get(time_off_policy_uuid:, request_options: nil)
108
+ response = @request_client.conn.get do | req |
109
+ unless request_options&.timeout_in_seconds.nil?
110
+ req.options.timeout = request_options.timeout_in_seconds
111
+ end
112
+ unless request_options&.token.nil?
113
+ req.headers["Authorization"] = request_options.token
114
+ end
115
+ unless request_options&.gusto_api_version.nil?
116
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
117
+ end
118
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
119
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
120
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
121
+ end
122
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
123
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
124
+ end
125
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}"
126
+ end
127
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
128
+ end
129
+ # Update a time off policy
130
+ # scope: `time_off_policies:write`
131
+ #
132
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
133
+ # @param name [String] Name of the time off policy
134
+ # @param accrual_method [Gusto::TimeOffPolicies::TimeOffPoliciesUpdateRequestAccrualMethod] Accrual method of the time off policy
135
+ # @param accrual_rate [String] The rate at which the time off hours will accrue for an employee on the policy.
136
+ # Represented as a float, e.g. "40.0".
137
+ # @param accrual_rate_unit [String] The number of hours an employee has to work or be paid for to accrue the number
138
+ # of hours set in the accrual rate. Only used for hourly policies (per_hour_paid,
139
+ # per_hour_paid_no_overtime, per_hour_work, per_hour_worked_no_overtime).
140
+ # Represented as a float, e.g. "40.0".
141
+ # @param paid_out_on_termination [Boolean] Boolean representing if an employees accrued time off hours will be paid out on
142
+ # termination
143
+ # @param accrual_waiting_period_days [Integer] Number of days before an employee on the policy will begin accruing time off
144
+ # hours. If accrual_method is per_anniversary_year, per_calendar_year, or
145
+ # unlimited, then accrual_waiting_period_days should be 0.
146
+ # @param carryover_limit_hours [String] The max number of hours and employee can carryover from one year to the next. If
147
+ # accrual_method is unlimited, then carryover_limit_hours must be blank.
148
+ # @param max_accrual_hours_per_year [String] The max number of hours and employee can accrue in a year. If accrual_method is
149
+ # unlimited, then max_accrual_hours_per_year must be blank.
150
+ # @param max_hours [String] The max number of hours an employee can accrue. If accrual_method is unlimited,
151
+ # then max_hours must be blank.
152
+ # @param request_options [Gusto::RequestOptions]
153
+ # @return [Gusto::TimeOffPolicy]
154
+ # @example
155
+ # api = Gusto::Client.new(
156
+ # base_url: "https://api.example.com",
157
+ # environment: Gusto::Environment::DEMO,
158
+ # token: "YOUR_AUTH_TOKEN"
159
+ # )
160
+ # api.time_off_policies.update(
161
+ # time_off_policy_uuid: "time_off_policy_uuid",
162
+ # name: "Hourly Vacation Policy",
163
+ # accrual_method: PER_HOUR_PAID,
164
+ # accrual_rate: "4.0",
165
+ # accrual_rate_unit: "80.0",
166
+ # paid_out_on_termination: true,
167
+ # accrual_waiting_period_days: 30,
168
+ # carryover_limit_hours: "200.0",
169
+ # max_accrual_hours_per_year: "120.0",
170
+ # max_hours: "240.0"
171
+ # )
172
+ def update(time_off_policy_uuid:, name: nil, accrual_method: nil, accrual_rate: nil, accrual_rate_unit: nil, paid_out_on_termination: nil, accrual_waiting_period_days: nil, carryover_limit_hours: nil, max_accrual_hours_per_year: nil, max_hours: nil, request_options: nil)
173
+ response = @request_client.conn.put do | req |
174
+ unless request_options&.timeout_in_seconds.nil?
175
+ req.options.timeout = request_options.timeout_in_seconds
176
+ end
177
+ unless request_options&.token.nil?
178
+ req.headers["Authorization"] = request_options.token
179
+ end
180
+ unless request_options&.gusto_api_version.nil?
181
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
182
+ end
183
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
184
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
185
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
186
+ end
187
+ req.body = { **(request_options&.additional_body_parameters || {}), name: name, accrual_method: accrual_method, accrual_rate: accrual_rate, accrual_rate_unit: accrual_rate_unit, paid_out_on_termination: paid_out_on_termination, accrual_waiting_period_days: accrual_waiting_period_days, carryover_limit_hours: carryover_limit_hours, max_accrual_hours_per_year: max_accrual_hours_per_year, max_hours: max_hours }.compact
188
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}"
189
+ end
190
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
191
+ end
192
+ # Get all time off policies for a company
193
+ # scope: `time_off_policies:read`
194
+ #
195
+ # @param company_uuid [String] The UUID of the company
196
+ # @param request_options [Gusto::RequestOptions]
197
+ # @return [Array<Gusto::TimeOffPolicy>]
198
+ # @example
199
+ # api = Gusto::Client.new(
200
+ # base_url: "https://api.example.com",
201
+ # environment: Gusto::Environment::DEMO,
202
+ # token: "YOUR_AUTH_TOKEN"
203
+ # )
204
+ # api.time_off_policies.list(company_uuid: "company_uuid")
205
+ def list(company_uuid:, request_options: nil)
206
+ response = @request_client.conn.get do | req |
207
+ unless request_options&.timeout_in_seconds.nil?
208
+ req.options.timeout = request_options.timeout_in_seconds
209
+ end
210
+ unless request_options&.token.nil?
211
+ req.headers["Authorization"] = request_options.token
212
+ end
213
+ unless request_options&.gusto_api_version.nil?
214
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
215
+ end
216
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
217
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
218
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
219
+ end
220
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
221
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
222
+ end
223
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_uuid}/time_off_policies"
224
+ end
225
+ parsed_json = JSON.parse(response.body)
226
+ parsed_json&.map do | item |
227
+ item = item.to_json
228
+ Gusto::TimeOffPolicy.from_json(json_object: item)
229
+ end
230
+ end
231
+ # Create a time off policy
232
+ # scope: `time_off_policies:write`
233
+ #
234
+ # @param company_uuid [String] The UUID of the company
235
+ # @param name [String] Name of the time off policy
236
+ # @param policy_type [String] Type of the time off policy. Currently only "vacation" and "sick" are supported
237
+ # @param accrual_method [Gusto::TimeOffPolicies::TimeOffPoliciesCreateRequestAccrualMethod] Accrual method of the time off policy
238
+ # @param accrual_rate [String] The rate at which the time off hours will accrue for an employee on the policy.
239
+ # Represented as a float, e.g. "40.0".
240
+ # @param accrual_rate_unit [String] The number of hours an employee has to work or be paid for to accrue the number
241
+ # of hours set in the accrual rate. Only used for hourly policies (per_hour_paid,
242
+ # per_hour_paid_no_overtime, per_hour_work, per_hour_worked_no_overtime).
243
+ # Represented as a float, e.g. "40.0".
244
+ # @param paid_out_on_termination [Boolean] Boolean representing if an employees accrued time off hours will be paid out on
245
+ # termination
246
+ # @param accrual_waiting_period_days [Integer] Number of days before an employee on the policy will begin accruing time off
247
+ # hours. If accrual_method is per_anniversary_year, per_calendar_year, or
248
+ # unlimited, then accrual_waiting_period_days should be 0.
249
+ # @param carryover_limit_hours [String] The max number of hours and employee can carryover from one year to the next. If
250
+ # accrual_method is unlimited, then carryover_limit_hours must be blank.
251
+ # @param max_accrual_hours_per_year [String] The max number of hours and employee can accrue in a year. If accrual_method is
252
+ # unlimited, then max_accrual_hours_per_year must be blank.
253
+ # @param max_hours [String] The max number of hours an employee can accrue. If accrual_method is unlimited,
254
+ # then max_hours must be blank.
255
+ # @param request_options [Gusto::RequestOptions]
256
+ # @return [Gusto::TimeOffPolicy]
257
+ # @example
258
+ # api = Gusto::Client.new(
259
+ # base_url: "https://api.example.com",
260
+ # environment: Gusto::Environment::DEMO,
261
+ # token: "YOUR_AUTH_TOKEN"
262
+ # )
263
+ # api.time_off_policies.create(
264
+ # company_uuid: "company_uuid",
265
+ # name: "Unlimited Vacation Policy",
266
+ # policy_type: "vacation",
267
+ # accrual_method: UNLIMITED
268
+ # )
269
+ def create(company_uuid:, name:, policy_type:, accrual_method:, accrual_rate: nil, accrual_rate_unit: nil, paid_out_on_termination: nil, accrual_waiting_period_days: nil, carryover_limit_hours: nil, max_accrual_hours_per_year: nil, max_hours: nil, request_options: nil)
270
+ response = @request_client.conn.post 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
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
282
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
283
+ end
284
+ req.body = { **(request_options&.additional_body_parameters || {}), name: name, policy_type: policy_type, accrual_method: accrual_method, accrual_rate: accrual_rate, accrual_rate_unit: accrual_rate_unit, paid_out_on_termination: paid_out_on_termination, accrual_waiting_period_days: accrual_waiting_period_days, carryover_limit_hours: carryover_limit_hours, max_accrual_hours_per_year: max_accrual_hours_per_year, max_hours: max_hours }.compact
285
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_uuid}/time_off_policies"
286
+ end
287
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
288
+ end
289
+ # Add employees to a time off policy. Employees are required to have at least one
290
+ # job to be added to a time off policy. Accepts starting balances for
291
+ # non-unlimited policies
292
+ # scope: `time_off_policies:write`
293
+ #
294
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
295
+ # @param employees [Array<Hash>] Request of type Array<Gusto::TimeOffPolicies::TimeOffPoliciesAddEmployeesRequestEmployeesItem>, as a Hash
296
+ # * :uuid (String)
297
+ # * :balance (String)
298
+ # @param request_options [Gusto::RequestOptions]
299
+ # @return [Gusto::TimeOffPolicy]
300
+ # @example
301
+ # api = Gusto::Client.new(
302
+ # base_url: "https://api.example.com",
303
+ # environment: Gusto::Environment::DEMO,
304
+ # token: "YOUR_AUTH_TOKEN"
305
+ # )
306
+ # api.time_off_policies.add_employees(time_off_policy_uuid: "time_off_policy_uuid")
307
+ def add_employees(time_off_policy_uuid:, employees: nil, request_options: nil)
308
+ response = @request_client.conn.put do | req |
309
+ unless request_options&.timeout_in_seconds.nil?
310
+ req.options.timeout = request_options.timeout_in_seconds
311
+ end
312
+ unless request_options&.token.nil?
313
+ req.headers["Authorization"] = request_options.token
314
+ end
315
+ unless request_options&.gusto_api_version.nil?
316
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
317
+ end
318
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
319
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
320
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
321
+ end
322
+ req.body = { **(request_options&.additional_body_parameters || {}), employees: employees }.compact
323
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}/add_employees"
324
+ end
325
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
326
+ end
327
+ # Remove employees from a time off policy
328
+ # scope: `time_off_policies:write`
329
+ #
330
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
331
+ # @param employees [Array<Hash>] Request of type Array<Gusto::TimeOffPolicies::TimeOffPoliciesRemoveEmployeesRequestEmployeesItem>, as a Hash
332
+ # * :uuid (String)
333
+ # @param request_options [Gusto::RequestOptions]
334
+ # @return [Gusto::TimeOffPolicy]
335
+ # @example
336
+ # api = Gusto::Client.new(
337
+ # base_url: "https://api.example.com",
338
+ # environment: Gusto::Environment::DEMO,
339
+ # token: "YOUR_AUTH_TOKEN"
340
+ # )
341
+ # api.time_off_policies.remove_employees(time_off_policy_uuid: "time_off_policy_uuid")
342
+ def remove_employees(time_off_policy_uuid:, employees: nil, request_options: nil)
343
+ response = @request_client.conn.put do | req |
344
+ unless request_options&.timeout_in_seconds.nil?
345
+ req.options.timeout = request_options.timeout_in_seconds
346
+ end
347
+ unless request_options&.token.nil?
348
+ req.headers["Authorization"] = request_options.token
349
+ end
350
+ unless request_options&.gusto_api_version.nil?
351
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
352
+ end
353
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
354
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
355
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
356
+ end
357
+ req.body = { **(request_options&.additional_body_parameters || {}), employees: employees }.compact
358
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}/remove_employees"
359
+ end
360
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
361
+ end
362
+ # Updates time off hours balances for employees for a time off policy
363
+ # scope: `time_off_policies:write`
364
+ #
365
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
366
+ # @param employees [Array<Hash>] Request of type Array<Gusto::TimeOffPolicies::TimeOffPoliciesUpdateBalanceRequestEmployeesItem>, as a Hash
367
+ # * :uuid (String)
368
+ # * :balance (String)
369
+ # @param request_options [Gusto::RequestOptions]
370
+ # @return [Gusto::TimeOffPolicy]
371
+ # @example
372
+ # api = Gusto::Client.new(
373
+ # base_url: "https://api.example.com",
374
+ # environment: Gusto::Environment::DEMO,
375
+ # token: "YOUR_AUTH_TOKEN"
376
+ # )
377
+ # api.time_off_policies.update_balance(time_off_policy_uuid: "time_off_policy_uuid")
378
+ def update_balance(time_off_policy_uuid:, employees: nil, request_options: nil)
379
+ response = @request_client.conn.put do | req |
380
+ unless request_options&.timeout_in_seconds.nil?
381
+ req.options.timeout = request_options.timeout_in_seconds
382
+ end
383
+ unless request_options&.token.nil?
384
+ req.headers["Authorization"] = request_options.token
385
+ end
386
+ unless request_options&.gusto_api_version.nil?
387
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
388
+ end
389
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
390
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
391
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
392
+ end
393
+ req.body = { **(request_options&.additional_body_parameters || {}), employees: employees }.compact
394
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}/balance"
395
+ end
396
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
397
+ end
398
+ # Deactivate a time off policy
399
+ # scope: `time_off_policies:write`
400
+ #
401
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
402
+ # @param request_options [Gusto::RequestOptions]
403
+ # @return [Gusto::TimeOffPolicy]
404
+ # @example
405
+ # api = Gusto::Client.new(
406
+ # base_url: "https://api.example.com",
407
+ # environment: Gusto::Environment::DEMO,
408
+ # token: "YOUR_AUTH_TOKEN"
409
+ # )
410
+ # api.time_off_policies.deactivate(time_off_policy_uuid: "time_off_policy_uuid")
411
+ def deactivate(time_off_policy_uuid:, request_options: nil)
412
+ response = @request_client.conn.put do | req |
413
+ unless request_options&.timeout_in_seconds.nil?
414
+ req.options.timeout = request_options.timeout_in_seconds
415
+ end
416
+ unless request_options&.token.nil?
417
+ req.headers["Authorization"] = request_options.token
418
+ end
419
+ unless request_options&.gusto_api_version.nil?
420
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
421
+ end
422
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
423
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
424
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
425
+ end
426
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
427
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
428
+ end
429
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}/deactivate"
430
+ end
431
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
432
+ end
433
+ end
434
+ class AsyncTimeOffPoliciesClient
435
+ # @return [Gusto::AsyncRequestClient]
436
+ attr_reader :request_client
437
+
438
+
439
+ # @param request_client [Gusto::RequestClient]
440
+ # @return [Gusto::AsyncTimeOffPoliciesClient]
441
+ def initialize(request_client:)
442
+ @request_client = request_client
443
+ end
444
+ # Returns a list of accruing time off for each time off policy associated with the
445
+ # employee.
446
+ # Factors affecting the accrued hours:
447
+ # - the time off policy accrual method (whether they get pay per hour worked, per
448
+ # hour paid, with / without overtime, accumulate time off based on pay period /
449
+ # calendar year / anniversary)
450
+ # - how many hours of work during this pay period
451
+ # - how many hours of PTO / sick hours taken during this pay period (for per hour
452
+ # paid policies only)
453
+ # - company pay schedule frequency (for per pay period)
454
+ # If none of the parameters is passed in, the accrued time off hour will be 0.
455
+ # scope: `payrolls:read`
456
+ #
457
+ # @param payroll_id [String] The UUID of the payroll
458
+ # @param employee_id [String] The UUID of the employee
459
+ # @param regular_hours_worked [Float] regular hours worked in this pay period
460
+ # @param overtime_hours_worked [Float] overtime hours worked in this pay period
461
+ # @param double_overtime_hours_worked [Float] double overtime hours worked in this pay period
462
+ # @param pto_hours_used [Float] paid time off hours used in this pay period
463
+ # @param sick_hours_used [Float] sick hours used in this pay period
464
+ # @param request_options [Gusto::RequestOptions]
465
+ # @return [Array<Gusto::AccruingTimeOffHour>]
466
+ # @example
467
+ # api = Gusto::Client.new(
468
+ # base_url: "https://api.example.com",
469
+ # environment: Gusto::Environment::DEMO,
470
+ # token: "YOUR_AUTH_TOKEN"
471
+ # )
472
+ # api.time_off_policies.calculate_accruing_time_off_hours(
473
+ # payroll_id: "payroll_id",
474
+ # employee_id: "employee_id",
475
+ # regular_hours_worked: 30.25,
476
+ # overtime_hours_worked: 10,
477
+ # double_overtime_hours_worked: 0,
478
+ # pto_hours_used: 5.5,
479
+ # sick_hours_used: 0
480
+ # )
481
+ def calculate_accruing_time_off_hours(payroll_id:, employee_id:, regular_hours_worked: nil, overtime_hours_worked: nil, double_overtime_hours_worked: nil, pto_hours_used: nil, sick_hours_used: nil, request_options: nil)
482
+ Async do
483
+ response = @request_client.conn.post do | req |
484
+ unless request_options&.timeout_in_seconds.nil?
485
+ req.options.timeout = request_options.timeout_in_seconds
486
+ end
487
+ unless request_options&.token.nil?
488
+ req.headers["Authorization"] = request_options.token
489
+ end
490
+ unless request_options&.gusto_api_version.nil?
491
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
492
+ end
493
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
494
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
495
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
496
+ end
497
+ req.body = { **(request_options&.additional_body_parameters || {}), regular_hours_worked: regular_hours_worked, overtime_hours_worked: overtime_hours_worked, double_overtime_hours_worked: double_overtime_hours_worked, pto_hours_used: pto_hours_used, sick_hours_used: sick_hours_used }.compact
498
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/payrolls/#{payroll_id}/employees/#{employee_id}/calculate_accruing_time_off_hours"
499
+ end
500
+ parsed_json = JSON.parse(response.body)
501
+ parsed_json&.map do | item |
502
+ item = item.to_json
503
+ Gusto::AccruingTimeOffHour.from_json(json_object: item)
504
+ end
505
+ end
506
+ end
507
+ # Get a time off policy
508
+ # scope: `time_off_policies:read`
509
+ #
510
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
511
+ # @param request_options [Gusto::RequestOptions]
512
+ # @return [Gusto::TimeOffPolicy]
513
+ # @example
514
+ # api = Gusto::Client.new(
515
+ # base_url: "https://api.example.com",
516
+ # environment: Gusto::Environment::DEMO,
517
+ # token: "YOUR_AUTH_TOKEN"
518
+ # )
519
+ # api.time_off_policies.get(time_off_policy_uuid: "time_off_policy_uuid")
520
+ def get(time_off_policy_uuid:, request_options: nil)
521
+ Async do
522
+ response = @request_client.conn.get do | req |
523
+ unless request_options&.timeout_in_seconds.nil?
524
+ req.options.timeout = request_options.timeout_in_seconds
525
+ end
526
+ unless request_options&.token.nil?
527
+ req.headers["Authorization"] = request_options.token
528
+ end
529
+ unless request_options&.gusto_api_version.nil?
530
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
531
+ end
532
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
533
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
534
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
535
+ end
536
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
537
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
538
+ end
539
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}"
540
+ end
541
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
542
+ end
543
+ end
544
+ # Update a time off policy
545
+ # scope: `time_off_policies:write`
546
+ #
547
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
548
+ # @param name [String] Name of the time off policy
549
+ # @param accrual_method [Gusto::TimeOffPolicies::TimeOffPoliciesUpdateRequestAccrualMethod] Accrual method of the time off policy
550
+ # @param accrual_rate [String] The rate at which the time off hours will accrue for an employee on the policy.
551
+ # Represented as a float, e.g. "40.0".
552
+ # @param accrual_rate_unit [String] The number of hours an employee has to work or be paid for to accrue the number
553
+ # of hours set in the accrual rate. Only used for hourly policies (per_hour_paid,
554
+ # per_hour_paid_no_overtime, per_hour_work, per_hour_worked_no_overtime).
555
+ # Represented as a float, e.g. "40.0".
556
+ # @param paid_out_on_termination [Boolean] Boolean representing if an employees accrued time off hours will be paid out on
557
+ # termination
558
+ # @param accrual_waiting_period_days [Integer] Number of days before an employee on the policy will begin accruing time off
559
+ # hours. If accrual_method is per_anniversary_year, per_calendar_year, or
560
+ # unlimited, then accrual_waiting_period_days should be 0.
561
+ # @param carryover_limit_hours [String] The max number of hours and employee can carryover from one year to the next. If
562
+ # accrual_method is unlimited, then carryover_limit_hours must be blank.
563
+ # @param max_accrual_hours_per_year [String] The max number of hours and employee can accrue in a year. If accrual_method is
564
+ # unlimited, then max_accrual_hours_per_year must be blank.
565
+ # @param max_hours [String] The max number of hours an employee can accrue. If accrual_method is unlimited,
566
+ # then max_hours must be blank.
567
+ # @param request_options [Gusto::RequestOptions]
568
+ # @return [Gusto::TimeOffPolicy]
569
+ # @example
570
+ # api = Gusto::Client.new(
571
+ # base_url: "https://api.example.com",
572
+ # environment: Gusto::Environment::DEMO,
573
+ # token: "YOUR_AUTH_TOKEN"
574
+ # )
575
+ # api.time_off_policies.update(
576
+ # time_off_policy_uuid: "time_off_policy_uuid",
577
+ # name: "Hourly Vacation Policy",
578
+ # accrual_method: PER_HOUR_PAID,
579
+ # accrual_rate: "4.0",
580
+ # accrual_rate_unit: "80.0",
581
+ # paid_out_on_termination: true,
582
+ # accrual_waiting_period_days: 30,
583
+ # carryover_limit_hours: "200.0",
584
+ # max_accrual_hours_per_year: "120.0",
585
+ # max_hours: "240.0"
586
+ # )
587
+ def update(time_off_policy_uuid:, name: nil, accrual_method: nil, accrual_rate: nil, accrual_rate_unit: nil, paid_out_on_termination: nil, accrual_waiting_period_days: nil, carryover_limit_hours: nil, max_accrual_hours_per_year: nil, max_hours: nil, request_options: nil)
588
+ Async do
589
+ response = @request_client.conn.put do | req |
590
+ unless request_options&.timeout_in_seconds.nil?
591
+ req.options.timeout = request_options.timeout_in_seconds
592
+ end
593
+ unless request_options&.token.nil?
594
+ req.headers["Authorization"] = request_options.token
595
+ end
596
+ unless request_options&.gusto_api_version.nil?
597
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
598
+ end
599
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
600
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
601
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
602
+ end
603
+ req.body = { **(request_options&.additional_body_parameters || {}), name: name, accrual_method: accrual_method, accrual_rate: accrual_rate, accrual_rate_unit: accrual_rate_unit, paid_out_on_termination: paid_out_on_termination, accrual_waiting_period_days: accrual_waiting_period_days, carryover_limit_hours: carryover_limit_hours, max_accrual_hours_per_year: max_accrual_hours_per_year, max_hours: max_hours }.compact
604
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}"
605
+ end
606
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
607
+ end
608
+ end
609
+ # Get all time off policies for a company
610
+ # scope: `time_off_policies:read`
611
+ #
612
+ # @param company_uuid [String] The UUID of the company
613
+ # @param request_options [Gusto::RequestOptions]
614
+ # @return [Array<Gusto::TimeOffPolicy>]
615
+ # @example
616
+ # api = Gusto::Client.new(
617
+ # base_url: "https://api.example.com",
618
+ # environment: Gusto::Environment::DEMO,
619
+ # token: "YOUR_AUTH_TOKEN"
620
+ # )
621
+ # api.time_off_policies.list(company_uuid: "company_uuid")
622
+ def list(company_uuid:, request_options: nil)
623
+ Async do
624
+ response = @request_client.conn.get do | req |
625
+ unless request_options&.timeout_in_seconds.nil?
626
+ req.options.timeout = request_options.timeout_in_seconds
627
+ end
628
+ unless request_options&.token.nil?
629
+ req.headers["Authorization"] = request_options.token
630
+ end
631
+ unless request_options&.gusto_api_version.nil?
632
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
633
+ end
634
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
635
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
636
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
637
+ end
638
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
639
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
640
+ end
641
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_uuid}/time_off_policies"
642
+ end
643
+ parsed_json = JSON.parse(response.body)
644
+ parsed_json&.map do | item |
645
+ item = item.to_json
646
+ Gusto::TimeOffPolicy.from_json(json_object: item)
647
+ end
648
+ end
649
+ end
650
+ # Create a time off policy
651
+ # scope: `time_off_policies:write`
652
+ #
653
+ # @param company_uuid [String] The UUID of the company
654
+ # @param name [String] Name of the time off policy
655
+ # @param policy_type [String] Type of the time off policy. Currently only "vacation" and "sick" are supported
656
+ # @param accrual_method [Gusto::TimeOffPolicies::TimeOffPoliciesCreateRequestAccrualMethod] Accrual method of the time off policy
657
+ # @param accrual_rate [String] The rate at which the time off hours will accrue for an employee on the policy.
658
+ # Represented as a float, e.g. "40.0".
659
+ # @param accrual_rate_unit [String] The number of hours an employee has to work or be paid for to accrue the number
660
+ # of hours set in the accrual rate. Only used for hourly policies (per_hour_paid,
661
+ # per_hour_paid_no_overtime, per_hour_work, per_hour_worked_no_overtime).
662
+ # Represented as a float, e.g. "40.0".
663
+ # @param paid_out_on_termination [Boolean] Boolean representing if an employees accrued time off hours will be paid out on
664
+ # termination
665
+ # @param accrual_waiting_period_days [Integer] Number of days before an employee on the policy will begin accruing time off
666
+ # hours. If accrual_method is per_anniversary_year, per_calendar_year, or
667
+ # unlimited, then accrual_waiting_period_days should be 0.
668
+ # @param carryover_limit_hours [String] The max number of hours and employee can carryover from one year to the next. If
669
+ # accrual_method is unlimited, then carryover_limit_hours must be blank.
670
+ # @param max_accrual_hours_per_year [String] The max number of hours and employee can accrue in a year. If accrual_method is
671
+ # unlimited, then max_accrual_hours_per_year must be blank.
672
+ # @param max_hours [String] The max number of hours an employee can accrue. If accrual_method is unlimited,
673
+ # then max_hours must be blank.
674
+ # @param request_options [Gusto::RequestOptions]
675
+ # @return [Gusto::TimeOffPolicy]
676
+ # @example
677
+ # api = Gusto::Client.new(
678
+ # base_url: "https://api.example.com",
679
+ # environment: Gusto::Environment::DEMO,
680
+ # token: "YOUR_AUTH_TOKEN"
681
+ # )
682
+ # api.time_off_policies.create(
683
+ # company_uuid: "company_uuid",
684
+ # name: "Unlimited Vacation Policy",
685
+ # policy_type: "vacation",
686
+ # accrual_method: UNLIMITED
687
+ # )
688
+ def create(company_uuid:, name:, policy_type:, accrual_method:, accrual_rate: nil, accrual_rate_unit: nil, paid_out_on_termination: nil, accrual_waiting_period_days: nil, carryover_limit_hours: nil, max_accrual_hours_per_year: nil, max_hours: nil, request_options: nil)
689
+ Async do
690
+ response = @request_client.conn.post do | req |
691
+ unless request_options&.timeout_in_seconds.nil?
692
+ req.options.timeout = request_options.timeout_in_seconds
693
+ end
694
+ unless request_options&.token.nil?
695
+ req.headers["Authorization"] = request_options.token
696
+ end
697
+ unless request_options&.gusto_api_version.nil?
698
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
699
+ end
700
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
701
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
702
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
703
+ end
704
+ req.body = { **(request_options&.additional_body_parameters || {}), name: name, policy_type: policy_type, accrual_method: accrual_method, accrual_rate: accrual_rate, accrual_rate_unit: accrual_rate_unit, paid_out_on_termination: paid_out_on_termination, accrual_waiting_period_days: accrual_waiting_period_days, carryover_limit_hours: carryover_limit_hours, max_accrual_hours_per_year: max_accrual_hours_per_year, max_hours: max_hours }.compact
705
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_uuid}/time_off_policies"
706
+ end
707
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
708
+ end
709
+ end
710
+ # Add employees to a time off policy. Employees are required to have at least one
711
+ # job to be added to a time off policy. Accepts starting balances for
712
+ # non-unlimited policies
713
+ # scope: `time_off_policies:write`
714
+ #
715
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
716
+ # @param employees [Array<Hash>] Request of type Array<Gusto::TimeOffPolicies::TimeOffPoliciesAddEmployeesRequestEmployeesItem>, as a Hash
717
+ # * :uuid (String)
718
+ # * :balance (String)
719
+ # @param request_options [Gusto::RequestOptions]
720
+ # @return [Gusto::TimeOffPolicy]
721
+ # @example
722
+ # api = Gusto::Client.new(
723
+ # base_url: "https://api.example.com",
724
+ # environment: Gusto::Environment::DEMO,
725
+ # token: "YOUR_AUTH_TOKEN"
726
+ # )
727
+ # api.time_off_policies.add_employees(time_off_policy_uuid: "time_off_policy_uuid")
728
+ def add_employees(time_off_policy_uuid:, employees: nil, request_options: nil)
729
+ Async do
730
+ response = @request_client.conn.put do | req |
731
+ unless request_options&.timeout_in_seconds.nil?
732
+ req.options.timeout = request_options.timeout_in_seconds
733
+ end
734
+ unless request_options&.token.nil?
735
+ req.headers["Authorization"] = request_options.token
736
+ end
737
+ unless request_options&.gusto_api_version.nil?
738
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
739
+ end
740
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
741
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
742
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
743
+ end
744
+ req.body = { **(request_options&.additional_body_parameters || {}), employees: employees }.compact
745
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}/add_employees"
746
+ end
747
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
748
+ end
749
+ end
750
+ # Remove employees from a time off policy
751
+ # scope: `time_off_policies:write`
752
+ #
753
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
754
+ # @param employees [Array<Hash>] Request of type Array<Gusto::TimeOffPolicies::TimeOffPoliciesRemoveEmployeesRequestEmployeesItem>, as a Hash
755
+ # * :uuid (String)
756
+ # @param request_options [Gusto::RequestOptions]
757
+ # @return [Gusto::TimeOffPolicy]
758
+ # @example
759
+ # api = Gusto::Client.new(
760
+ # base_url: "https://api.example.com",
761
+ # environment: Gusto::Environment::DEMO,
762
+ # token: "YOUR_AUTH_TOKEN"
763
+ # )
764
+ # api.time_off_policies.remove_employees(time_off_policy_uuid: "time_off_policy_uuid")
765
+ def remove_employees(time_off_policy_uuid:, employees: nil, request_options: nil)
766
+ Async do
767
+ response = @request_client.conn.put do | req |
768
+ unless request_options&.timeout_in_seconds.nil?
769
+ req.options.timeout = request_options.timeout_in_seconds
770
+ end
771
+ unless request_options&.token.nil?
772
+ req.headers["Authorization"] = request_options.token
773
+ end
774
+ unless request_options&.gusto_api_version.nil?
775
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
776
+ end
777
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
778
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
779
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
780
+ end
781
+ req.body = { **(request_options&.additional_body_parameters || {}), employees: employees }.compact
782
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}/remove_employees"
783
+ end
784
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
785
+ end
786
+ end
787
+ # Updates time off hours balances for employees for a time off policy
788
+ # scope: `time_off_policies:write`
789
+ #
790
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
791
+ # @param employees [Array<Hash>] Request of type Array<Gusto::TimeOffPolicies::TimeOffPoliciesUpdateBalanceRequestEmployeesItem>, as a Hash
792
+ # * :uuid (String)
793
+ # * :balance (String)
794
+ # @param request_options [Gusto::RequestOptions]
795
+ # @return [Gusto::TimeOffPolicy]
796
+ # @example
797
+ # api = Gusto::Client.new(
798
+ # base_url: "https://api.example.com",
799
+ # environment: Gusto::Environment::DEMO,
800
+ # token: "YOUR_AUTH_TOKEN"
801
+ # )
802
+ # api.time_off_policies.update_balance(time_off_policy_uuid: "time_off_policy_uuid")
803
+ def update_balance(time_off_policy_uuid:, employees: nil, request_options: nil)
804
+ Async do
805
+ response = @request_client.conn.put do | req |
806
+ unless request_options&.timeout_in_seconds.nil?
807
+ req.options.timeout = request_options.timeout_in_seconds
808
+ end
809
+ unless request_options&.token.nil?
810
+ req.headers["Authorization"] = request_options.token
811
+ end
812
+ unless request_options&.gusto_api_version.nil?
813
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
814
+ end
815
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
816
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
817
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
818
+ end
819
+ req.body = { **(request_options&.additional_body_parameters || {}), employees: employees }.compact
820
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}/balance"
821
+ end
822
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
823
+ end
824
+ end
825
+ # Deactivate a time off policy
826
+ # scope: `time_off_policies:write`
827
+ #
828
+ # @param time_off_policy_uuid [String] The UUID of the company time off policy
829
+ # @param request_options [Gusto::RequestOptions]
830
+ # @return [Gusto::TimeOffPolicy]
831
+ # @example
832
+ # api = Gusto::Client.new(
833
+ # base_url: "https://api.example.com",
834
+ # environment: Gusto::Environment::DEMO,
835
+ # token: "YOUR_AUTH_TOKEN"
836
+ # )
837
+ # api.time_off_policies.deactivate(time_off_policy_uuid: "time_off_policy_uuid")
838
+ def deactivate(time_off_policy_uuid:, request_options: nil)
839
+ Async do
840
+ response = @request_client.conn.put do | req |
841
+ unless request_options&.timeout_in_seconds.nil?
842
+ req.options.timeout = request_options.timeout_in_seconds
843
+ end
844
+ unless request_options&.token.nil?
845
+ req.headers["Authorization"] = request_options.token
846
+ end
847
+ unless request_options&.gusto_api_version.nil?
848
+ req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
849
+ end
850
+ req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
851
+ unless request_options.nil? || request_options&.additional_query_parameters.nil?
852
+ req.params = { **(request_options&.additional_query_parameters || {}) }.compact
853
+ end
854
+ unless request_options.nil? || request_options&.additional_body_parameters.nil?
855
+ req.body = { **(request_options&.additional_body_parameters || {}) }.compact
856
+ end
857
+ req.url "#{@request_client.get_url(request_options: request_options)}/v1/time_off_policies/#{time_off_policy_uuid}/deactivate"
858
+ end
859
+ Gusto::TimeOffPolicy.from_json(json_object: response.body)
860
+ end
861
+ end
862
+ end
863
+ end