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