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,862 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require_relative "../../../requests"
|
3
|
+
require_relative "../../types/supported_benefit"
|
4
|
+
require "json"
|
5
|
+
require_relative "../../types/company_benefit"
|
6
|
+
require_relative "../../company_benefits/types/benefit_summary"
|
7
|
+
require_relative "../../types/employee_benefit"
|
8
|
+
require_relative "../../types/employee_benefit_for_company_benefit"
|
9
|
+
require_relative "../../company_benefits/types/benefit_type_requirements"
|
10
|
+
require "async"
|
11
|
+
require "async"
|
12
|
+
require "async"
|
13
|
+
require "async"
|
14
|
+
require "async"
|
15
|
+
require "async"
|
16
|
+
require "async"
|
17
|
+
require "async"
|
18
|
+
require "async"
|
19
|
+
require_relative "../../../requests"
|
20
|
+
|
21
|
+
module Gusto
|
22
|
+
module Companies
|
23
|
+
class BenefitsClient
|
24
|
+
# @return [Gusto::RequestClient]
|
25
|
+
attr_reader :request_client
|
26
|
+
|
27
|
+
|
28
|
+
# @param request_client [Gusto::RequestClient]
|
29
|
+
# @return [Gusto::Companies::BenefitsClient]
|
30
|
+
def initialize(request_client:)
|
31
|
+
@request_client = request_client
|
32
|
+
end
|
33
|
+
# Returns all benefits supported by Gusto.
|
34
|
+
# The benefit object in Gusto contains high level information about a particular
|
35
|
+
# benefit type and its tax considerations. When companies choose to offer a
|
36
|
+
# benefit, they are creating a Company Benefit object associated with a particular
|
37
|
+
# benefit.
|
38
|
+
# scope: `benefits:read`
|
39
|
+
#
|
40
|
+
# @param request_options [Gusto::RequestOptions]
|
41
|
+
# @return [Array<Gusto::SupportedBenefit>]
|
42
|
+
# @example
|
43
|
+
# api = Gusto::Client.new(
|
44
|
+
# base_url: "https://api.example.com",
|
45
|
+
# environment: Gusto::Environment::DEMO,
|
46
|
+
# token: "YOUR_AUTH_TOKEN"
|
47
|
+
# )
|
48
|
+
# api.companies.benefits.list
|
49
|
+
def list(request_options: nil)
|
50
|
+
response = @request_client.conn.get do | req |
|
51
|
+
unless request_options&.timeout_in_seconds.nil?
|
52
|
+
req.options.timeout = request_options.timeout_in_seconds
|
53
|
+
end
|
54
|
+
unless request_options&.token.nil?
|
55
|
+
req.headers["Authorization"] = request_options.token
|
56
|
+
end
|
57
|
+
unless request_options&.gusto_api_version.nil?
|
58
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
59
|
+
end
|
60
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
61
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
62
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
63
|
+
end
|
64
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
65
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
66
|
+
end
|
67
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits"
|
68
|
+
end
|
69
|
+
parsed_json = JSON.parse(response.body)
|
70
|
+
parsed_json&.map do | item |
|
71
|
+
item = item.to_json
|
72
|
+
Gusto::SupportedBenefit.from_json(json_object: item)
|
73
|
+
end
|
74
|
+
end
|
75
|
+
# Company benefits represent the benefits that a company is offering to employees.
|
76
|
+
# This ties together a particular supported benefit with the company-specific
|
77
|
+
# information for the offering of that benefit.
|
78
|
+
# Note that company benefits can be deactivated only when no employees are
|
79
|
+
# enrolled.
|
80
|
+
# scope: `company_benefits:write`
|
81
|
+
#
|
82
|
+
# @param company_id [String] The UUID of the company
|
83
|
+
# @param benefit_type [Float] The ID of the benefit to which the company benefit belongs.
|
84
|
+
# @param active [Boolean] Whether this benefit is active for employee participation.
|
85
|
+
# @param description [String] The description of the company benefit.For example, a company may offer multiple
|
86
|
+
# benefits with an ID of 1 (for Medical Insurance). The description would show
|
87
|
+
# something more specific like “Kaiser Permanente” or “Blue Cross/ Blue Shield”.
|
88
|
+
# @param responsible_for_employer_taxes [Boolean] Whether the employer is subject to pay employer taxes when an employee is on
|
89
|
+
# leave. Only applicable to third party sick pay benefits.
|
90
|
+
# @param responsible_for_employee_w2 [Boolean] Whether the employer is subject to file W-2 forms for an employee on leave. Only
|
91
|
+
# applicable to third party sick pay benefits.
|
92
|
+
# @param request_options [Gusto::RequestOptions]
|
93
|
+
# @return [Gusto::CompanyBenefit]
|
94
|
+
# @example
|
95
|
+
# api = Gusto::Client.new(
|
96
|
+
# base_url: "https://api.example.com",
|
97
|
+
# environment: Gusto::Environment::DEMO,
|
98
|
+
# token: "YOUR_AUTH_TOKEN"
|
99
|
+
# )
|
100
|
+
# api.companies.benefits.create(company_id: "company_id", description: "description")
|
101
|
+
def create(company_id:, benefit_type: nil, active: nil, description:, responsible_for_employer_taxes: nil, responsible_for_employee_w2: nil, request_options: nil)
|
102
|
+
response = @request_client.conn.post do | req |
|
103
|
+
unless request_options&.timeout_in_seconds.nil?
|
104
|
+
req.options.timeout = request_options.timeout_in_seconds
|
105
|
+
end
|
106
|
+
unless request_options&.token.nil?
|
107
|
+
req.headers["Authorization"] = request_options.token
|
108
|
+
end
|
109
|
+
unless request_options&.gusto_api_version.nil?
|
110
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
111
|
+
end
|
112
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
113
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
114
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
115
|
+
end
|
116
|
+
req.body = { **(request_options&.additional_body_parameters || {}), benefit_type: benefit_type, active: active, description: description, responsible_for_employer_taxes: responsible_for_employer_taxes, responsible_for_employee_w2: responsible_for_employee_w2 }.compact
|
117
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/company_benefits"
|
118
|
+
end
|
119
|
+
Gusto::CompanyBenefit.from_json(json_object: response.body)
|
120
|
+
end
|
121
|
+
# Returns a benefit supported by Gusto.
|
122
|
+
# The benefit object in Gusto contains high level information about a particular
|
123
|
+
# benefit type and its tax considerations. When companies choose to offer a
|
124
|
+
# benefit, they are creating a Company Benefit object associated with a particular
|
125
|
+
# benefit.
|
126
|
+
# scope: `benefits:read`
|
127
|
+
#
|
128
|
+
# @param benefit_id [String] The benefit type in Gusto.
|
129
|
+
# @param request_options [Gusto::RequestOptions]
|
130
|
+
# @return [Gusto::SupportedBenefit]
|
131
|
+
# @example
|
132
|
+
# api = Gusto::Client.new(
|
133
|
+
# base_url: "https://api.example.com",
|
134
|
+
# environment: Gusto::Environment::DEMO,
|
135
|
+
# token: "YOUR_AUTH_TOKEN"
|
136
|
+
# )
|
137
|
+
# api.companies.benefits.get(benefit_id: "benefit_id")
|
138
|
+
def get(benefit_id:, request_options: nil)
|
139
|
+
response = @request_client.conn.get do | req |
|
140
|
+
unless request_options&.timeout_in_seconds.nil?
|
141
|
+
req.options.timeout = request_options.timeout_in_seconds
|
142
|
+
end
|
143
|
+
unless request_options&.token.nil?
|
144
|
+
req.headers["Authorization"] = request_options.token
|
145
|
+
end
|
146
|
+
unless request_options&.gusto_api_version.nil?
|
147
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
148
|
+
end
|
149
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
150
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
151
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
152
|
+
end
|
153
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
154
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
155
|
+
end
|
156
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits/#{benefit_id}"
|
157
|
+
end
|
158
|
+
Gusto::SupportedBenefit.from_json(json_object: response.body)
|
159
|
+
end
|
160
|
+
# Company benefits represent the benefits that a company is offering to employees.
|
161
|
+
# This ties together a particular supported benefit with the company-specific
|
162
|
+
# information for the offering of that benefit.
|
163
|
+
# Note that company benefits can be deactivated only when no employees are
|
164
|
+
# enrolled.
|
165
|
+
# scope: `company_benefits:write`
|
166
|
+
#
|
167
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
168
|
+
# @param version [String] The current version of the object. See the [versioning
|
169
|
+
# guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for
|
170
|
+
# information on how to use this field.
|
171
|
+
# @param active [Boolean] Whether this benefit is active for employee participation. Company benefits may
|
172
|
+
# only be deactivated if no employees are actively participating.
|
173
|
+
# @param description [String] The description of the company benefit.For example, a company may offer multiple
|
174
|
+
# benefits with an ID of 1 (for Medical Insurance). The description would show
|
175
|
+
# something more specific like “Kaiser Permanente” or “Blue Cross/ Blue Shield”.
|
176
|
+
# @param request_options [Gusto::RequestOptions]
|
177
|
+
# @return [Gusto::CompanyBenefit]
|
178
|
+
# @example
|
179
|
+
# api = Gusto::Client.new(
|
180
|
+
# base_url: "https://api.example.com",
|
181
|
+
# environment: Gusto::Environment::DEMO,
|
182
|
+
# token: "YOUR_AUTH_TOKEN"
|
183
|
+
# )
|
184
|
+
# api.companies.benefits.update(
|
185
|
+
# company_benefit_id: "company_benefit_id",
|
186
|
+
# version: "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872",
|
187
|
+
# active: false
|
188
|
+
# )
|
189
|
+
def update(company_benefit_id:, version:, active: nil, description: nil, request_options: nil)
|
190
|
+
response = @request_client.conn.put do | req |
|
191
|
+
unless request_options&.timeout_in_seconds.nil?
|
192
|
+
req.options.timeout = request_options.timeout_in_seconds
|
193
|
+
end
|
194
|
+
unless request_options&.token.nil?
|
195
|
+
req.headers["Authorization"] = request_options.token
|
196
|
+
end
|
197
|
+
unless request_options&.gusto_api_version.nil?
|
198
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
199
|
+
end
|
200
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
201
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
202
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
203
|
+
end
|
204
|
+
req.body = { **(request_options&.additional_body_parameters || {}), version: version, active: active, description: description }.compact
|
205
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}"
|
206
|
+
end
|
207
|
+
Gusto::CompanyBenefit.from_json(json_object: response.body)
|
208
|
+
end
|
209
|
+
# The following must be true in order to delete a company benefit
|
210
|
+
# - There are no employee benefits associated with the company benefit
|
211
|
+
# - There are no payroll items associated with the company benefit
|
212
|
+
# - The benefit is not managed by a Partner or by Gusto (type must be 'External')
|
213
|
+
# scope: `company_benefits:write`
|
214
|
+
#
|
215
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
216
|
+
# @param request_options [Gusto::RequestOptions]
|
217
|
+
# @return [Void]
|
218
|
+
# @example
|
219
|
+
# api = Gusto::Client.new(
|
220
|
+
# base_url: "https://api.example.com",
|
221
|
+
# environment: Gusto::Environment::DEMO,
|
222
|
+
# token: "YOUR_AUTH_TOKEN"
|
223
|
+
# )
|
224
|
+
# api.companies.benefits.delete(company_benefit_id: "company_benefit_id")
|
225
|
+
def delete(company_benefit_id:, request_options: nil)
|
226
|
+
response = @request_client.conn.delete do | req |
|
227
|
+
unless request_options&.timeout_in_seconds.nil?
|
228
|
+
req.options.timeout = request_options.timeout_in_seconds
|
229
|
+
end
|
230
|
+
unless request_options&.token.nil?
|
231
|
+
req.headers["Authorization"] = request_options.token
|
232
|
+
end
|
233
|
+
unless request_options&.gusto_api_version.nil?
|
234
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
235
|
+
end
|
236
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
237
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
238
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
239
|
+
end
|
240
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
241
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
242
|
+
end
|
243
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}"
|
244
|
+
end
|
245
|
+
end
|
246
|
+
# Returns summary benefit data for the requested company benefit id.
|
247
|
+
# Benefits containing PHI are only visible to applications with the
|
248
|
+
# `company_benefits:read:phi` scope.
|
249
|
+
# scope: `company_benefits:read`
|
250
|
+
#
|
251
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
252
|
+
# @param start_date [String] The start date for which to retrieve company benefit summary
|
253
|
+
# @param end_date [String] The end date for which to retrieve company benefit summary. If left empty,
|
254
|
+
# defaults to today's date.
|
255
|
+
# @param detailed [Boolean] Display employee payroll item summary
|
256
|
+
# @param request_options [Gusto::RequestOptions]
|
257
|
+
# @return [Gusto::CompanyBenefits::BenefitSummary]
|
258
|
+
# @example
|
259
|
+
# api = Gusto::Client.new(
|
260
|
+
# base_url: "https://api.example.com",
|
261
|
+
# environment: Gusto::Environment::DEMO,
|
262
|
+
# token: "YOUR_AUTH_TOKEN"
|
263
|
+
# )
|
264
|
+
# api.companies.benefits.get_summary(
|
265
|
+
# company_benefit_id: "company_benefit_id",
|
266
|
+
# start_date: "2022-01-01",
|
267
|
+
# end_date: "2022-12-31"
|
268
|
+
# )
|
269
|
+
def get_summary(company_benefit_id:, start_date: nil, end_date: nil, detailed: nil, request_options: nil)
|
270
|
+
response = @request_client.conn.get do | req |
|
271
|
+
unless request_options&.timeout_in_seconds.nil?
|
272
|
+
req.options.timeout = request_options.timeout_in_seconds
|
273
|
+
end
|
274
|
+
unless request_options&.token.nil?
|
275
|
+
req.headers["Authorization"] = request_options.token
|
276
|
+
end
|
277
|
+
unless request_options&.gusto_api_version.nil?
|
278
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
279
|
+
end
|
280
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
281
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "start_date": start_date, "end_date": end_date, "detailed": detailed }.compact
|
282
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
283
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
284
|
+
end
|
285
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/summary"
|
286
|
+
end
|
287
|
+
Gusto::CompanyBenefits::BenefitSummary.from_json(json_object: response.body)
|
288
|
+
end
|
289
|
+
# Employee benefits represent an employee enrolled in a particular company
|
290
|
+
# benefit. It includes information specific to that employee’s enrollment.
|
291
|
+
# Returns an array of all employee benefits enrolled for this company benefit.
|
292
|
+
# Benefits containing PHI are only visible to applications with the
|
293
|
+
# `employee_benefits:read:phi` scope.
|
294
|
+
# scope: `employee_benefits:read`
|
295
|
+
#
|
296
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
297
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
298
|
+
# endpoint forces pagination.
|
299
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
300
|
+
# @param request_options [Gusto::RequestOptions]
|
301
|
+
# @return [Array<Gusto::EmployeeBenefit>]
|
302
|
+
# @example
|
303
|
+
# api = Gusto::Client.new(
|
304
|
+
# base_url: "https://api.example.com",
|
305
|
+
# environment: Gusto::Environment::DEMO,
|
306
|
+
# token: "YOUR_AUTH_TOKEN"
|
307
|
+
# )
|
308
|
+
# api.companies.benefits.list_employee_benefits(company_benefit_id: "company_benefit_id")
|
309
|
+
def list_employee_benefits(company_benefit_id:, page: nil, per: nil, request_options: nil)
|
310
|
+
response = @request_client.conn.get do | req |
|
311
|
+
unless request_options&.timeout_in_seconds.nil?
|
312
|
+
req.options.timeout = request_options.timeout_in_seconds
|
313
|
+
end
|
314
|
+
unless request_options&.token.nil?
|
315
|
+
req.headers["Authorization"] = request_options.token
|
316
|
+
end
|
317
|
+
unless request_options&.gusto_api_version.nil?
|
318
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
319
|
+
end
|
320
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
321
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per }.compact
|
322
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
323
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
324
|
+
end
|
325
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/employee_benefits"
|
326
|
+
end
|
327
|
+
parsed_json = JSON.parse(response.body)
|
328
|
+
parsed_json&.map do | item |
|
329
|
+
item = item.to_json
|
330
|
+
Gusto::EmployeeBenefit.from_json(json_object: item)
|
331
|
+
end
|
332
|
+
end
|
333
|
+
# Employee benefits represent an employee enrolled in a particular company
|
334
|
+
# benefit. It includes information specific to that employee’s enrollment.
|
335
|
+
# Create or update(if the employee is already enrolled in the company benefit
|
336
|
+
# previously) an employee benefit for the company benefit.
|
337
|
+
# Benefits containing PHI are only visible to applications with the
|
338
|
+
# `employee_benefits:read:phi` scope.
|
339
|
+
# scope: `employee_benefits:write`
|
340
|
+
#
|
341
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
342
|
+
# @param employee_benefits [Array<Hash>] The list of employee benefits to create or updateRequest of type Array<Gusto::EmployeeBenefitForCompanyBenefit>, as a Hash
|
343
|
+
# * :employee_uuid (String)
|
344
|
+
# * :company_benefit_uuid (String)
|
345
|
+
# * :uuid (String)
|
346
|
+
# * :version (String)
|
347
|
+
# * :active (Boolean)
|
348
|
+
# * :employee_deduction (String)
|
349
|
+
# * :deduct_as_percentage (Boolean)
|
350
|
+
# * :employee_deduction_annual_maximum (String)
|
351
|
+
# * :contribution (Hash)
|
352
|
+
# * :type (String)
|
353
|
+
# * :value (Hash)
|
354
|
+
# * :elective (Boolean)
|
355
|
+
# * :company_contribution_annual_maximum (String)
|
356
|
+
# * :limit_option (String)
|
357
|
+
# * :catch_up (Boolean)
|
358
|
+
# * :retirement_loan_identifier (String)
|
359
|
+
# * :coverage_amount (String)
|
360
|
+
# * :deduction_reduces_taxable_income (Gusto::EmployeeBenefitBaseObjectDeductionReducesTaxableIncome)
|
361
|
+
# * :coverage_salary_multiplier (String)
|
362
|
+
# * :company_contribution (String)
|
363
|
+
# * :contribute_as_percentage (Boolean)
|
364
|
+
# @param request_options [Gusto::RequestOptions]
|
365
|
+
# @return [Array<Gusto::EmployeeBenefit>]
|
366
|
+
# @example
|
367
|
+
# api = Gusto::Client.new(
|
368
|
+
# base_url: "https://api.example.com",
|
369
|
+
# environment: Gusto::Environment::DEMO,
|
370
|
+
# token: "YOUR_AUTH_TOKEN"
|
371
|
+
# )
|
372
|
+
# api.companies.benefits.update_employee_benefits(company_benefit_id: "company_benefit_id", employee_benefits: [{ version: "09j3d29jqdpj92109j9j2d90dq", active: true, employee_deduction: "250.00", employee_uuid: "8f9f3f68-8fd3-499d-ade7-4a052e56494e" }])
|
373
|
+
def update_employee_benefits(company_benefit_id:, employee_benefits: nil, request_options: nil)
|
374
|
+
response = @request_client.conn.put do | req |
|
375
|
+
unless request_options&.timeout_in_seconds.nil?
|
376
|
+
req.options.timeout = request_options.timeout_in_seconds
|
377
|
+
end
|
378
|
+
unless request_options&.token.nil?
|
379
|
+
req.headers["Authorization"] = request_options.token
|
380
|
+
end
|
381
|
+
unless request_options&.gusto_api_version.nil?
|
382
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
383
|
+
end
|
384
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
385
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
386
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
387
|
+
end
|
388
|
+
req.body = { **(request_options&.additional_body_parameters || {}), employee_benefits: employee_benefits }.compact
|
389
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/employee_benefits"
|
390
|
+
end
|
391
|
+
parsed_json = JSON.parse(response.body)
|
392
|
+
parsed_json&.map do | item |
|
393
|
+
item = item.to_json
|
394
|
+
Gusto::EmployeeBenefit.from_json(json_object: item)
|
395
|
+
end
|
396
|
+
end
|
397
|
+
# Returns field requirements for the requested benefit type.
|
398
|
+
# scope: `benefits:read`
|
399
|
+
#
|
400
|
+
# @param benefit_id [String] The benefit type in Gusto.
|
401
|
+
# @param request_options [Gusto::RequestOptions]
|
402
|
+
# @return [Gusto::CompanyBenefits::BenefitTypeRequirements]
|
403
|
+
# @example
|
404
|
+
# api = Gusto::Client.new(
|
405
|
+
# base_url: "https://api.example.com",
|
406
|
+
# environment: Gusto::Environment::DEMO,
|
407
|
+
# token: "YOUR_AUTH_TOKEN"
|
408
|
+
# )
|
409
|
+
# api.companies.benefits.get_requirements(benefit_id: "benefit_id")
|
410
|
+
def get_requirements(benefit_id:, request_options: nil)
|
411
|
+
response = @request_client.conn.get do | req |
|
412
|
+
unless request_options&.timeout_in_seconds.nil?
|
413
|
+
req.options.timeout = request_options.timeout_in_seconds
|
414
|
+
end
|
415
|
+
unless request_options&.token.nil?
|
416
|
+
req.headers["Authorization"] = request_options.token
|
417
|
+
end
|
418
|
+
unless request_options&.gusto_api_version.nil?
|
419
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
420
|
+
end
|
421
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
422
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
423
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
424
|
+
end
|
425
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
426
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
427
|
+
end
|
428
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits/#{benefit_id}/requirements"
|
429
|
+
end
|
430
|
+
Gusto::CompanyBenefits::BenefitTypeRequirements.from_json(json_object: response.body)
|
431
|
+
end
|
432
|
+
end
|
433
|
+
class AsyncBenefitsClient
|
434
|
+
# @return [Gusto::AsyncRequestClient]
|
435
|
+
attr_reader :request_client
|
436
|
+
|
437
|
+
|
438
|
+
# @param request_client [Gusto::RequestClient]
|
439
|
+
# @return [Gusto::Companies::AsyncBenefitsClient]
|
440
|
+
def initialize(request_client:)
|
441
|
+
@request_client = request_client
|
442
|
+
end
|
443
|
+
# Returns all benefits supported by Gusto.
|
444
|
+
# The benefit object in Gusto contains high level information about a particular
|
445
|
+
# benefit type and its tax considerations. When companies choose to offer a
|
446
|
+
# benefit, they are creating a Company Benefit object associated with a particular
|
447
|
+
# benefit.
|
448
|
+
# scope: `benefits:read`
|
449
|
+
#
|
450
|
+
# @param request_options [Gusto::RequestOptions]
|
451
|
+
# @return [Array<Gusto::SupportedBenefit>]
|
452
|
+
# @example
|
453
|
+
# api = Gusto::Client.new(
|
454
|
+
# base_url: "https://api.example.com",
|
455
|
+
# environment: Gusto::Environment::DEMO,
|
456
|
+
# token: "YOUR_AUTH_TOKEN"
|
457
|
+
# )
|
458
|
+
# api.companies.benefits.list
|
459
|
+
def list(request_options: nil)
|
460
|
+
Async do
|
461
|
+
response = @request_client.conn.get do | req |
|
462
|
+
unless request_options&.timeout_in_seconds.nil?
|
463
|
+
req.options.timeout = request_options.timeout_in_seconds
|
464
|
+
end
|
465
|
+
unless request_options&.token.nil?
|
466
|
+
req.headers["Authorization"] = request_options.token
|
467
|
+
end
|
468
|
+
unless request_options&.gusto_api_version.nil?
|
469
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
470
|
+
end
|
471
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
472
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
473
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
474
|
+
end
|
475
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
476
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
477
|
+
end
|
478
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits"
|
479
|
+
end
|
480
|
+
parsed_json = JSON.parse(response.body)
|
481
|
+
parsed_json&.map do | item |
|
482
|
+
item = item.to_json
|
483
|
+
Gusto::SupportedBenefit.from_json(json_object: item)
|
484
|
+
end
|
485
|
+
end
|
486
|
+
end
|
487
|
+
# Company benefits represent the benefits that a company is offering to employees.
|
488
|
+
# This ties together a particular supported benefit with the company-specific
|
489
|
+
# information for the offering of that benefit.
|
490
|
+
# Note that company benefits can be deactivated only when no employees are
|
491
|
+
# enrolled.
|
492
|
+
# scope: `company_benefits:write`
|
493
|
+
#
|
494
|
+
# @param company_id [String] The UUID of the company
|
495
|
+
# @param benefit_type [Float] The ID of the benefit to which the company benefit belongs.
|
496
|
+
# @param active [Boolean] Whether this benefit is active for employee participation.
|
497
|
+
# @param description [String] The description of the company benefit.For example, a company may offer multiple
|
498
|
+
# benefits with an ID of 1 (for Medical Insurance). The description would show
|
499
|
+
# something more specific like “Kaiser Permanente” or “Blue Cross/ Blue Shield”.
|
500
|
+
# @param responsible_for_employer_taxes [Boolean] Whether the employer is subject to pay employer taxes when an employee is on
|
501
|
+
# leave. Only applicable to third party sick pay benefits.
|
502
|
+
# @param responsible_for_employee_w2 [Boolean] Whether the employer is subject to file W-2 forms for an employee on leave. Only
|
503
|
+
# applicable to third party sick pay benefits.
|
504
|
+
# @param request_options [Gusto::RequestOptions]
|
505
|
+
# @return [Gusto::CompanyBenefit]
|
506
|
+
# @example
|
507
|
+
# api = Gusto::Client.new(
|
508
|
+
# base_url: "https://api.example.com",
|
509
|
+
# environment: Gusto::Environment::DEMO,
|
510
|
+
# token: "YOUR_AUTH_TOKEN"
|
511
|
+
# )
|
512
|
+
# api.companies.benefits.create(company_id: "company_id", description: "description")
|
513
|
+
def create(company_id:, benefit_type: nil, active: nil, description:, responsible_for_employer_taxes: nil, responsible_for_employee_w2: nil, request_options: nil)
|
514
|
+
Async do
|
515
|
+
response = @request_client.conn.post do | req |
|
516
|
+
unless request_options&.timeout_in_seconds.nil?
|
517
|
+
req.options.timeout = request_options.timeout_in_seconds
|
518
|
+
end
|
519
|
+
unless request_options&.token.nil?
|
520
|
+
req.headers["Authorization"] = request_options.token
|
521
|
+
end
|
522
|
+
unless request_options&.gusto_api_version.nil?
|
523
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
524
|
+
end
|
525
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
526
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
527
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
528
|
+
end
|
529
|
+
req.body = { **(request_options&.additional_body_parameters || {}), benefit_type: benefit_type, active: active, description: description, responsible_for_employer_taxes: responsible_for_employer_taxes, responsible_for_employee_w2: responsible_for_employee_w2 }.compact
|
530
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/companies/#{company_id}/company_benefits"
|
531
|
+
end
|
532
|
+
Gusto::CompanyBenefit.from_json(json_object: response.body)
|
533
|
+
end
|
534
|
+
end
|
535
|
+
# Returns a benefit supported by Gusto.
|
536
|
+
# The benefit object in Gusto contains high level information about a particular
|
537
|
+
# benefit type and its tax considerations. When companies choose to offer a
|
538
|
+
# benefit, they are creating a Company Benefit object associated with a particular
|
539
|
+
# benefit.
|
540
|
+
# scope: `benefits:read`
|
541
|
+
#
|
542
|
+
# @param benefit_id [String] The benefit type in Gusto.
|
543
|
+
# @param request_options [Gusto::RequestOptions]
|
544
|
+
# @return [Gusto::SupportedBenefit]
|
545
|
+
# @example
|
546
|
+
# api = Gusto::Client.new(
|
547
|
+
# base_url: "https://api.example.com",
|
548
|
+
# environment: Gusto::Environment::DEMO,
|
549
|
+
# token: "YOUR_AUTH_TOKEN"
|
550
|
+
# )
|
551
|
+
# api.companies.benefits.get(benefit_id: "benefit_id")
|
552
|
+
def get(benefit_id:, request_options: nil)
|
553
|
+
Async do
|
554
|
+
response = @request_client.conn.get do | req |
|
555
|
+
unless request_options&.timeout_in_seconds.nil?
|
556
|
+
req.options.timeout = request_options.timeout_in_seconds
|
557
|
+
end
|
558
|
+
unless request_options&.token.nil?
|
559
|
+
req.headers["Authorization"] = request_options.token
|
560
|
+
end
|
561
|
+
unless request_options&.gusto_api_version.nil?
|
562
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
563
|
+
end
|
564
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
565
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
566
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
567
|
+
end
|
568
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
569
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
570
|
+
end
|
571
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits/#{benefit_id}"
|
572
|
+
end
|
573
|
+
Gusto::SupportedBenefit.from_json(json_object: response.body)
|
574
|
+
end
|
575
|
+
end
|
576
|
+
# Company benefits represent the benefits that a company is offering to employees.
|
577
|
+
# This ties together a particular supported benefit with the company-specific
|
578
|
+
# information for the offering of that benefit.
|
579
|
+
# Note that company benefits can be deactivated only when no employees are
|
580
|
+
# enrolled.
|
581
|
+
# scope: `company_benefits:write`
|
582
|
+
#
|
583
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
584
|
+
# @param version [String] The current version of the object. See the [versioning
|
585
|
+
# guide](https://docs.gusto.com/embedded-payroll/docs/versioning#object-layer) for
|
586
|
+
# information on how to use this field.
|
587
|
+
# @param active [Boolean] Whether this benefit is active for employee participation. Company benefits may
|
588
|
+
# only be deactivated if no employees are actively participating.
|
589
|
+
# @param description [String] The description of the company benefit.For example, a company may offer multiple
|
590
|
+
# benefits with an ID of 1 (for Medical Insurance). The description would show
|
591
|
+
# something more specific like “Kaiser Permanente” or “Blue Cross/ Blue Shield”.
|
592
|
+
# @param request_options [Gusto::RequestOptions]
|
593
|
+
# @return [Gusto::CompanyBenefit]
|
594
|
+
# @example
|
595
|
+
# api = Gusto::Client.new(
|
596
|
+
# base_url: "https://api.example.com",
|
597
|
+
# environment: Gusto::Environment::DEMO,
|
598
|
+
# token: "YOUR_AUTH_TOKEN"
|
599
|
+
# )
|
600
|
+
# api.companies.benefits.update(
|
601
|
+
# company_benefit_id: "company_benefit_id",
|
602
|
+
# version: "98jr3289h3298hr9329gf9egskt3kagri32qqgiqe3872",
|
603
|
+
# active: false
|
604
|
+
# )
|
605
|
+
def update(company_benefit_id:, version:, active: nil, description: nil, request_options: nil)
|
606
|
+
Async do
|
607
|
+
response = @request_client.conn.put do | req |
|
608
|
+
unless request_options&.timeout_in_seconds.nil?
|
609
|
+
req.options.timeout = request_options.timeout_in_seconds
|
610
|
+
end
|
611
|
+
unless request_options&.token.nil?
|
612
|
+
req.headers["Authorization"] = request_options.token
|
613
|
+
end
|
614
|
+
unless request_options&.gusto_api_version.nil?
|
615
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
616
|
+
end
|
617
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
618
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
619
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
620
|
+
end
|
621
|
+
req.body = { **(request_options&.additional_body_parameters || {}), version: version, active: active, description: description }.compact
|
622
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}"
|
623
|
+
end
|
624
|
+
Gusto::CompanyBenefit.from_json(json_object: response.body)
|
625
|
+
end
|
626
|
+
end
|
627
|
+
# The following must be true in order to delete a company benefit
|
628
|
+
# - There are no employee benefits associated with the company benefit
|
629
|
+
# - There are no payroll items associated with the company benefit
|
630
|
+
# - The benefit is not managed by a Partner or by Gusto (type must be 'External')
|
631
|
+
# scope: `company_benefits:write`
|
632
|
+
#
|
633
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
634
|
+
# @param request_options [Gusto::RequestOptions]
|
635
|
+
# @return [Void]
|
636
|
+
# @example
|
637
|
+
# api = Gusto::Client.new(
|
638
|
+
# base_url: "https://api.example.com",
|
639
|
+
# environment: Gusto::Environment::DEMO,
|
640
|
+
# token: "YOUR_AUTH_TOKEN"
|
641
|
+
# )
|
642
|
+
# api.companies.benefits.delete(company_benefit_id: "company_benefit_id")
|
643
|
+
def delete(company_benefit_id:, request_options: nil)
|
644
|
+
Async do
|
645
|
+
response = @request_client.conn.delete do | req |
|
646
|
+
unless request_options&.timeout_in_seconds.nil?
|
647
|
+
req.options.timeout = request_options.timeout_in_seconds
|
648
|
+
end
|
649
|
+
unless request_options&.token.nil?
|
650
|
+
req.headers["Authorization"] = request_options.token
|
651
|
+
end
|
652
|
+
unless request_options&.gusto_api_version.nil?
|
653
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
654
|
+
end
|
655
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
656
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
657
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
658
|
+
end
|
659
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
660
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
661
|
+
end
|
662
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}"
|
663
|
+
end
|
664
|
+
end
|
665
|
+
end
|
666
|
+
# Returns summary benefit data for the requested company benefit id.
|
667
|
+
# Benefits containing PHI are only visible to applications with the
|
668
|
+
# `company_benefits:read:phi` scope.
|
669
|
+
# scope: `company_benefits:read`
|
670
|
+
#
|
671
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
672
|
+
# @param start_date [String] The start date for which to retrieve company benefit summary
|
673
|
+
# @param end_date [String] The end date for which to retrieve company benefit summary. If left empty,
|
674
|
+
# defaults to today's date.
|
675
|
+
# @param detailed [Boolean] Display employee payroll item summary
|
676
|
+
# @param request_options [Gusto::RequestOptions]
|
677
|
+
# @return [Gusto::CompanyBenefits::BenefitSummary]
|
678
|
+
# @example
|
679
|
+
# api = Gusto::Client.new(
|
680
|
+
# base_url: "https://api.example.com",
|
681
|
+
# environment: Gusto::Environment::DEMO,
|
682
|
+
# token: "YOUR_AUTH_TOKEN"
|
683
|
+
# )
|
684
|
+
# api.companies.benefits.get_summary(
|
685
|
+
# company_benefit_id: "company_benefit_id",
|
686
|
+
# start_date: "2022-01-01",
|
687
|
+
# end_date: "2022-12-31"
|
688
|
+
# )
|
689
|
+
def get_summary(company_benefit_id:, start_date: nil, end_date: nil, detailed: nil, request_options: nil)
|
690
|
+
Async do
|
691
|
+
response = @request_client.conn.get do | req |
|
692
|
+
unless request_options&.timeout_in_seconds.nil?
|
693
|
+
req.options.timeout = request_options.timeout_in_seconds
|
694
|
+
end
|
695
|
+
unless request_options&.token.nil?
|
696
|
+
req.headers["Authorization"] = request_options.token
|
697
|
+
end
|
698
|
+
unless request_options&.gusto_api_version.nil?
|
699
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
700
|
+
end
|
701
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
702
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "start_date": start_date, "end_date": end_date, "detailed": detailed }.compact
|
703
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
704
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
705
|
+
end
|
706
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/summary"
|
707
|
+
end
|
708
|
+
Gusto::CompanyBenefits::BenefitSummary.from_json(json_object: response.body)
|
709
|
+
end
|
710
|
+
end
|
711
|
+
# Employee benefits represent an employee enrolled in a particular company
|
712
|
+
# benefit. It includes information specific to that employee’s enrollment.
|
713
|
+
# Returns an array of all employee benefits enrolled for this company benefit.
|
714
|
+
# Benefits containing PHI are only visible to applications with the
|
715
|
+
# `employee_benefits:read:phi` scope.
|
716
|
+
# scope: `employee_benefits:read`
|
717
|
+
#
|
718
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
719
|
+
# @param page [Float] The page that is requested. When unspecified, will load all objects unless
|
720
|
+
# endpoint forces pagination.
|
721
|
+
# @param per [Float] Number of objects per page. For majority of endpoints will default to 25
|
722
|
+
# @param request_options [Gusto::RequestOptions]
|
723
|
+
# @return [Array<Gusto::EmployeeBenefit>]
|
724
|
+
# @example
|
725
|
+
# api = Gusto::Client.new(
|
726
|
+
# base_url: "https://api.example.com",
|
727
|
+
# environment: Gusto::Environment::DEMO,
|
728
|
+
# token: "YOUR_AUTH_TOKEN"
|
729
|
+
# )
|
730
|
+
# api.companies.benefits.list_employee_benefits(company_benefit_id: "company_benefit_id")
|
731
|
+
def list_employee_benefits(company_benefit_id:, page: nil, per: nil, request_options: nil)
|
732
|
+
Async do
|
733
|
+
response = @request_client.conn.get do | req |
|
734
|
+
unless request_options&.timeout_in_seconds.nil?
|
735
|
+
req.options.timeout = request_options.timeout_in_seconds
|
736
|
+
end
|
737
|
+
unless request_options&.token.nil?
|
738
|
+
req.headers["Authorization"] = request_options.token
|
739
|
+
end
|
740
|
+
unless request_options&.gusto_api_version.nil?
|
741
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
742
|
+
end
|
743
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
744
|
+
req.params = { **(request_options&.additional_query_parameters || {}), "page": page, "per": per }.compact
|
745
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
746
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
747
|
+
end
|
748
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/employee_benefits"
|
749
|
+
end
|
750
|
+
parsed_json = JSON.parse(response.body)
|
751
|
+
parsed_json&.map do | item |
|
752
|
+
item = item.to_json
|
753
|
+
Gusto::EmployeeBenefit.from_json(json_object: item)
|
754
|
+
end
|
755
|
+
end
|
756
|
+
end
|
757
|
+
# Employee benefits represent an employee enrolled in a particular company
|
758
|
+
# benefit. It includes information specific to that employee’s enrollment.
|
759
|
+
# Create or update(if the employee is already enrolled in the company benefit
|
760
|
+
# previously) an employee benefit for the company benefit.
|
761
|
+
# Benefits containing PHI are only visible to applications with the
|
762
|
+
# `employee_benefits:read:phi` scope.
|
763
|
+
# scope: `employee_benefits:write`
|
764
|
+
#
|
765
|
+
# @param company_benefit_id [String] The UUID of the company benefit
|
766
|
+
# @param employee_benefits [Array<Hash>] The list of employee benefits to create or updateRequest of type Array<Gusto::EmployeeBenefitForCompanyBenefit>, as a Hash
|
767
|
+
# * :employee_uuid (String)
|
768
|
+
# * :company_benefit_uuid (String)
|
769
|
+
# * :uuid (String)
|
770
|
+
# * :version (String)
|
771
|
+
# * :active (Boolean)
|
772
|
+
# * :employee_deduction (String)
|
773
|
+
# * :deduct_as_percentage (Boolean)
|
774
|
+
# * :employee_deduction_annual_maximum (String)
|
775
|
+
# * :contribution (Hash)
|
776
|
+
# * :type (String)
|
777
|
+
# * :value (Hash)
|
778
|
+
# * :elective (Boolean)
|
779
|
+
# * :company_contribution_annual_maximum (String)
|
780
|
+
# * :limit_option (String)
|
781
|
+
# * :catch_up (Boolean)
|
782
|
+
# * :retirement_loan_identifier (String)
|
783
|
+
# * :coverage_amount (String)
|
784
|
+
# * :deduction_reduces_taxable_income (Gusto::EmployeeBenefitBaseObjectDeductionReducesTaxableIncome)
|
785
|
+
# * :coverage_salary_multiplier (String)
|
786
|
+
# * :company_contribution (String)
|
787
|
+
# * :contribute_as_percentage (Boolean)
|
788
|
+
# @param request_options [Gusto::RequestOptions]
|
789
|
+
# @return [Array<Gusto::EmployeeBenefit>]
|
790
|
+
# @example
|
791
|
+
# api = Gusto::Client.new(
|
792
|
+
# base_url: "https://api.example.com",
|
793
|
+
# environment: Gusto::Environment::DEMO,
|
794
|
+
# token: "YOUR_AUTH_TOKEN"
|
795
|
+
# )
|
796
|
+
# api.companies.benefits.update_employee_benefits(company_benefit_id: "company_benefit_id", employee_benefits: [{ version: "09j3d29jqdpj92109j9j2d90dq", active: true, employee_deduction: "250.00", employee_uuid: "8f9f3f68-8fd3-499d-ade7-4a052e56494e" }])
|
797
|
+
def update_employee_benefits(company_benefit_id:, employee_benefits: nil, request_options: nil)
|
798
|
+
Async do
|
799
|
+
response = @request_client.conn.put do | req |
|
800
|
+
unless request_options&.timeout_in_seconds.nil?
|
801
|
+
req.options.timeout = request_options.timeout_in_seconds
|
802
|
+
end
|
803
|
+
unless request_options&.token.nil?
|
804
|
+
req.headers["Authorization"] = request_options.token
|
805
|
+
end
|
806
|
+
unless request_options&.gusto_api_version.nil?
|
807
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
808
|
+
end
|
809
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
810
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
811
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
812
|
+
end
|
813
|
+
req.body = { **(request_options&.additional_body_parameters || {}), employee_benefits: employee_benefits }.compact
|
814
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/company_benefits/#{company_benefit_id}/employee_benefits"
|
815
|
+
end
|
816
|
+
parsed_json = JSON.parse(response.body)
|
817
|
+
parsed_json&.map do | item |
|
818
|
+
item = item.to_json
|
819
|
+
Gusto::EmployeeBenefit.from_json(json_object: item)
|
820
|
+
end
|
821
|
+
end
|
822
|
+
end
|
823
|
+
# Returns field requirements for the requested benefit type.
|
824
|
+
# scope: `benefits:read`
|
825
|
+
#
|
826
|
+
# @param benefit_id [String] The benefit type in Gusto.
|
827
|
+
# @param request_options [Gusto::RequestOptions]
|
828
|
+
# @return [Gusto::CompanyBenefits::BenefitTypeRequirements]
|
829
|
+
# @example
|
830
|
+
# api = Gusto::Client.new(
|
831
|
+
# base_url: "https://api.example.com",
|
832
|
+
# environment: Gusto::Environment::DEMO,
|
833
|
+
# token: "YOUR_AUTH_TOKEN"
|
834
|
+
# )
|
835
|
+
# api.companies.benefits.get_requirements(benefit_id: "benefit_id")
|
836
|
+
def get_requirements(benefit_id:, request_options: nil)
|
837
|
+
Async do
|
838
|
+
response = @request_client.conn.get do | req |
|
839
|
+
unless request_options&.timeout_in_seconds.nil?
|
840
|
+
req.options.timeout = request_options.timeout_in_seconds
|
841
|
+
end
|
842
|
+
unless request_options&.token.nil?
|
843
|
+
req.headers["Authorization"] = request_options.token
|
844
|
+
end
|
845
|
+
unless request_options&.gusto_api_version.nil?
|
846
|
+
req.headers["X-Gusto-API-Version"] = request_options.gusto_api_version
|
847
|
+
end
|
848
|
+
req.headers = { **(req.headers || {}), **@request_client.get_headers, **(request_options&.additional_headers || {}) }.compact
|
849
|
+
unless request_options.nil? || request_options&.additional_query_parameters.nil?
|
850
|
+
req.params = { **(request_options&.additional_query_parameters || {}) }.compact
|
851
|
+
end
|
852
|
+
unless request_options.nil? || request_options&.additional_body_parameters.nil?
|
853
|
+
req.body = { **(request_options&.additional_body_parameters || {}) }.compact
|
854
|
+
end
|
855
|
+
req.url "#{@request_client.get_url(request_options: request_options)}/v1/benefits/#{benefit_id}/requirements"
|
856
|
+
end
|
857
|
+
Gusto::CompanyBenefits::BenefitTypeRequirements.from_json(json_object: response.body)
|
858
|
+
end
|
859
|
+
end
|
860
|
+
end
|
861
|
+
end
|
862
|
+
end
|